Function DP_DeepPotModelDeviCompute3#
Defined in File c_api.h
Function Documentation#
- void DP_DeepPotModelDeviCompute3(DP_DeepPotModelDevi *dp, const int nframes, const int natoms, const double *coord, const int *atype, const double *cell, const double *fparam, const double *aparam, const double *charge_spin, double *energy, double *force, double *virial, double *atomic_energy, double *atomic_virial)#
Evaluate energy, force and virial with a DP model deviation. (double version, with charge_spin).
- Version
3
- Since
API version 27
Warning
The output arrays should be allocated before calling this function. Pass NULL if not required.
- Parameters:
dp – [in] The DP model deviation to use.
nframes – [in] The number of frames. Only 1 is supported.
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.
cell – [in] The cell of the region. The array should be of size 9. Pass NULL if pbc is not used.
fparam – [in] The frame parameters. The array can be of size nframes x dim_fparam.
aparam – [in] The atom parameters. The array can be of size nframes x natoms x dim_aparam.
charge_spin – [in] The per-frame charge/spin input. The array should be of size nframes x dim_chg_spin. Pass NULL to use the model’s stored default_chg_spin.
energy – [out] Output energy of all models.
force – [out] Output force of all models. The array should be of size nmodels x natoms x 3.
virial – [out] Output virial of all models. The array should be of size nmodels x 9.
atomic_energy – [out] Output atomic energy of all models. The array should be of size nmodels x natoms.
atomic_virial – [out] Output atomic virial of all models. The array should be of size nmodels x natoms x 9.