Dihedral angle potentials¶
-
namespace mdk
-
class DihedralAngles : public mdk::Force
- #include <DihedralAngles.hpp>
A force field for dihedral angles, composed of:
the “native” part, which exists in two mutually exclusive variants (simple and complex);
the “heurestic” part. The native part supercedes heurestic part whenever native dihedral angle is defined for a quadruple.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the force field to a simulation.
- Parameters
simulation – Simulation to bind to.
Private Members
-
std::variant<std::monostate, ComplexNativeDihedral*, SimpleNativeDihedral*> natDih = std::monostate()
The “native” part, i.e. either nothing, complex variant or the simple variant.
-
HeuresticDihedral *heurDih = nullptr
The “heurestic” part of the potential.
-
Bytes inRange
Friends
- friend class ComplexNativeDihedral
- friend class SimpleNativeDihedral
- friend class HeuresticDihedral
-
class DihedralAngles : public mdk::Force
-
namespace mdk
-
class NativeDihedralBase : public mdk::SimulVar
- #include <NativeDihedralBase.hpp>
A common part of simple and complex native dihedral variants. In particular, it stores whether a quadruple (i-2, i-1, i, i+1) has an associated native dihedral angle, and its value if it is the case.
Subclassed by mdk::ComplexNativeDihedral, mdk::SimpleNativeDihedral
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the variant to the simulation. Technically one shouldn’t add this base to the simulation itself; it serves as a prototype for
bind
inComplexNativeDihedral
andSimpleNativeDihedral
in particular, it retrieves and computesisNative
andphi0
.- Parameters
simulation –
Protected Attributes
-
Bytes isNative
isNative[i] = 1 if a quadruple (i-2, i-1, i, i+1) has an associated native dihedral angle, 0 otherwise.
-
Scalars phi0
phi0[i] has the value of an associated native dihedral angle, if such exists for the quadruple (i-2, i-1, i, i+1); otherwise, the value is undefined.
-
virtual void bind(Simulation &simulation) override
-
class NativeDihedralBase : public mdk::SimulVar
-
namespace mdk
-
class ComplexNativeDihedral : public mdk::NativeDihedralBase
- #include <ComplexNativeDihedral.hpp>
The complex variant of the native part of the dihedral angle potential.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the part to the simulation - in particular, find (and possibly create)
DihedralAngles
force field and add itself to it.- Parameters
simulation – Simulation to bind to.
-
inline void term(int i, double phi, double &V, double &dV_dphi) const
Term of the formula for the dihedral angle potential of a single quadruple. Note: it’s inline in order for the compiler to inline it in
DihedralAngles.cpp
file.- Parameters
i – The index i in the quadruple (i-2, i-1, i, i+1).
phi – Dihedral angle between planes defined by sequences i-2, i-1, i and i-1, i, i+1.
V – Potential energy reference to add to.
dV_dphi – Derivative of potential energy wrt the angle phi to add to.
Friends
- friend class DihedralAngles
-
virtual void bind(Simulation &simulation) override
-
class ComplexNativeDihedral : public mdk::NativeDihedralBase
-
namespace mdk
-
class SimpleNativeDihedral : public mdk::NativeDihedralBase
- #include <SimpleNativeDihedral.hpp>
The simple variant of the native part of the dihedral angle potential.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the part to the simulation - in particular, find (and possibly create)
DihedralAngles
force field and add itself to it.- Parameters
simulation – Simulation to bind to.
-
inline void term(int i, double phi, double &V, double &dV_dphi) const
Term of the formula for the dihedral angle potential of a single quadruple. Note: it’s inline in order for the compiler to inline it in
DihedralAngles.cpp
file.- Parameters
i – The index i in the quadruple (i-2, i-1, i, i+1).
phi – Dihedral angle between planes defined by sequences i-2, i-1, i and i-1, i, i+1.
V – Potential energy reference to add to.
dV_dphi – Derivative of potential energy wrt the angle phi to add to.
Friends
- friend class DihedralAngles
-
virtual void bind(Simulation &simulation) override
-
class SimpleNativeDihedral : public mdk::NativeDihedralBase
-
namespace mdk
-
class HeuresticDihedral : public mdk::SimulVar
- #include <HeuresticDihedral.hpp>
Heurestic part of the dihedral potential, applied when with the quadruple (i-2, i-1, i, i+1) is not associated a native dihedral angle.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the part to the simulation - in particular, find (and possibly create)
DihedralAngles
force field and add itself to it.- Parameters
simulation – Simulation to bind to.
-
inline void term(int i, double phi, double &V, double &dV_dphi) const
Term of the formula for the dihedral angle potential of a single quadruple. Note: it’s inline in order for the compiler to inline it in
DihedralAngles.cpp
file.- Parameters
i – The index i in the quadruple (i-2, i-1, i, i+1).
phi – Dihedral angle between planes defined by sequences i-2, i-1, i and i-1, i, i+1.
V – Potential energy reference to add to.
dV_dphi – Derivative of potential energy wrt the angle phi to add to.
Private Members
-
double coeff[numOfPTs][6]
Coefficients per pair type (where pair is (i-1, i) from the quadruple.
-
Eigen::Matrix<int8_t, Eigen::Dynamic, 1> angleTypes
Types of angles (i.e. pair types for each pair (i-1, i)).
Friends
- friend class DihedralAngles
-
virtual void bind(Simulation &simulation) override
-
class HeuresticDihedral : public mdk::SimulVar