- Perform complex molecular dynamics analyses with intuitive, single-line commands
- Automatically generate slide-ready, publication-quality figures with consistent axes, fonts, and colorbars
- Seamlessly switch between Python API for advanced workflows and CLI for rapid batch processing
- Scalable workflows that handle everything from quick exploratory analysis to large-scale production runs
| Analysis | Description |
|---|---|
rmsd |
Root-Mean-Square Deviation relative to a reference frame |
rmsf |
Per-atom Root-Mean-Square Fluctuation |
rg |
Radius of Gyration for molecular compactness |
hbonds |
Hydrogen bond detection and count using Baker-Hubbard algorithm |
ss |
Secondary Structure assignments using DSSP |
cluster |
Trajectory clustering using KMeans, DBSCAN, and Hierarchical methods |
sasa |
Solvent Accessible Surface Area with total, per-residue, and average per-residue |
dimred |
Dimensionality reduction using PCA, MDS, and t-SNE methods |
We strongly recommend installing FastMDAnalysis in a virtual environment to avoid conflicts with system packages and ensure the fastmda command is available in your PATH.
conda create -n fastmda_env python=3.11conda activate fastmda_envconda install -c conda-forge fastmdanalysisfastmda analyze -hMake sure you have Python 3.9+ installed and available as 'python'.
python -m venv fastmda_env# On Linux/macOS:
source fastmda_env/bin/activate
# Or on Windows:
# fastmda_env\Scripts\activatepip install fastmdanalysisfastmda analyze -hAfter installation, you can run FastMDAnalysis from the command line using the fastmda command. Global options allow you to specify the trajectory and topology file paths.
Optionally, specify frame selection and atom selection. Frame selection is provided as a tuple (start, stop, stride). Negative indices (e.g., -1 for the last frame) are supported. If no options are provided, the entire trajectory and all atoms are used by default.
Run the analyze orchestrator to execute multiple analyses in one go.
Run all available analyses
fastmda analyze -traj path/to/trajectory -top path/to/topologyInclude specific analyses
fastmda analyze -traj traj.dcd -top top.pdb --include rmsd rgExclude specific analyses
fastmda analyze -traj traj.dcd -top top.pdb --exclude sasa dimred clusterSupply options via file (YAML or JSON)
fastmda analyze -traj traj.dcd -top top.pdb --options options.yamlCreate a slide deck from generated figures
fastmda analyze -traj traj.dcd -top top.pdb --slidesGlobal flags:
--frames start,stop,stride(e.g.,0,-1,10)--atoms "MDTraj selection"(e.g.,"protein and name CA")--output DIR(output directory name)--verbose(prints progress and writes logs under<command>_output/unless--outputis set)
Show help:
fastmda -hfastmda analyze -h
Options file (schema)
Provide per-analysis keyword arguments in a single file. CLI and Python API share the same schema:
# options.yaml
rmsd:
ref: 0
cluster:
methods: [kmeans, hierarchical]
n_clusters: 5Slides:
--slidescreatesfastmda_slides_<ddmmyy.HHMM>.pptxin the current working directory.--slides path/to/deck.pptxwrites to an explicit filename.
Instantiate a FastMDAnalysis object with your trajectory and topology file paths.
Run the analyze orchestrator to execute all available analyses.
from fastmdanalysis import FastMDAnalysis
from fastmdanalysis.datasets import TrpCage # optional helper
fastmda = FastMDAnalysis(TrpCage.traj, TrpCage.top)
fastmda.analyze()Include or Exclude specific analyses; specify options, generate slides
fastmda = FastMDAnalysis(TrpCage.traj, TrpCage.top)
result = fastmda.analyze(
include=["rmsd", "rg"], # or exclude=[...]; omit to run all
options={"rmsd": {"ref": 0, "align": True}},
slides=True # or slides="results.pptx"
)Notes
- Figures are saved during each analysis; slide decks include all figures produced in the run.
- MDTraj may emit benign warnings (e.g., dummy CRYST1 records); they do not affect results.
Output includes data tables, figures (already stylized for slides), slide deck, log file ...
- To validate
FastMDAnalysisgo to https://github.com/aai-research-lab/FastMDAnalysis/blob/validation/README.md - For benchmarks go to https://github.com/aai-research-lab/FastMDAnalysis/blob/benchmark/README.md
The documentation [under development] (with an extensive User Guide) is available here.
Contributions are welcome. Please submit a Pull Request.
Development Installation
If you want to contribute or modify the code:
# Clone the repository
git clone https://github.com/aai-research-lab/FastMDAnalysis.git
cd FastMDAnalysis
# Create and activate virtual environment
python -m venv fastmda_env
source fastmda_env/bin/activate # On Windows: fastmda_env\Scripts\activate
# Install in development mode with test dependencies
pip install -e ".[test]"
# Verify installation
fastmda -h
fastmda analyze -hIf you use FastMDAnalysis in your work, please cite:
Aina, A. and Kwan, D. (2025) “FastMDAnalysis: Software for Automated Analysis of Molecular Dynamics Trajectories”. ChemRxiv. https://doi.org/10.26434/chemrxiv-2025-x8xnq
@article{fastmdanalysis,
author = {Adekunle Aina and Derrick Kwan},
title = {FastMDAnalysis: Software for Automated Analysis of Molecular Dynamics Trajectories},
year = {2025},
doi = {10.26434/chemrxiv-2025-x8xnq},
publisher = {ChemRxiv},
url = {https://doi.org/10.26434/chemrxiv-2025-x8xnq},
type = {preprint}
}FastMDAnalysis is licensed under the MIT license.
FastMDAnalysis builds upon excellent open-source libraries to provide its high-performance analysis capabilities and to improve workflow efficiency, usability, and reproducibility in molecular dynamics trajectory analysis. We gratefully acknowledge:
MDTrajfor foundational trajectory I/O and analysis modulesNumPy/SciPyfor efficient numerical computationsscikit-learnfor advanced machine learning algorithmsMatplotlibfor publication-quality visualization
While leveraging these robust tools, FastMDAnalysis streamlines analysis for students, professionals, and researchers, especially those new to molecular dynamics. We thank the scientific Python community for their contributions to the ecosystem.
