NEPY: NEP C++ interface¶
Module¶
- calorine.nepy.nep.get_descriptors(structure, potential_filename=None, debug=False)[source]¶
Calculates the NEP descriptors for a given structure. A NEP model defined by a nep.txt can additionally be provided to get the NEP3 model specific descriptors. If no model is provided, a dummy NEP2 model suitable for the provided structure will be created and used.
- Parameters
structure (
Atoms
) – Input structurepotential_filename (
Optional
[str
]) – Path to NEP potential. Defaults to None.debug (
bool
) – Flag to toggle debug mode. Makes the generated dummy NEP2 model available in a local tmp directory, as well as prints GPUMD output. Defaults to False.
- Return type
Descriptors for the supplied structure, with shape (N_atoms, descriptor components)
- calorine.nepy.nep.get_potential_forces_and_virials(structure, potential_filename=None, debug=False)[source]¶
Calculates the per-atom potential, forces and virials for a given structure. A NEP model defined by a nep.txt-file needs to be provided.
- Parameters
structure (
Atoms
) – Input structurepotential_filename (
Optional
[str
]) – Path to NEP potential. Defaults to None.debug (
bool
) – Flag to toggle debug mode. Prints GPUMD output. Defaults to False.
- Return type
Tuple
[ndarray
]- Returns
(potential, forces, virials) for the supplied structure,
with shapes (N_atoms,), (N_atoms,3), (N_atoms,9)