Path A - Module 33: Ensemble Descriptors (Global Metrics)#
Beyond individual atoms, you need to understand the behavior of the whole molecular assembly. Is your peptide making the fibril more compact or more extended? Which residues are the most flexible?
In this module, you will learn to calculate global physical descriptors using MolSysMT.
import molsysmt as msm
from molsysmt import systems
# Load our complex
fibril = msm.convert('pdb:2BEG', to_form='molsysmt.MolSys')
peptide = msm.build.build_peptide('KLVFF')
molsys = msm.merge([fibril, peptide])
1. Radius of Gyration (RG)#
The Radius of Gyration measures how compact a molecule is. A high RG means the system is extended; a low RG means it is tightly folded.
# Measure RG of the peptide vs the whole complex
rg_peptide = msm.structure.get_radius_of_gyration(molsys, selection='molecule_type=="peptide"')
rg_complex = msm.structure.get_radius_of_gyration(molsys)
print(f"Peptide RG: {rg_peptide}")
print(f"Complex RG: {rg_complex}")
2. Center of Mass vs Geometric Center#
MolSysMT can calculate centers using uniform weight (geometric) or mass-weight (physical center of mass).
# Geometric center
center_geom = msm.structure.get_center(molsys, selection='molecule_type=="peptide"')
# Center of mass (requires mass information)
center_mass = msm.structure.get_center(molsys, selection='molecule_type=="peptide"', weights='masses')
print(f"Geometric Center: {center_geom}")
print(f"Center of Mass: {center_mass}")
3. Flexibility Analysis: RMSF#
The Root Mean Square Fluctuation (RMSF) tells you how much each residue moves compared to the average. Higher values mean higher flexibility (often in loops or terminals).
# Let's use a trajectory of the Villin Headpiece to see real fluctuations
villin_traj = systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.dcd']
villin_topo = systems['chicken villin HP35']['chicken_villin_HP35_solvated.h5msm']
rmsf = msm.structure.get_rmsf([villin_topo, villin_traj], selection='molecule_type=="protein"')
print(f"Computed RMSF for {len(rmsf)} atoms.")
print(f"Average RMSF: {rmsf.mean()}")
🏆 Path A Challenge: The Stability Auditor#
Take the Villin trajectory system.
Calculate the Radius of Gyration for every frame of the trajectory. Hint: The output will be a list of values.
Check if the RG increases or decreases over time (is the protein unfolding?).
Calculate the Center of Mass of the first and last frame and measure the total displacement.
Global metrics give you a bird’s eye view of your system’s dynamics. In Module 34, we will learn how to Align and Superimpose systems to measure structural similarity (RMSD).