openfe_analysis.transformations

Transformations

Many on-the-fly transformations which are used to manipulate trajectories as they are read. This allows a trajectory to avoid periodic-boundary issues and to automatically align the system to a protein structure.

Classes

Aligner(*args, **kwargs)

Align a trajectory to a reference AtomGroup by minimizing RMSD.

ClosestImageShift(*args, **kwargs)

PBC-safe transformation that shifts one or more target AtomGroups so that their COM is in the closest image relative to a reference AtomGroup.

NoJump(*args, **kwargs)

Prevent an AtomGroup from jumping between periodic images.

class openfe_analysis.transformations.NoJump(*args: Any, **kwargs: Any)

Prevent an AtomGroup from jumping between periodic images. This transformation removes large apparent COM displacements caused by periodic boundary conditions.

Parameters:

ag (MDAnalysis.AtomGroup) – AtomGroup whose center-of-mass motion should be made continuous.

Notes

  • This transformation assumes an orthorhombic unit cell.

  • Only translations are applied; no rotations or scaling.

  • The correction is based on center-of-mass motion and is therefore most appropriate for compact groups (e.g. proteins, ligands).

  • Must be applied before any alignment transformations to avoid mixing reference frames.

  • Is intended to be applied before analyses that rely on smooth time evolution (e.g. RMSD, COM motion).

ag: MDAnalysis.AtomGroup
prev: ndarray[tuple[Any, ...], dtype[_ScalarT]]
class openfe_analysis.transformations.ClosestImageShift(*args: Any, **kwargs: Any)

PBC-safe transformation that shifts one or more target AtomGroups so that their COM is in the closest image relative to a reference AtomGroup.

CAVEAT: This Transformation requires the AtomGroups to be unwrapped!

Notes

class openfe_analysis.transformations.Aligner(*args: Any, **kwargs: Any)

Align a trajectory to a reference AtomGroup by minimizing RMSD.

Notes

Performs an on-the-fly least-squares alignment of the entire universe to a reference AtomGroup. At each frame, the coordinates are translated and rotated to minimize the RMSD of the atoms relative to their positions in the reference.

ref_idx: ndarray[tuple[Any, ...], dtype[_ScalarT]]
ref_pos: ndarray[tuple[Any, ...], dtype[_ScalarT]]
weights: ndarray[tuple[Any, ...], dtype[_ScalarT]]