Class DipoleChargeModifierBase

Inheritance Relationships

Derived Type

Class Documentation

class DipoleChargeModifierBase

Dipole charge modifier. (Base class)

Subclassed by deepmd::DipoleChargeModifierTF

Unnamed Group

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) = 0

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) = 0

Public Functions

inline DipoleChargeModifierBase()

Dipole charge modifier without initialization.

DipoleChargeModifierBase(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.

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

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.

virtual double cutoff() const = 0

Get cutoff radius.

Returns

double cutoff radius.

virtual int numb_types() const = 0

Get the number of atom types.

Returns

int number of atom types.

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

Get the list of sel types.

Returns

The list of sel types.