deepmd.calculator
ASE calculator interface module. Implementation of ASE deepmd calculator. Bases: Implementation of ASE deepmd calculator. Implemented propertie are energy, forces and stress path to the model calculator label, by default “DP” mapping of element types and their numbers, best left None and the calculator will infer this information from model, by default None The neighbor list object. If None, then build the native neighbor list. Examples Compute potential energy Run BFGS structure optimization Run calculation with deepmd model. atoms object to run the calculation on, by default None unused, only for function signature compatibility, by default [“energy”, “forces”, “stress”] unused, only for function signature compatibility, by default all_changesModule Contents
Classes
ase.calculators.calculator.Calculator
Union
[str
, Path
]str
, optional
Dict
[str
, int
], optional
ase.neighborlist.NeighborList
, optional
>>> from ase import Atoms
>>> from deepmd.tf.calculator import DP
>>> water = Atoms('H2O',
>>> positions=[(0.7601, 1.9270, 1),
>>> (1.9575, 1, 1),
>>> (1., 1., 1.)],
>>> cell=[100, 100, 100],
>>> calculator=DP(model="frozen_model.pb"))
>>> print(water.get_potential_energy())
>>> print(water.get_forces())
>>> from ase.optimize import BFGS
>>> dyn = BFGS(water)
>>> dyn.run(fmax=1e-6)
>>> print(water.get_positions())
Optional
[Atoms
], optional
List
[str
], optional
List
[str
], optional