Use pyRMSD Online
Commercially Available pyRMSD No-Code Web Server
pyRMSD: Fast Pairwise RMSD Matrix Calculation for Structural Ensembles and MD Trajectories
pyRMSD is an open source standalone Python package for efficient pairwise Root Mean Square Deviation (RMSD) matrix calculation and handling across large sets of structures. It was developed by Victor A. Gil and Victor Guallar at the Barcelona Supercomputing Center (Joint BSC-IRB Research Program in Computational Biology), with ICREA, and published as an Application Note in Bioinformatics in 2013. The source code is released under the MIT license.
As molecular modeling grows, computing the RMSD with optimum superposition for a large set of structures quickly becomes a necessity. Clustering methods used for trajectory analysis and compression, such as spectral clustering, can benefit from a precomputed pairwise distance matrix or depend on it entirely, and as simulations grow, building that matrix becomes the bottleneck.
The authors note that RMSD code is scattered across many languages and packages, so developers must either adopt an external library or wrap a larger tool, with the problems of fragmentation, missing features and poor documentation. pyRMSD focuses solely on RMSD and is tuned for collective calculations.
Property | Detail |
|---|---|
Purpose | RMSD with optimal superposition, especially pairwise RMSD matrices |
Algorithms | Kabsch, QTRFIT and Quaternion Characteristic Polynomial (QCP) |
Parallelism | Serial and OpenMP versions; CUDA version for QCP |
Matrix storage | CondensedMatrix keeps only the upper triangle, halving memory |
License | MIT |
How pyRMSD Computes RMSD Matrices Efficiently
The package is built around two main classes plus two helpers.
RMSDCalculator: a simple interface to the three superposition algorithms, implemented as Python C extensions.
CondensedMatrix: a symmetric matrix class written in C that stores only the upper triangle, saving half the memory while allowing regular row and column access.
Reader: a fast C-written PDB reader that obtains coordinate sets.
MatrixHandler: builds a distance matrix from coordinates and manages saving and loading matrices from disk.
Supported RMSD Calculation Scenarios
Pairwise RMSD between two conformations.
Reference versus the rest of the set.
Reference versus following conformations.
Pairwise RMSD matrix of the whole set.
Iterative superposition of a set of conformations.
Users can also modify input coordinates to obtain superposed conformations, or use different coordinate sets for superposition and RMSD calculation.
pyRMSD Performance and Speedups
In all scenarios the authors studied, QCP was the fastest of the three algorithms. Using a trajectory of ubiquitin alpha carbons on a 6-core Intel Xeon E5649 CPU with an NVIDIA M2090 GPU, they compared four QCP implementations.
QCP implementation | Speedup vs serial |
|---|---|
Serial | 1x (baseline) |
OpenMP | About 5x |
CUDA | Up to about 11x (almost 12 million RMSD calculations per second) |
The C-based CondensedMatrix gives access times up to 6x faster than its Python counterpart, and the authors report a cardinality-function benchmark running about 100x faster just by using it.
What is Tamarind Bio?
Tamarind Bio is a no-code bioinformatics platform built to give life scientists and researchers access to powerful computational tools. Many cutting-edge machine learning models are hard to deploy and use. Tamarind provides an intuitive, web-based environment that removes the complexity of high-performance computing, software dependencies and command-line interfaces.
The platform is designed for biologists, chemists and other researchers who may not have a background in programming or cloud infrastructure but want to run models on their own data. Key features include:
A user-friendly graphical interface for setting up and launching experiments
A robust API for integration into existing research pipelines
An automated system for managing and scaling computational resources
Tamarind treats information and data security as a top priority, as detailed in its Trust Center and Terms of Service.
Accelerating Discovery with pyRMSD on Tamarind Bio
Conformational clustering: build pairwise RMSD matrices as input to clustering of structural ensembles or trajectories.
Trajectory analysis: compare frames of molecular dynamics simulations against a reference or against each other.
Model comparison: measure how closely sets of predicted structures agree after optimal superposition.
Algorithm development: use the documented, tested package as a workbench for new superposition methods.
How to Use pyRMSD on Tamarind Bio
Log in and open the tool: sign in at tamarind.bio and select pyRMSD.
Provide structures: upload the set of conformations, such as a multi-model or trajectory PDB file, as the tool accepts them.
Select atoms: if exposed, choose the coordinate subset, for example only alpha carbons as in the authors' example.
Choose the calculation: if exposed, pick pairwise matrix, reference versus rest, or another supported mode, and the superposition algorithm (QCP is the fastest).
Run the job: submit and wait for the calculation to finish.
Download the matrix: retrieve the RMSD values, if exposed.
Interpret and reuse: look for low-RMSD groups of conformations and feed the matrix into clustering workflows.
Things to Keep in Mind
The benchmarks reported were on a specific CPU and GPU, so speedups depend on hardware.
The CUDA version is implemented for QCP only; Kabsch and QTRFIT have serial and OpenMP versions.
RMSD requires matching atom sets across structures and depends on the chosen coordinate subset.
Source: Gil V. A., Guallar V. "pyRMSD: a Python package for efficient pairwise RMSD matrix calculation and handling." Bioinformatics 29(18), 2363-2364 (2013). DOI: 10.1093/bioinformatics/btt402. Source code listed at https://pele.bsc.es/ (tools section).