Spatial
Useful utilities involving field of points.
calculate_distance_two_points(point1, point2)
¶
get_centroid(fop_pocket)
¶
get_rmsd(R, R_ref)
¶
Compute the Root Mean Square Deviation (RMSD) between two sets of atomic coordinates.
RMSD is a measure of the average distance between atoms of two superimposed sets of coordinates. This function calculates RMSD without any alignment or fitting of the structures, assuming that the input arrays are already aligned.
PARAMETER | DESCRIPTION |
---|---|
R |
A 2D array of shape (N, 3) representing the atomic coordinates. Each row corresponds to the coordinates of one atom.
TYPE:
|
R_ref |
A 2D array of shape (N, 3) representing the reference atomic coordinates. Each row corresponds to the coordinates of one atom.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
The RMSD value between the two sets of atomic coordinates.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
If the input arrays R and R_ref do not have the same shape. |
Example
R = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) R_ref = np.array([[1.1, 2.1, 3.1], [4.1, 5.1, 6.1]]) get_rmsd(R, R_ref) 0.1