gpridge._adapters¶
Adapters for external potential energy surface packages.
Functions¶
|
Create a potential callback from an ASE |
|
Create an |
|
Create an |
Module Contents¶
- gpridge._adapters.ase_potential(atoms)¶
Create a potential callback from an ASE
Atomsobject.The returned callable has the signature expected by
PotentialWrapper:fn(positions, atomic_numbers, forces, box) -> energyThe
Atomsobject is updated in-place on every call (positions and cell are overwritten), so the same object can be inspected after the search completes.- Parameters:
atoms (
ase.Atoms) – An ASEAtomsobject with a calculator attached. The calculator must supportget_potential_energy()andget_forces().- Returns:
potential_fn – A function suitable for passing to
PotentialWrapperorrun_dimer().- Return type:
callable- Raises:
ImportError – If ASE is not installed.
ValueError – If atoms has no calculator attached.
Examples
>>> from ase.build import molecule >>> from ase.calculators.emt import EMT >>> h2 = molecule("H2") >>> h2.calc = EMT() >>> pot_fn = ase_potential(h2)
- gpridge._adapters.atoms_config_from_ase(atoms, frozen_indices=None)¶
Create an
AtomsConfigurationfrom an ASEAtomsobject.- Parameters:
- Returns:
atoms_config
- Return type:
- gpridge._adapters.observation_from_ase(atoms_list)¶
Create an
Observationfrom a list of ASEAtomsobjects.Each Atoms object supplies energy and forces via
atoms.get_potential_energy()/atoms.get_forces().