![]() |
Rosetta
2015.38
|
Functions | |
def | toDeg |
def | toRad |
def | dist_sq |
def | dist |
def | coord_angle |
def | torsion |
def | makeVector |
def | vabs |
def | vunit |
def | vmult |
def | vadd |
def | vavg |
def | rss |
def | dot |
def | cross |
def | stp |
def | vangle |
def coordlib.coord_angle | ( | atom1, | |
atom2, | |||
atom3 | |||
) |
A = [xA, yA, zA], and B and C are defined in the same fashion. Given these 3 coordinates, returns the angle between the AB and BC bond vectors.
References makeVector(), toDeg(), and vangle().
def coordlib.cross | ( | v1, | |
v2 | |||
) |
cross(v1, v2) - returns the cross product of two vectors This function evaluates the cross product between two cartesian vectors in 3d. For v1 = [x1, y1, z1], v2 = [x2, y2, z2], and cartesian unit vectors i, j, and k, this is defined as the determinant of the following matrix: | i j k | | x1 y1 z1 | | x2 y2 z2 | More simply, cross([x1, y1, z1], [x2, y2, z2]) ==> [y1*z2 - z1*y2, z1*x2 - x1*z2, x1*y2 - y1*x2] It can also be shown that -- |cross(v1, v2)| == |v1| * |v2| * sin(theta) Where theta is the angle between the two vectors.
def coordlib.dist | ( | atom1, | |
atom2 | |||
) |
References dist_sq().
Referenced by ScoreFragmentSetMover.clash_score(), ScoreFragmentSetMover.closability_score(), numeric::AverageLinkClusterer.comparator(), numeric::kdtree::KDPoint.distance(), numeric::geometry::hashing::SixDCoordinateBinner.halfbin6(), ScoreFragmentSetMover.overlap_score(), numeric::kdtree.sq_vec_distance(), and numeric::kinematic_closure.test_eucDistance().
def coordlib.dist_sq | ( | atom1, | |
atom2 | |||
) |
def coordlib.dot | ( | v1, | |
v2 | |||
) |
dot(v1, v2) - return the inner (dot) product of two vectors This function evaluates the dot product between two vectors, defined as the following: dot([x1, y1, z1], [x2, y2, z2]) ==> x1*x2 + y1*y2 + z1*z2 It can be shown that this is also equal to: dot(v1, v2) ==> |v1| * |v2| * cos(theta) Where theta is the angle between the vectors.
def coordlib.makeVector | ( | atom1, | |
atom2 | |||
) |
vector(atom1, atom2) - return the mathematical vector from A to B Given two points, A and B, this function returns the vector going from point A to point B, represented as a list of cartesian components. A and be must be lists of coordinates in x, y, and z. That is: vector([x1, y1, z1], [x2, y2, z2]) ==> [x2-x1, y2-y1, z2-z1]
Referenced by coord_angle(), and torsion().
def coordlib.rss | ( | v1, | |
v2 | |||
) |
gets the root sum of squares for two vectors (the distance between)
References ObjexxFCL.len().
def coordlib.stp | ( | v1, | |
v2, | |||
v3 | |||
) |
stp(v1, v2, v3) - return the scalar triple product of three vectors This function will return the scalar triple product of three vectors, defined most simply as dot(v3, cross(v1, v2)). It can be shown that |stp(v1, v2, v3)| is the volume of the parallelpiped with sides defined by the vectors. It follows that the following relationships apply: stp(v1, v2, v3) == stp(v2, v3, v1) == stp(v3, v1, v2)
References cross(), and dot().
Referenced by torsion().
def coordlib.toDeg | ( | ang | ) |
toDeg(ang) - converts an angle in radians to an angle in degrees
Referenced by coord_angle(), and torsion().
def coordlib.toRad | ( | ang | ) |
toRad(ang) - converts an angle in degrees to an angle in radians
def coordlib.torsion | ( | A, | |
B, | |||
C, | |||
D | |||
) |
References cross(), makeVector(), stp(), toDeg(), and vangle().
def coordlib.vabs | ( | vec | ) |
def coordlib.vadd | ( | v1, | |
v2 | |||
) |
References ObjexxFCL.len().
Referenced by vavg().
def coordlib.vangle | ( | v1, | |
v2 | |||
) |
vangle(v1, v2) - returns the angle (in radians) between two vectors If v1 and v2 are two vectors, this function uses the cosine relationship given above (in dot) to determine the angle between those vectors when one vector is projected on the plane of the other. Note that this value can only be the range of the arccos function, so theta will be in the range 0 to Pi.
Referenced by coord_angle(), and torsion().
def coordlib.vavg | ( | vlist | ) |
References ObjexxFCL.len(), vadd(), and vmult().
Referenced by loadPDB.calcCAcentroid(), and loadPDB.getCentroid().