Quickstart
This guide walks you through your first trajectory analysis with warp-md. You’ll learn both the Python API and CLI approaches.Make sure you’ve installed warp-md before starting this tutorial.
Python API: Radius of Gyration
Let’s calculate the radius of gyration for a protein trajectory. This is one of the most common analyses in molecular dynamics.The Complete Example
Breaking It Down
Load the topology
System object contains atomic coordinates, topology information, and provides selection capabilities.Create a selection
"protein"- all protein atoms"resname SOL"- water molecules"name CA"- alpha carbons"resid 1-10 and name CA"- CA atoms in residues 1-10
Open the trajectory
Trajectory object provides lazy iteration over frames. warp-md supports XTC, PDB, and other formats.Run the analysis
.run(). The device="auto" parameter enables GPU acceleration if available.GPU Acceleration
To explicitly use GPU acceleration (if compiled with CUDA support):CLI: Radial Distribution Function
The command-line interface is perfect for quick analyses and scripting. Let’s calculate the oxygen-oxygen radial distribution function for water.Basic Command
Available Plans
List all 98+ available analysis plans:Configuration Files
For complex workflows or reproducible analyses, use JSON or YAML configuration files.Generate Example Config
Edit and Run
Editconfig.json to match your system and trajectory:
Molecular Packing Example
Create a water box with 200 TIP3P molecules:Available Water Models
warp-md includes pre-defined water models:tip3p- TIP3P water modeltip4p- TIP4P water modelspce- SPC/E water model- And more…
Complex Packing
Pack multiple structure types with constraints:Common Analysis Patterns
RMSD with Alignment
Hydrogen Bonds
PCA for Conformational Analysis
Next Steps
API Reference
Explore all 98+ analysis plans and their parameters
CLI Reference
Complete command-line interface documentation
Packing Guide
Advanced molecular packing workflows
Peptide Builder
Build and manipulate peptide structures