calculator module

Full Documentation for hippynn.interfaces.ase_interface.calculator module. Click here for a summary page.

class HippynnCalculator(*args: Any, **kwargs: Any)

Bases: Calculator

ASE calculator based on hippynn graphs. Uses ASE neighbor lists. Not suitable for domain decomposition.

calculate(atoms=None, properties=None, system_changes=True)

Accepts ‘properties’ and ‘system changes’ but ignores them, purely for compatibility with ASE base calculator

calculation_required(atoms, properties=None, tol=1e-15)

Returns true if: 1. A property in the list properties is not supported. 2. Atoms are different from stored atoms. This proceeds by short-circuit: * if this check is passed, compare using ase compare_atoms and tolerance tol. * slight difference from ASE implementation: if properties is a string then it is wrapped in a list.

get_charges(atoms, allow_calculation=True, **kwargs)
get_dipole(atoms, allow_calculation=True, **kwargs)
get_dipole_moment(atoms, allow_calculation=True, **kwargs)
get_energies(atoms, allow_calculation=True, **kwargs)
get_energy(atoms, allow_calculation=True, **kwargs)
get_forces(atoms, allow_calculation=True, **kwargs)
get_free_energy(atoms, allow_calculation=True, **kwargs)
get_magmom(atoms, allow_calculation=True, **kwargs)
get_magmoms(atoms, allow_calculation=True, **kwargs)
get_potential_energies(atoms, allow_calculation=True, **kwargs)
get_potential_energy(atoms, allow_calculation=True, **kwargs)
get_property(name, atoms, allow_calculation=True)
get_stress(atoms, allow_calculation=True, **kwargs)
get_stresses(atoms, allow_calculation=True, **kwargs)
rebuild_neighbors()
set_atoms(atoms)
to(*args, **kwargs)
class PBCHandle(*nodes)

Bases: object

set(value)
calculator_from_model(model, **kwargs)

Attempt to find the energy and charge nodes automatically.

Parameters:

Note

If your model has an energy node, but that is not the full energy for simulation, don’t use this function. Similarly for charge.

pass_to_pytorch(fn_name)
setup_ASE_graph(energy, charges=None, extra_properties=None, species_set=None, indexer=None)