Victor
|
Implements methods to manage translation vector and angles between vectors. More...
Public Member Functions | |
vgMatrix3< double > | calculateRot (vgVector3< double > &p11, vgVector3< double > &p12, vgVector3< double > &p21, vgVector3< double > &p22) |
calculates rotation matrix that rotate a vector into another More... | |
vgVector3< double > | calculateTrans (vgVector3< double > &p1, vgVector3< double > &p2) |
returns translation vector that translates a point into another More... | |
double | getAngle (vgVector3< double > &p11, vgVector3< double > &p12, vgVector3< double > &p21, vgVector3< double > &p22) |
returns angle between vectors detected by couple of points More... | |
double | getAngle (vgVector3< double > &v1, vgVector3< double > &v2) |
calcluates angle between two vectors More... | |
double | getAngleDifference (double a, double b) const |
void | setBondAngle (Atom &a1, Atom &a2, Atom &a3, double angle) |
void | setTorsionAngle (Atom &a1, Atom &a2, Atom &a3, Atom &a4, double angle) |
void | zAtomToCartesian (Atom &atbLP, const double bondLength, Atom &atbAP, const double bondAngle, Atom &attAP, const double torsionAngle, const int chiral, Atom &at) |
Static Public Member Functions | |
static double | getBondAngle (Atom &a1, Atom &a2, Atom &a3) |
static double | getBondLength (Atom &a1, Atom &a2) |
static double | getTorsionAngle (Atom &a1, Atom &a2, Atom &a3, Atom &a4) |
Implements methods to manage translation vector and angles between vectors.
Includes methods that allow to get, calculate angels and traslation vector, rotation matrix, etc .
vgMatrix3< double > calculateRot | ( | vgVector3< double > & | p11, |
vgVector3< double > & | p12, | ||
vgVector3< double > & | p21, | ||
vgVector3< double > & | p22 | ||
) |
calculates rotation matrix that rotate a vector into another
Returns the rotation matrix between two vectors defined by 4 points
p11,p12,p21,p22 | represent start-end points of two vectors in the 3D space (vgVector3<double>). |
vgVector3< double > calculateTrans | ( | vgVector3< double > & | p1, |
vgVector3< double > & | p2 | ||
) |
returns translation vector that translates a point into another
Returns the translational vector from p1 to p2
p1 | and p1 are 2 points in the 3D space (vgVector3<double>) |
double getAngle | ( | vgVector3< double > & | p11, |
vgVector3< double > & | p12, | ||
vgVector3< double > & | p21, | ||
vgVector3< double > & | p22 | ||
) |
returns angle between vectors detected by couple of points
Return the angle between two vectors
p11,p12,p21,p22 | represent start-end points of two vectors in the 3D space (vgVector3<double>). |
double getAngle | ( | vgVector3< double > & | v1, |
vgVector3< double > & | v2 | ||
) |
calcluates angle between two vectors
Returns the angle between two vectors of coordinates
a | and b contain the 3D coordinates (vgVector3<double>) |
double getAngleDifference | ( | double | a, |
double | b | ||
) | const |
Get new angle in [0,2pi).
Calculates the difference between two angles.
a | and b are angles in radiants (double) |
Returns the angle between 3 bound Atoms a1 -> a2 -> a3
a1,a2 | and a3 are three Atoms (Atom&) |
Calculate the distance between two Atoms
a1,a2 | are two Atoms (Atom&) |
Calculate the torsion angle between 4 connected Atoms. a1 -> a2 -> a3 -> a4 The definition of a torsion angle was took from the Babel package. Copyright (C) 1992-96 W. Patrick Walters and Matthew T. Stahl
a1,a2,a3 | and a4 are Atoms (Atom&) |
Add the rotaional matrix in C given A -> B -> C and an angle.
a1,a2 | and a3 are connected Atoms (Atom&) |
angle | (double), is the angle between A -> B and B -> C |
Add the rotaional matrix in C given A -> B -> C -> D and a TORSION angle.
a1,a2,a3 | and a4 are connected Atoms (Atom&) |
angle | (double), is the TORSION angle between A -> B and C -> D |
void zAtomToCartesian | ( | Atom & | atbLP, |
const double | bondLength, | ||
Atom & | atbAP, | ||
const double | bondAngle, | ||
Atom & | attAP, | ||
const double | torsionAngle, | ||
const int | chiral, | ||
Atom & | at | ||
) |
Converts from Tinker format into cartesian. Place the Atom "at" in the 3D space given a distance, an angle, the chirality and a torsion angle. The input Atoms need to be connected in this order: atbLP -> atbAP -> attAP -> at chiral can be 0,1,-1. If chiral == 0 the torsionAngle is a Dihedral angle. Otherwise is a bondLength angle. All angles for this function are in DEGREES not radiants!