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.
- Returns:
The calculated angle between -pi and +pi.
- Return type:
- 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.
- Returns:
The calculated angle between -pi and +pi.
- Return type:
See also
dihedral
Calculate a dihedral angle.
- vermouth.geometry.distance_matrix(coordinates_a, coordinates_b)[source]¶
Compute a distance matrix between two set of points.
Notes
This function does not account for periodic boundary conditions.
- Parameters:
coordinates_a (numpy.ndarray) – Coordinates of the points in the selections. Each row must correspond to a point and each column to a dimension.
coordinates_b (numpy.ndarray) – Coordinates of the points in the selections. Each row must correspond to a point and each column to a dimension.
- Returns:
Rows correspond to the points from coordinates_a, columns correspond from coordinates_b.
- Return type: