# vermouth.geometry module¶

Geometric operations.

vermouth.geometry.angle(vector_ba, vector_bc)[source]

Calculate the angle in radians between two vectors.

The function assumes the following situation:

  B
/ \
A   C


It returns the angle between BA and BC.

vermouth.geometry.dihedral(coordinates)[source]

Calculate the dihedral angle in radians.

Parameters: coordinates (numpy.ndarray) – The coordinates of 4 points defining the dihedral angle. Each row corresponds to a point, and each column to a dimension. The calculated angle between -pi and +pi. float
vermouth.geometry.dihedral_phase(coordinates)[source]

Calculate a dihedral angle in radians with a -pi phase correction.

Parameters: coordinates (numpy.ndarray) – The coordinates of 4 points defining the dihedral angle. Each row corresponds to a point, and each column to a dimension. The calculated angle between -pi and +pi. float

dihedral()
vermouth.geometry.distance_matrix(coordinates_a, coordinates_b)[source]