Shifted and truncated Lennard-Jones potential kernel

class mdk::ShiftedTruncatedLJ

A shifted and truncated version of the L-J potential, used chiefly by the Pauli exclusion force field.

Public Functions

ShiftedTruncatedLJ() = default
inline ShiftedTruncatedLJ(double r_cut, double depth)
inline double cutoff() const
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.

Public Members

double r_cut = 4.0 * angstrom
double depth = 1.0 * eps