mdlearn.data.preprocess.align.kabsch_align
Functions
|
Aligns a single frame |
- mdlearn.data.preprocess.align.kabsch_align.kabsch(to_xyz: numpy.ndarray, from_xyz: numpy.ndarray, return_err: bool = True) Tuple[float, numpy.ndarray, Optional[numpy.ndarray]]
Aligns a single frame
from_xyz
to another frameto_xyz
using the kabsch method.- Parameters
to_xyz (np.ndarray) – 3 x N array of coordinates to align to.
from_xyz (np.ndarray) – A 3 x N array of coordinates to align.
return_err (bool, default=True) – Will return the errors.
- Returns
e_rmsd (float) – The root mean squared deviation (RMSD).
new_xyz (np.ndarray) – The newly aligned coordinates with the same shape as
fromXYZ
.err (Optional[np.ndarray]) – Returns the raw error values if
return_err
is True, otherwise returnsNone
.
- Raises
ValueError – If the arrays differ in the number of coordinates N.