MLIP ASE Calculator¶
- class mlip.simulation.ase.mlip_ase_calculator.MLIPForceFieldASECalculator(atoms: Atoms, edge_capacity_multiplier: float, force_field: ForceField, allow_nodes_to_change: bool = False, node_capacity_multiplier: float = 1.0)¶
Atomic Simulation Environment (ASE) Calculator for JAX models.
Implemented properties are energy and forces.
- __init__(atoms: Atoms, edge_capacity_multiplier: float, force_field: ForceField, allow_nodes_to_change: bool = False, node_capacity_multiplier: float = 1.0) None ¶
Constructor.
- Parameters:
atoms – Initial atomic structure.
edge_capacity_multiplier – Factor to multiply the number of edges by to obtain the edge capacity including padding.
force_field – Force field model used to compute the predictions.
allow_nodes_to_change – Whether the number or types of atoms/nodes may change for the same instance of this class. Defaults to
False
.node_capacity_multiplier – Factor to multiply the number of nodes by to obtain the node capacity including padding. Defaults to 1.0.
- calculate(atoms: Atoms | None = None, properties: list[str] | None = None, system_changes: list[str] = ['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms']) None ¶
Compute properties (
forces
and/orenergy
) and save them inself.results
dictionary for ASE simulation.- Parameters:
atoms – Atomic structure. Defaults to
None
.properties – List of what needs to be calculated. Can be any combination of
"energy"
,"forces"
. Defaults toNone
.system_changes – List of what has changed since last calculation. Can be any combination of these six:
"positions"
,"numbers"
,"cell"
,"pbc"
,initial_charges
and"initial_magmoms"
. Defaults toase.calculators.calculator.all_changes
.
- mlip.utils.no_pbc_cell.get_no_pbc_cell(positions: ndarray, graph_cutoff: float) tuple[ndarray, ndarray] ¶
Create a cell that contains all positions, with room to spare.
- Parameters:
positions – A Nx3 array of the positions of the atoms in Angstrom.
graph_cutoff – The maximum distance for an edge to be computed between two atoms in Angstrom.
- Returns:
A tuple of the cell, as an array of size 3, and a cell origin, as an array of size 3.