calculator module
Full Documentation for hippynn.interfaces.ase_interface.calculator
module.
Click here for a summary page.
- class HippynnCalculator(*args: Any, **kwargs: Any)[source]
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)[source]
Accepts ‘properties’ and ‘system changes’ but ignores them, purely for compatibility with ASE base calculator
- calculation_required(atoms, properties=None, tol=1e-15)[source]
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_stress(atoms, allow_calculation=True, **kwargs)
- get_stresses(atoms, allow_calculation=True, **kwargs)
- calculator_from_model(model, **kwargs)[source]
Attempt to find the energy and charge nodes automatically.
- Parameters:
model –
GraphModule
for the model.kwargs – passed to
HippynnCalculator
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.