mliap_interface module

Full Documentation for hippynn.interfaces.lammps_interface.mliap_interface module. Click here for a summary page.

Interface for creating LAMMPS MLIAP Unified models.

class LocalAtomEnergyNode(name, parents, module='auto', **kwargs)[source]

Bases: AutoNoKw, ExpandParents, MultiNode

class LocalAtomsEnergy[source]

Bases: Module

forward(all_atom_energies, nlocal)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class MLIAPInterface(*args: Any, **kwargs: Any)[source]

Bases: MLIAPUnified

Class for creating ML-IAP Unified model based on hippynn graphs.

as_tensor(array)[source]
compute_descriptors(data)[source]
compute_forces(data)[source]
Parameters:

data – MLIAPData object (provided internally by lammps)

:return None This function writes results to the input data.

compute_gradients(data)[source]
empty_tensor(dimentions)[source]
class ReIndexAtomMod(*args, **kwargs)[source]

Bases: Module

forward(raw_atom_index_array, inverse_real_atoms)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class ReIndexAtomNode(name, parents, module='auto', **kwargs)[source]

Bases: AutoNoKw, SingleNode

setup_LAMMPS_graph(energy)[source]
Parameters:

energy – energy node for lammps interface

Returns:

graph for computing from lammps MLIAP unified inputs.