Function DP_DeepPotCompute#
Defined in File c_api.h
Function Documentation#
- void DP_DeepPotCompute(DP_DeepPot *dp, const int natom, const double *coord, const int *atype, const double *cell, double *energy, double *force, double *virial, double *atomic_energy, double *atomic_virial)#
Evaluate the energy, force and virial by using a DP. (double version)
- Attention
The number of frames is assumed to be 1.
Warning
The output arrays should be allocated before calling this function. Pass NULL if not required.
- Parameters:
dp – [in] The DP to use.
natoms – [in] The number of atoms.
coord – [in] The coordinates of atoms. The array should be of size natoms x 3.
atype – [in] The atom types. The array should contain natoms ints.
box – [in] The cell of the region. The array should be of size 9. Pass NULL if pbc is not used.
energy – [out] Output energy.
force – [out] Output force. The array should be of size natoms x 3.
virial – [out] Output virial. The array should be of size 9.
atomic_energy – [out] Output atomic energy. The array should be of size natoms.
atomic_virial – [out] Output atomic virial. The array should be of size natoms x 9.