Simpatico
v1.10
|
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>
Public Member Functions | |
void | computeDerivatives (const Vector &b1, const Vector &b2) |
Compute cosTheta and its derivatives d1 and d2. More... | |
![]() | |
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... | |
![]() | |
double | cosTheta |
Cosine of angle between vectors b1 and b2. More... | |
Compute cosTheta and its derivatives d1 and d2.
b1 | bond vector from atom 0 to 1. |
b2 | bond 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().
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().