4.4.7. propka.vector_algebra¶
4.4.7.1. Vector calculations¶
Vector algebra for PROPKA.
Functions
|
Get the angle between two vectors. |
|
Get the angle between two vectors in degrees. |
|
Get rotation matrix for y-axis. |
|
Get rotation matrix for z-axis. |
|
Rotate a multi-vector around an axis. |
|
Rotate vector around an axis. |
|
Get signed angle of two vectors around axis in radians. |
Classes
|
A 4-by-4 matrix class. |
|
Collection of vectors for multiple configurations of atoms. |
|
-
class
propka.vector_algebra.
Matrix4x4
(a11i=0.0, a12i=0.0, a13i=0.0, a14i=0.0, a21i=0.0, a22i=0.0, a23i=0.0, a24i=0.0, a31i=0.0, a32i=0.0, a33i=0.0, a34i=0.0, a41i=0.0, a42i=0.0, a43i=0.0, a44i=0.0)[source]¶ A 4-by-4 matrix class.
-
class
propka.vector_algebra.
MultiVector
(atom1=None, atom2=None)[source]¶ Collection of vectors for multiple configurations of atoms.
TODO - this class does not appear to be used or covered by tests
-
do_job
(job)[source]¶ Append vectors to configuration.
- Parameters
job – name of function to apply to vectors
- Returns
TODO - figure out what this is
-
generic_operation
(operation, other)[source]¶ Perform a generic operation between two MultiVector objects.
- Parameters
operation – operation to perform (string)
other – other MultiVector object
-
property
get_result
¶ Return the latest result.
-
-
propka.vector_algebra.
angle
(avec, bvec)[source]¶ Get the angle between two vectors.
- Parameters
avec – vector 1
bvec – vector 2
- Returns
angle in radians
-
propka.vector_algebra.
angle_degrees
(avec, bvec)[source]¶ Get the angle between two vectors in degrees.
- Parameters
avec – vector 1
bvec – vector 2
- Returns
angle in degrees
-
propka.vector_algebra.
rotate_atoms_around_y_axis
(theta)[source]¶ Get rotation matrix for y-axis.
- Parameters
theta – angle of rotation (radians)
- Returns
rotation matrix
-
propka.vector_algebra.
rotate_atoms_around_z_axis
(theta)[source]¶ Get rotation matrix for z-axis.
- Parameters
theta – angle of rotation (radians)
- Returns
rotation matrix
-
propka.vector_algebra.
rotate_multi_vector_around_an_axis
(theta, axis, vec)[source]¶ Rotate a multi-vector around an axis.
NOTE - both axis ans v must be MultiVectors.
- Parameters
theta – angle (in radians)
axis – multi-vector axis
vec – multi-vector vector