Victor
 All Data Structures Functions Variables Friends Pages
IntCoordConverter Class Reference

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)
 

Detailed Description

Implements methods to manage translation vector and angles between vectors.

Includes methods that allow to get, calculate angels and traslation vector, rotation matrix, etc .

Member Function Documentation

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

Parameters
p11,p12,p21,p22represent start-end points of two vectors in the 3D space (vgVector3<double>).
Returns
A 3x3 rotational matrix (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

Parameters
p1and p1 are 2 points in the 3D space (vgVector3<double>)
Returns
t (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

Parameters
p11,p12,p21,p22represent 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

Parameters
aand b contain the 3D coordinates (vgVector3<double>)
Returns
The angle in RADIANTS (double)
double getAngleDifference ( double  a,
double  b 
) const

Get new angle in [0,2pi).

Calculates the difference between two angles.

Parameters
aand b are angles in radiants (double)
Returns
The angle difference (double)
double getBondAngle ( Atom a1,
Atom a2,
Atom a3 
)
static

Returns the angle between 3 bound Atoms a1 -> a2 -> a3

Parameters
a1,a2and a3 are three Atoms (Atom&)
Returns
The angle (in radiants) between the three atoms (double)
double getBondLength ( Atom a1,
Atom a2 
)
static

Calculate the distance between two Atoms

Parameters
a1,a2are two Atoms (Atom&)
Returns
The distance between the two atoms (double)
double getTorsionAngle ( Atom a1,
Atom a2,
Atom a3,
Atom a4 
)
static

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

Parameters
a1,a2,a3and a4 are Atoms (Atom&)
Returns
The angle (in radiants) (double).
void setBondAngle ( Atom a1,
Atom a2,
Atom a3,
double  angle 
)

Add the rotaional matrix in C given A -> B -> C and an angle.

Parameters
a1,a2and a3 are connected Atoms (Atom&)
angle(double), is the angle between A -> B and B -> C
void setTorsionAngle ( Atom a1,
Atom a2,
Atom a3,
Atom a4,
double  angle 
)

Add the rotaional matrix in C given A -> B -> C -> D and a TORSION angle.

Parameters
a1,a2,a3and 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!

Parameters
atblP(Atom&) = atombondLengthPartner bondLength (const double) atbAP (Atom&) = atombondAnglePartner bondAngle (const double) attAP (Atom&) = atomtorsionAnglePartner tosionAngle (const double) chiral (const int) at (Atom&) = modified atom

The documentation for this class was generated from the following files: