6.4. DeepMDIO Input/Output interfaces
Warning
DeepMD kit is installed by pharmaforge; however, additonal libraries may be required for specific applications.
- class pharmaforge.interfaces.deepmdio.DeepMDData(e, f)[source]
Bases:
object
This class is used to store the energy and forces calculated by DeepMD.
This is a simple data class that holds the energy and forces of the system. It is used to store the results of the DeepMD calculations and is returned by the DeepMDInterface class, to have similar attributes to outcomes of ASE calculators.
- Parameters:
Methods
get_forces
get_potential_energy
- class pharmaforge.interfaces.deepmdio.DeepMDInterface(model=None)[source]
Bases:
AbstractIO
This class is used to interface with DeepMD-kit for running machine learning potentials, and will be used to calculate the energies and forces of the system.
Note
This interface only takes a model as the option, and thus does not have default options.
- Parameters:
model (str) – The path to the DeepMD model file. This should be a .pb file.
- allow_parallel
Whether to allow parallel calculations. Default is False, ans currently cannot pass the threads to DeepMD.
- Type:
See also
pharmaforge.interfaces.abstractio.AbstractIO
The abstract interface class for the Psi4Interface.
deepmd.infer.DeepPot
The deepmd-kit inference calculator object.
Methods
ObtainDeepData
(filename)Obtain the system data from the DeepIO interface and converts each configuration to an ASE atoms object.
ObtainQueryData
(queryresults)Obtain the system data from a query
calculate
([limit, verbose, num_workers])Calculate the energies and forces of the system using the interface.
find_clusters
(structure[, cutoff])Identify clusters of atoms in a structure based on a distance cutoff.
process_structure