Lennard-Jones potential kernel¶
-
class mdk::LennardJones
Standard Lennard-Jones potential.
Public Functions
-
LennardJones() = default
-
inline LennardJones(double r_min, double depth)
-
inline double cutoff() const
The cutoff distance for the L-J potential. I’m not sure what is the “industry standard” cutoff but at 2.5 sigma the value of the potential is -0.016 epsilon, which seems fine as a cutoff. For comparison, at 2 sigma the value is -0.06225 epsilon which seems too high to cut off.
- Returns
The cutoff distance.
-
inline void computeV(double norm, double &V, double &dV_dn) const
Compute the potential energy of the force field.
- Parameters
norm – Distance between the residues.
V – Variable to add the potential to.
dV_dn – Variable to add the derivative to.
-
template<typename T1, typename T2>
inline void computeF(VRef unit, double norm, double &V, T1 F1, T2 F2) const Compute and add the L-J force between two residues. The templates are here in order for us to be able to pass Eigen expressions to it.
- Template Parameters
T1 – Type of an lvalue to add the force on the first residue to.
T2 – Type of an lvalue to add the force on the second residue to.
- Parameters
unit – Normalized vector between the residues.
norm – Distance between the residues.
V – Variable to add the potential to.
F1 – Lvalue to add the force on the first residue to.
F2 – Lvalue to add the force on the second residue to.
-
LennardJones() = default