Class DipoleChargeModifierTF

Inheritance Relationships

Base Type

Class Documentation

class DipoleChargeModifierTF : public deepmd::DipoleChargeModifierBase

Dipole charge modifier.

Public Functions

DipoleChargeModifierTF()

Dipole charge modifier without initialization.

DipoleChargeModifierTF(const std::string &model, const int &gpu_rank = 0, const std::string &name_scope = "")

Dipole charge modifier without initialization.

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

  • gpu_rank[in] The GPU rank. Default is 0.

  • name_scope[in] The name scope.

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

Initialize the dipole charge modifier.

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

  • gpu_rank[in] The GPU rank. Default is 0.

  • name_scope[in] The name scope.

inline virtual double cutoff() const

Get cutoff radius.

Returns

double cutoff radius.

inline virtual int numb_types() const

Get the number of atom types.

Returns

int number of atom types.

inline virtual const std::vector<int> &sel_types() const

Get the list of sel types.

Returns

The list of sel types.

virtual void computew(std::vector<double> &dfcorr_, std::vector<double> &dvcorr_, const std::vector<double> &dcoord_, const std::vector<int> &datype_, const std::vector<double> &dbox, const std::vector<std::pair<int, int>> &pairs, const std::vector<double> &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 natoms x 3.

  • datype_[in] The atom types. The list should contain natoms 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 natoms x 3.

  • nghost[in] The number of ghost atoms.

  • lmp_list[in] The neighbor list.

virtual void computew(std::vector<float> &dfcorr_, std::vector<float> &dvcorr_, const std::vector<float> &dcoord_, const std::vector<int> &datype_, const std::vector<float> &dbox, const std::vector<std::pair<int, int>> &pairs, const std::vector<float> &delef_, const int nghost, const InputNlist &lmp_list)