Bond angle potential¶
-
namespace mdk
-
class BondAngles : public mdk::Force
- #include <BondAngles.hpp>
A force field for bond angles (both heurestic and native variants, depending on whether a triple has an associated native bond angle (in such cases the native variant supercedes the heurestic variant).
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the force field to a simulation.
- Parameters
simulation – Simulation to bind to.
Private Members
-
HeuresticBA *heurBA = nullptr
The “heurestic” part of the potential.
-
NativeBA *natBA = nullptr
The “native” part of the potential.
-
Bytes inRange
Whether a triple (i-1, i, i+1) is connected, i.e. in one chain.
Friends
- friend class HeuresticBA
- friend class NativeBA
-
virtual void bind(Simulation &simulation) override
-
class BondAngles : public mdk::Force
-
namespace mdk
-
class HeuresticBA : public mdk::SimulVar
- #include <HeuresticBA.hpp>
“Heurestic” part of the bond angle potential, applied when a triple has no associated native bond angle.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the part to the simulation - in particular, find (and possibly create)
BondAngles
force field and add itself to it.- Parameters
simulation – Simulation to bind to.
-
inline void term(int i, double theta, double &V, double &dV_dth) const
Term of the formula for bond angle potential. Note: it’s inline in order for the compiler to inline it in
BondAngles.cpp
file.- Parameters
i – The index i in the triple (i-1, i, i+1).
theta – Value of the bond angle between i-1, i and i+1.
V – Potential energy reference to add to.
dV_dth – Derivative of potential energy wrt the angle theta to add to.
Private Members
-
Bytes angleTypes
List of “types of triples”, or rather pair types for (i, i+1) for a triple (i-1, i, i+1).
Private Static Attributes
-
static constexpr const int D = 6
Degree of the polynomial.
Friends
- friend class BondAngles
-
virtual void bind(Simulation &simulation) override
-
class HeuresticBA : public mdk::SimulVar
-
namespace mdk
-
class NativeBA : public mdk::SimulVar
- #include <NativeBA.hpp>
“Native” part of the bond angle potential, applied when a triple has an associated native bond angle.
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the part to the simulation - in particular, find (and possibly create)
BondAngles
force field and add itself to it.- Parameters
simulation – Simulation to bind to.
-
inline void term(int i, double theta, double &V, double &dV_dth) const
Term of the formula for bond angle potential. Note: it’s inline in order for the compiler to inline it in
BondAngles.cpp
file.- Parameters
i – The index i in the triple (i-1, i, i+1).
theta – Value of the bond angle between i-1, i and i+1.
V – Potential energy reference to add to.
dV_dth – Derivative of potential energy wrt the angle theta to add to.
Private Members
-
Bytes isNative
isNative[i] is 1 if (i-1, i, i+1) has an associated native bond angle, 0 otherwise.
-
Scalars theta0
theta0[i] contains the native bond angle whenever such is defined. For triples (i-1, i, i+1) which have no such associated angle, the value is undefined.
Friends
- friend class BondAngles
-
virtual void bind(Simulation &simulation) override
-
class NativeBA : public mdk::SimulVar