Simpatico  v1.10
List of all members | Public Member Functions | Public Attributes
Simp::TorsionForce Struct Reference

Detailed Description

Computes derivatives of dihedral angle with respect to bond vectors.

Models the dihedral angle formed by three sequentil bond vectors b1, b2, and b3. See Dihedral Interactions in the file dihedral.mod for the definition of the dihedral angle phi and its relationship to these bond vectors

These 3 bond vectors must be passed to the method computeDerivatives() which computes the cosine of the dihedral angle and the derivatives of the cosine with respect to the elements of the bond vectors. This function stores its results in the public members cosPhi, d1, d2, and d3. Upon return:

The scalar member cosPhi is the cosine of the dihdral angle phi.

The elements of the vectors d1, d2, and d3 are derivatives of cosPhi with respect to the elements of the bond vectors b1, b2, and b3.

The function computeAngle(), which is inherited from the Torsion base class, computes only cosPhi, but not the derivatives.

Definition at line 44 of file TorsionForce.h.

#include <TorsionForce.h>

Inheritance diagram for Simp::TorsionForce:
Simp::Torsion

Public Member Functions

bool computeDerivatives (const Vector &b1, const Vector &b2, const Vector &b3)
 Compute cosPhi and derivatives. More...
 
- Public Member Functions inherited from Simp::Torsion
bool computeAngle (const Vector &b1, const Vector &b2, const Vector &b3)
 Compute cosPhi. More...
 
double sinPhi () const
 Return value of sin(phi) for precomputed cos(phi). More...
 
double phi () const
 Return value of phi in radians for precomputed cos(phi). More...
 

Public Attributes

Vector d1
 Vector of derivatives d1[i] = d(cosPhi)/d(b1[i]) More...
 
Vector d2
 Vector of derivatives d2[i] = d(cosPhi)/d(b2[i]) More...
 
Vector d3
 Vector of derivatives d3[i] = d(cosPhi)/d(b3[i]) More...
 
- Public Attributes inherited from Simp::Torsion
double cosPhi
 Cosine of dihedral angle. More...
 

Member Function Documentation

bool Simp::TorsionForce::computeDerivatives ( const Vector b1,
const Vector b2,
const Vector b3 
)
inline

Compute cosPhi and derivatives.

Parameters
b1bond vector from atom 0 to 1.
b2bond vector from atom 1 to 2.
b3bond vector from atom 2 to 3.
Returns
0 if normal, 1 for divide by zero error

Definition at line 83 of file TorsionForce.h.

References Simp::Torsion::cosPhi, Util::Vector::cross(), d1, d2, d3, Util::Vector::dot(), Util::Vector::multiply(), and Util::Vector::square().

Referenced by Simp::CosineDihedral::force(), and Simp::MultiHarmonicDihedral::force().

Member Data Documentation

Vector Simp::TorsionForce::d1

Vector of derivatives d1[i] = d(cosPhi)/d(b1[i])

Definition at line 52 of file TorsionForce.h.

Referenced by computeDerivatives(), Simp::CosineDihedral::force(), and Simp::MultiHarmonicDihedral::force().

Vector Simp::TorsionForce::d2

Vector of derivatives d2[i] = d(cosPhi)/d(b2[i])

Definition at line 57 of file TorsionForce.h.

Referenced by computeDerivatives(), Simp::CosineDihedral::force(), and Simp::MultiHarmonicDihedral::force().

Vector Simp::TorsionForce::d3

Vector of derivatives d3[i] = d(cosPhi)/d(b3[i])

Definition at line 62 of file TorsionForce.h.

Referenced by computeDerivatives(), Simp::CosineDihedral::force(), and Simp::MultiHarmonicDihedral::force().


The documentation for this struct was generated from the following file: