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

Detailed Description

Computes dihedral / torsion angle involving 3 bonds.

Models the dihedral angle of 3 bond vectors b1, b2, and b3 that connect 4 atoms. These three vectors must be passed to the function computeAngle(), which computes the cosine of the resulting dihedral angle, and stores it in the public member cosPhi.

See Dihedral Interactions in the file dihedral.mod for the definition of cosPhi.

Definition at line 34 of file Torsion.h.

#include <Torsion.h>

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

Public Member Functions

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

double cosPhi
 Cosine of dihedral angle. More...
 

Member Function Documentation

bool Simp::Torsion::computeAngle ( const Vector b1,
const Vector b2,
const Vector b3 
)
inline

Compute cosPhi.

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 completion, 1 otherwise.

Definition at line 75 of file Torsion.h.

References cosPhi, Util::Vector::cross(), Util::Vector::dot(), and Util::Vector::square().

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

double Simp::Torsion::sinPhi ( ) const
inline

Return value of sin(phi) for precomputed cos(phi).

Definition at line 102 of file Torsion.h.

References cosPhi.

double Simp::Torsion::phi ( ) const
inline

Return value of phi in radians for precomputed cos(phi).

Returns principal value, in range 0 < phi < Pi.

Definition at line 109 of file Torsion.h.

References cosPhi.

Member Data Documentation

double Simp::Torsion::cosPhi

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