Class DeepPotModelDevi

Class Documentation

class DeepPotModelDevi

Deep Potential model deviation.

Public Functions

inline DeepPotModelDevi()

DP model deviation constructor without initialization.

inline ~DeepPotModelDevi()
inline DeepPotModelDevi(const std::vector<std::string> &models)

DP model deviation constructor with initialization.

Parameters

models[in] The names of the frozen model file.

inline void init(const std::vector<std::string> &models)

Initialize the DP model deviation.

Parameters

model[in] The name of the frozen model file.

template<typename VALUETYPE>
inline void compute(std::vector<double> &ener, std::vector<std::vector<VALUETYPE>> &force, std::vector<std::vector<VALUETYPE>> &virial, const std::vector<VALUETYPE> &coord, const std::vector<int> &atype, const std::vector<VALUETYPE> &box, const int nghost, const InputNlist &lmp_list, const int &ago)

Evaluate the energy, force and virial by using this DP model deviation.

Parameters
  • ener[out] The system energy.

  • force[out] The force on each atom.

  • virial[out] The virial.

  • coord[in] The coordinates of atoms. The array should be of size nframes x natoms x 3.

  • atype[in] The atom types. The list should contain natoms ints.

  • box[in] The cell of the region. The array should be of size nframes x 9 (PBC) or empty (no PBC).

template<typename VALUETYPE>
inline void compute(std::vector<double> &ener, std::vector<std::vector<VALUETYPE>> &force, std::vector<std::vector<VALUETYPE>> &virial, std::vector<std::vector<VALUETYPE>> &atom_energy, std::vector<std::vector<VALUETYPE>> &atom_virial, const std::vector<VALUETYPE> &coord, const std::vector<int> &atype, const std::vector<VALUETYPE> &box, const int nghost, const InputNlist &lmp_list, const int &ago)

Evaluate the energy, force, virial, atomic energy, and atomic virial by using this DP model deviation.

Parameters
  • ener[out] The system energy.

  • force[out] The force on each atom.

  • virial[out] The virial.

  • atom_energy[out] The atomic energy.

  • atom_virial[out] The atomic virial.

  • coord[in] The coordinates of atoms. The array should be of size nframes x natoms x 3.

  • atype[in] The atom types. The list should contain natoms ints.

  • box[in] The cell of the region. The array should be of size nframes x 9 (PBC) or empty (no PBC).

inline double cutoff() const

Get the cutoff radius.

Returns

The cutoff radius.

inline int numb_types() const

Get the number of types.

Returns

The number of types.