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, numpy.ndarray | None]
Aligns a single frame
from_xyzto another frameto_xyzusing 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_erris True, otherwise returnsNone.
- Raises:
ValueError – If the arrays differ in the number of coordinates N.