8 #ifndef MOLECULARMECHANICS_DIHEDRALTERM_H
9 #define MOLECULARMECHANICS_DIHEDRALTERM_H
11 #include "../Topology/DihedralType.h"
20 class AtomicSecondDerivativeCollection;
24 namespace MolecularMechanics {
31 using AtomIndex = int;
34 DihedralTerm(AtomIndex firstAtom, AtomIndex secondAtom, AtomIndex thirdAtom, AtomIndex fourthAtom,
48 static double getTheta(
const Eigen::Vector3d& A,
const Eigen::Vector3d& B,
const Eigen::Vector3d& G);
78 double derSecond)
const;
80 AtomIndex firstAtom_, secondAtom_, thirdAtom_, fourthAtom_;
88 #endif // MOLECULARMECHANICS_DIHEDRALTERM_H
Class evaluating dihedral interaction for four given atoms.
Definition: DihedralTerm.h:29
int getFirstAtom() const
Getter for first atom.
Definition: DihedralTerm.cpp:161
int getFourthAtom() const
Getter for fourth atom.
Definition: DihedralTerm.cpp:173
Class treating a dihedral interaction, based solely on the angle (in rad), i.e. in 1 dimension...
Definition: Dihedral.h:19
Unique descriptor a dihedral for given atom types. (useful for maps/unordered_maps) ...
Definition: DihedralType.h:24
DihedralTerm(AtomIndex firstAtom, AtomIndex secondAtom, AtomIndex thirdAtom, AtomIndex fourthAtom, const Dihedral &dihedral, const DihedralType &typeOfDihedral)
Constructor from four atom in indices and instances of Dihedral and DihedralType classes.
Definition: DihedralTerm.cpp:17
DihedralType getTypeOfDihedral() const
Getter for the corresponding instance of the DihedralType class.
Definition: DihedralTerm.cpp:157
Base class for all interaction terms.
Definition: InteractionTermBase.h:18
double evaluateDihedralTerm(const Utils::PositionCollection &positions, Utils::AtomicSecondDerivativeCollection &derivatives) const
Evaluates energy contribution and adds the derivatives.
Definition: DihedralTerm.cpp:29
~DihedralTerm()
Destructor.
int getSecondAtom() const
Getter for second atom.
Definition: DihedralTerm.cpp:165
int getThirdAtom() const
Getter for third atom.
Definition: DihedralTerm.cpp:169
static double getTheta(const Eigen::Vector3d &A, const Eigen::Vector3d &B, const Eigen::Vector3d &G)
Calculate and return the dihedral angle theta from the three essential vectors A, B and G describing ...
Definition: DihedralTerm.cpp:138