1 #ifndef SIMP_COSINE_DIHEDRAL_H 2 #define SIMP_COSINE_DIHEDRAL_H 12 #include <util/space/Vector.h> 13 #include <util/param/ParamComposite.h> 16 #include "TorsionForce.h" 100 void set(std::string name,
int type,
double value);
141 double get(std::string name,
int type)
const;
151 static const int MaxNDihedralType = 8;
153 double kappa_[MaxNDihedralType];
165 const Vector& b3,
int type)
const 171 return (kappa_[type] * (1.0 + torsion.
cosPhi));
193 double dEdCosPhi = kappa_[type];
Vector d1
Vector of derivatives d1[i] = d(cosPhi)/d(b1[i])
Vector & zero()
Set all elements of a 3D vector to zero.
std::string className() const
Return name string "CosineDihedral" for this evaluator class.
A Vector is a Cartesian vector.
void setNDihedralType(int nDihedralType)
Set the number of dihedral types.
bool computeDerivatives(const Vector &b1, const Vector &b2, const Vector &b3)
Compute cosPhi and derivatives.
double cosPhi
Cosine of dihedral angle.
Vector & multiply(const Vector &v, double s)
Multiply a vector v by a scalar s.
double energy(const Vector &b1, const Vector &b2, const Vector &b3, int type) const
Returns potential energy for one dihedral.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
CosineDihedral()
Default constructor.
Saving / output archive for binary ostream.
CosineDihedral & operator=(const CosineDihedral &other)
Assignment.
Utility classes for scientific computation.
Computes derivatives of dihedral angle with respect to bond vectors.
Vector d2
Vector of derivatives d2[i] = d(cosPhi)/d(b2[i])
Vector d3
Vector of derivatives d3[i] = d(cosPhi)/d(b3[i])
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
Saving archive for binary istream.
void force(const Vector &b1, const Vector &b2, const Vector &b3, Vector &f1, Vector &f2, Vector &f3, int type) const
Returns derivatives of energy with respect to bond vectors forming the dihedral group.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
bool computeAngle(const Vector &b1, const Vector &b2, const Vector &b3)
Compute cosPhi.
Computes dihedral / torsion angle involving 3 bonds.
An object that can read multiple parameters from file.
A dihedral potential proportional to cos(phi).
void readParameters(std::istream &in)
Read dihedral interaction parameters from input stream.