Skip to content

Compute

get_backbone_rmsd(atoms_ref, subpex_config, atoms_frame, *args, **kwargs)

Compute the Root Mean Square Deviation (RMSD) of the backbone atoms between two molecular dynamics frames after alignment.

This function aligns the backbone atoms of the current frame to a reference frame and then calculates the RMSD between the aligned structures. It uses the MDAnalysis library for alignment and the get_rmsd function for RMSD calculation.

PARAMETER DESCRIPTION
atoms_ref

An MDAnalysis AtomGroup object representing the reference structure.

TYPE: AtomGroup

atoms_frame

An MDAnalysis AtomGroup object representing the current frame to be aligned and compared.

TYPE: AtomGroup

RETURNS DESCRIPTION
float

The RMSD value between the backbone atoms of the reference and current frame.

TYPE: float

Example

import MDAnalysis as mda u = mda.Universe('topology.psf', 'trajectory.dcd') ref = mda.Universe('reference.pdb') rmsd = get_backbone_rmsd(ref, u) print(f"Backbone RMSD: {rmsd:.2f}")