mdlearn.data.preprocess.align.kabsch_align

Functions

kabsch(to_xyz, from_xyz[, return_err])

Aligns a single frame from_xyz to another frame to_xyz using the kabsch method.

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 frame to_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 returns None.

Raises

ValueError – If the arrays differ in the number of coordinates N.