Skip to content

LincolmAguiar/QuickPCA

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’  QuickPCA: welcome to the universe of eigenvectors!

QuickPCA Logo

QuickPCA is a lightweight Python tool for Essential Dynamics Analysis of molecular dynamics trajectories in PyMOL. It automatically detects and loads MD trajectories, performs Principal Component Analysis, and generates a publication-ready report featuring free-energy landscapes, residue cross-correlation maps, explained variance profiles and principal component projections.

Molecular dynamics trajectories have a massive amount of data. If your protein has 1,000 atoms, each frame has 3,000 coordinates (X, Y, Z). If you have 10,000 frames, that is 30 million data points! PCA analyzes this massive dataset and reduces the dimensions. It figures out which atomic movements are just random "noise" and which are the "signals" capturing functional-relevant motions. This algorithm compresses thousands of dimensions down into just two (PC1 and PC2) while preserving the most important information.

Unlike common PCA approaches, which construct and diagonalize the covariance matrix, quickPCA performs SVD decomposition using scikit-learn directly on the (n_frames ร— 3N) data matrix. This avoids the costly step of diagonalizing the covariance matrix, making the approach faster and more numerically stable, while producing identical principal components. The residue cross-correlation matrix is subsequently recovered analytically from the PCA eigenvectors and eigenvalues, without revisiting the raw trajectory data.

๐Ÿ‘ค Author

This code was developed by Gleb Novikov

๐Ÿ”ญ Features

  • Structural alignment using the Kabsch algorithm
  • Principal Component Analysis (Essential Dynamics)
  • Free-Energy Landscape (PC1 vs PC2)
  • Residue cross-correlation matrix
  • Explained variance analysis
  • PC projection distributions
  • Automated report generation

๐Ÿ› ๏ธ Requirements

  • PyMOL
  • NumPy
  • SciPy
  • scikit-learn
  • Matplotlib
pip install numpy scipy scikit-learn matplotlib

โšœ๏ธ Usage

  1. Place quickPCA.py in the same directory as your PDB and trajectory files.
  2. Open your structure in PyMOL.
  3. Drag and drop quickPCA.py into the PyMOL window.

Supported trajectory formats:

.xtc  .trr  .dcd  .nc

โš™๏ธ Output

QuickPCA generates:

  • PCA_Report.png

The report includes:

  • Free-Energy Landscape
  • Residue Cross-Correlation Matrix
  • Explained Variance Plot
  • PC1/PC2 Projection Distributions

โš–๏ธ License

Released under the MIT License. If QuickPCA is used in any capacity that contributes to results presented in a publication, thesis, report, or any other form of scholarly or professional work, appropriate citation of QuickPCA is strongly encouraged.

About

๐Ÿ’  A streamlined worfklow for Principal Component Analysis of molecular dynamics in PyMOL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%