Class DipoleChargeModifier

Class Documentation

class DipoleChargeModifier

Public Functions

inline DipoleChargeModifier()

DipoleChargeModifier constructor without initialization.

inline ~DipoleChargeModifier()
inline DipoleChargeModifier(const std::string &model, const int &gpu_rank = 0, const std::string &name_scope = "")

DipoleChargeModifier constructor with initialization.

Parameters:
  • model[in] The name of the frozen model file.

  • gpu_rank[in] The rank of the GPU to be used.

  • name_scope[in] The name scope of the model.

inline void init(const std::string &model, const int &gpu_rank = 0, const std::string &name_scope = "")

Initialize the DipoleChargeModifier.

Parameters:
  • model[in] The name of the frozen model file.

  • gpu_rank[in] The rank of the GPU to be used.

  • name_scope[in] The name scope of the model.

template<typename VALUETYPE>
inline void compute(std::vector<VALUETYPE> &dfcorr_, std::vector<VALUETYPE> &dvcorr_, const std::vector<VALUETYPE> &dcoord_, const std::vector<int> &datype_, const std::vector<VALUETYPE> &dbox, const std::vector<std::pair<int, int>> &pairs, const std::vector<VALUETYPE> &delef_, const int nghost, const InputNlist &lmp_list)

Evaluate the force and virial correction by using this dipole charge modifier.

Parameters:
  • dfcorr_[out] The force correction on each atom.

  • dvcorr_[out] The virial correction.

  • dcoord_[in] The coordinates of atoms. The array should be of size nall x 3.

  • datype_[in] The atom types. The list should contain nall ints.

  • dbox[in] The cell of the region. The array should be of size 9.

  • pairs[in] The pairs of atoms. The list should contain npairs pairs of ints.

  • delef_[in] The electric field on each atom. The array should be of size nghost x 3.

  • nghost[in] The number of ghost atoms.

  • lmp_list[in] The neighbor list.

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.

inline std::vector<int> sel_types() const
inline void print_summary(const std::string &pre) const

Print the summary of DeePMD-kit, including the version and the build information.

Parameters:

pre[in] The prefix to each line.