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

Detailed Description

A Bend calculates the angle between two vectors.

Models the angle between a pair of vectors b1 and b2 that are passed to the function computeAngle().

The scalar cosTheta is the cosine of the angle between b1 and b2.

Definition at line 30 of file Bend.h.

#include <Bend.h>

Inheritance diagram for Simp::Bend:
Simp::BendForce

Public Member Functions

void computeAngle (const Vector &b1, const Vector &b2)
 Compute cosTheta. More...
 
double sinTheta () const
 Return value of sin(theta) for precomputed cos(theta). More...
 
double theta () const
 Return value of theta in radians for precomputed cos(theta). More...
 

Public Attributes

double cosTheta
 Cosine of angle between vectors b1 and b2. More...
 

Member Function Documentation

void Simp::Bend::computeAngle ( const Vector b1,
const Vector b2 
)
inline

Compute cosTheta.

Parameters
b1bond vector from atom 0 to 1.
b2bond vector from atom 1 to 2.

Definition at line 68 of file Bend.h.

References cosTheta, Util::Vector::dot(), and Util::Vector::square().

double Simp::Bend::sinTheta ( ) const
inline

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

Definition at line 80 of file Bend.h.

References cosTheta.

Referenced by Simp::HarmonicAngle::force().

double Simp::Bend::theta ( ) const
inline

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

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

Definition at line 87 of file Bend.h.

References cosTheta.

Referenced by Simp::HarmonicAngle::force().

Member Data Documentation

double Simp::Bend::cosTheta

Cosine of angle between vectors b1 and b2.

Definition at line 38 of file Bend.h.

Referenced by computeAngle(), Simp::BendForce::computeDerivatives(), sinTheta(), and theta().


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