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

Detailed Description

A BendForce computes derivatives of the angle between two vectors.

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

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

The vectors d1 and d2 are vectors whose elements are the derivatives of cosTheta with respect to the elements of b1 and b2, respectively.

Definition at line 33 of file BendForce.h.

#include <BendForce.h>

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

Public Member Functions

void computeDerivatives (const Vector &b1, const Vector &b2)
 Compute cosTheta and its derivatives d1 and d2. More...
 
- Public Member Functions inherited from Simp::Bend
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

Vector d1
 Vector of derivatives d1[i] = d(cosTheta)/d(b1[i]) More...
 
Vector d2
 Vector of derivatives d2[i] = d(cosTheta)/d(b2[i]) More...
 
- Public Attributes inherited from Simp::Bend
double cosTheta
 Cosine of angle between vectors b1 and b2. More...
 

Member Function Documentation

void Simp::BendForce::computeDerivatives ( const Vector b1,
const Vector b2 
)
inline

Compute cosTheta and its derivatives d1 and d2.

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

Definition at line 64 of file BendForce.h.

References Util::Vector::abs(), Simp::Bend::cosTheta, d1, d2, Util::Vector::divide(), Util::Vector::dot(), Util::Vector::multiply(), and Util::Vector::subtract().

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

Member Data Documentation

Vector Simp::BendForce::d1

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

Definition at line 41 of file BendForce.h.

Referenced by computeDerivatives(), and Simp::HarmonicAngle::force().

Vector Simp::BendForce::d2

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

Definition at line 46 of file BendForce.h.

Referenced by computeDerivatives(), and Simp::HarmonicAngle::force().


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