Electrostatic forces¶
-
namespace mdk
-
class ESBase : public mdk::NonlocalForce
- #include <ESBase.hpp>
A base class for the Debye-Hueckel screened electrostatic potentials.
Subclassed by mdk::ConstDH, mdk::RelativeDH
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the class to the simulation. It initializes
charge
and adds the force to the VL list. Note: this class (ESBase
) shouldn’t be added to the simulation class, only the derived classes.- Parameters
simulation – Simulation to bind to.
-
virtual void vlUpdateHook() override
An action to be performed when the Verlet list is updated. Here we want to recreate
pairs
, i.e. filter the Verlet list so that only charged pairs are present.
Protected Attributes
-
std::vector<Contact> pairs
A local, filtered Verlet list of pairs. Since most residues are not charged, and pairs even moreso, it benefits us to keep a local list and not check the pairs which we would know cannot interact with each other.
-
Eigen::Matrix<int8_t, Eigen::Dynamic, 1> charge
A list of charges of the residues (in units of
echarge
).
-
struct Contact
- #include <ESBase.hpp>
A struct detailing a contact between pairs. We store the indices and the product of the charges.
Public Members
-
int i1
Index of the first residue.
-
int i2
Index of the second residue.
-
double q1_x_q2
Product of residues’ charges.
-
int i1
-
virtual void bind(Simulation &simulation) override
-
class ESBase : public mdk::NonlocalForce
-
namespace mdk