cgsmiles.linalg_functions module

cgsmiles.linalg_functions.dihedral_angle_between(a1, a2, a3, a4)[source]

Compute dihedral angle between planes (a1, a2, a3) and (a2, a3, a4).

cgsmiles.linalg_functions.rotate(positions, angle, origin=array([0, 0]))[source]

Rotate positions by angle in 2D about the origin. The angle is given in radians.

cgsmiles.linalg_functions.rotate_degrees(position, angle, origin=array([0, 0]))[source]

Wrapper for rotating about the origin but with angle given in degrees.

cgsmiles.linalg_functions.rotate_to_axis(positions, align_with)[source]

Rotate position array to aling with one of the principle axis or the diagonal.

cgsmiles.linalg_functions.u_vect(vect)[source]

Compute unit vector of vector.

Parameters:

vect (numpy.ndarray)

Return type:

numpy.ndarray

cgsmiles.linalg_functions.vector_angle_degrees(v1, v2)[source]

Compute the angle between two vectors in degrees and between 0 180 degrees.

Parameters:
Returns:

angle in degrees

Return type:

float