Path B - Module 35: Principal Components (PCA) & Axes#
To understand the high-temperature stability of PETase, we need to know how the enzyme vibrates. Does it expand globally or does the active site cleft flap around?
In this module, you will learn to use Principal Components to identify the most significant conformational changes in your engineered industrial enzyme.
import molsysmt as msm
from molsysmt import systems
# Load a sample trajectory of PETase
villin_traj = systems['chicken villin HP35']['traj_chicken_villin_HP35_solvated.dcd']
villin_topo = systems['chicken villin HP35']['chicken_villin_HP35_solvated.h5msm']
molsys = [villin_topo, villin_traj]
1. Principal Axes and Orientation#
Identifying the orientation of your enzyme is the first step for docking or surface analysis. MolSysMT can find the long, medium, and short axes of your model.
# Get the principal axes of the protein
axes, moments = msm.structure.get_principal_axes(
molsys, selection='molecule_type=="protein"', structure_indices=0, weights='masses'
)
print("Principal Axes (Eigenvectors):")
print(axes)
print("Principal moments:", moments)
2. PCA: Dimensionality Reduction#
PCA represents collective modes as covariance eigenvectors. MolSysMT returns the dimensionless eigenvectors and their squared-coordinate eigenvalues from largest to smallest; it does not return per-frame projections.
# Calculate the first two principal components
eigenvectors, eigenvalues = msm.structure.principal_component_analysis(molsys, selection='atom_name=="CA"')
print(f"PC1 eigenvector: {eigenvectors[0]}")
print(f"Variance capture by PC1: {eigenvalues[0]:.2f}")
3. Interpreting Essential Modes#
The leading eigenvectors identify the collective coordinate directions with the largest fluctuations. Per-frame projection onto those modes is a separate operation and is not returned by this function.
🏆 Path B Challenge: The Motion Analyst#
Calculate the Principal Axes for the BHET substrate we built in Module 28.
Perform a PCA on only the active site residues of the PETase.
Does the first PC explain more than 50% of the variance?
Align the system so its long inertia axis points towards Z using
msm.structure.align_principal_axes(..., axes=[[0,0,1],[0,1,0],[-1,0,0]], weights='masses'). Do not confuse a static principal inertia axis with a trajectory PCA component.
Dynamics define efficiency. In Module 36, we will check the Secondary Structure to ensure our mutations didn’t break the enzyme’s fold.