geometry
#
Common functions for computing the internal coordinates (e.g. bond lengths).
Functions:
-
compute_bond_vectors–Computes the vectors between each atom pair specified by the
idxsas -
compute_distances–Computes the distances between each pair of coordinates.
-
compute_angles–Computes the angles [rad] between each specified triplet of indices.
-
compute_dihedrals–Computes the angles [rad] between each specified quartet of indices.
compute_bond_vectors
#
Computes the vectors between each atom pair specified by the idxs as
well as their norms.
Parameters:
-
coords(ndarray) –The coordinates with
shape=(n_coords, 3). -
idxs(ndarray) –The indices of the coordinates to compute the distances between with
shape=(n_pairs, 2).
Returns:
-
tuple[ndarray, ndarray]–A tuple of the vectors with shape=
shape=(n_pairs, 3)and norms withshape=(n_pairs,).
Source code in femto/md/utils/geometry.py
compute_distances
#
Computes the distances between each pair of coordinates.
Parameters:
-
coords(ndarray) –The coordinates with
shape=(n_coords, 3). -
idxs(ndarray) –The indices of the coordinates to compute the distances between with
shape=(n_pairs, 2).
Returns:
-
ndarray–The distances with
shape=(n_pairs,).
Source code in femto/md/utils/geometry.py
compute_angles
#
Computes the angles [rad] between each specified triplet of indices.
Parameters:
-
coords(ndarray) –The coordinates with
shape=(n_coords, 3)orshape=(n_frames, n_coords, 3). -
idxs(ndarray) –The indices of the coordinates to compute the angles between with
shape=(n_pairs, 3).
Returns:
-
ndarray–The angles with
shape=(n_pairs,)orshape=(n_frames, n_pairs).
Source code in femto/md/utils/geometry.py
compute_dihedrals
#
Computes the angles [rad] between each specified quartet of indices.
Parameters:
-
coords(ndarray) –The coordinates with
shape=(n_coords, 3)orshape=(n_frames, n_coords, 3). -
idxs(ndarray) –The indices of the coordinates to compute the dihedrals between with
shape=(n_pairs, 4).
Returns:
-
ndarray–The dihedrals with
shape=(n_pairs,)orshape=(n_frames, n_pairs).