Class DipoleChargeModifier

Class Documentation

class DipoleChargeModifier

Dipole charge modifier.

Public Functions

DipoleChargeModifier()

Dipole charge modifier without initialization.

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

~DipoleChargeModifier()
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.

void print_summary(const std::string &pre) const

Print the DP summary to the screen.

Parameters

pre[in] The prefix to each line.

template<typename VALUETYPE>
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 nloc x 3.

  • nghost[in] The number of ghost atoms.

  • lmp_list[in] The neighbor list.

double cutoff() const

Get cutoff radius.

Returns

double cutoff radius.

int numb_types() const

Get the number of atom types.

Returns

int number of atom types.

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

Get the list of sel types.

Returns

The list of sel types.