Skip to main content

Python RMSD tool with symmetry correction.

Project description


Travis Build Status Build status flake8 mypy codecov Language grade: Python

Docs Documentation Status

License PyPI Conda Version

J. Cheminform. Zenodo

Python tool for symmetry-corrected RMSD calculations.

If you find spyrmsd useful, please consider citing the following paper:

  Author = {Meli, Rocco and Biggin, Philip C.},
  Journal = {Journal of Cheminformatics},
  Number = {1},
  Pages = {49},
  Title = {spyrmsd: symmetry-corrected RMSD calculations in Python},
  Volume = {12},
  Year = {2020}


spyrmsd is available on PyPI and conda-forge and can be easily installed from source. See Dependencies for a description of all the dependencies.

Note: spyrmsd will install NetworkX (multi-platform). You can install graph-tool on macOS and Linux for higher performance.


pip install spyrmsd


conda install spyrmsd -c conda-forge


git clone
cd spyrmsd
pip install .


spyrmsd can be used both as a module or as a standalone tool.


The following packages are required to use spyrmsd as a module:

Note: spyrmsd uses graph-tool by default but will fall back to NetworkX if the former is not installed (e.g. on Windows). However, in order to support cross-platform installation NetworkX is installed by default.

Standalone Tool

Additionally, one of the following packages is required to use spyrmsd as a standalone tool:

Note: RDKit is not available on PyPI (Why the RDKit isn't available on PyPi). See RDKit Installation for installation instructions.



python -m spyrmsd.spyrmsd -h
usage: [-h] [-m] [-c] [--hydrogens] [-n] reference molecules [molecules ...]

Python RMSD tool.

positional arguments:
  reference       Reference file
  molecules       Input file(s)

optional arguments:
  -h, --help      show this help message and exit
  -m, --minimize  Minimize (fit)
  -c, --center    Center molecules at origin
  --hydrogens     Keep hydrogen atoms
  -n, --nosymm    No graph isomorphism


from spyrmsd import rmsd


The function rmsd.rmsd computes RMSD without symmetry correction. The atoms are expected to be in the same order for both molecules being compared (no atom matching is performed).

Symmetry-Corrected RMSD

The function rmsd.symmrmsd computes symmetry-corrected RMSD using molecular graph isomorphisms. Symmetry correction requires molecular adjacency matrices describing the connectivity but needs not the atoms to be in the same order.

Atom matching is performed according to the molecular graph. Therefore, this function should be used when atoms in the molecules being compared are not in the same order (even if there is not symmetry).


To ensure code quality and consistency the following tools are used during development:


Copyright (c) 2019-2020, Rocco Meli.


References are tracked with duecredit. Run the script in order to print up-to-date references.


Project based on the Computational Molecular Science Python Cookiecutter version 1.1.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spyrmsd, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size spyrmsd-0.4.0-py3-none-any.whl (28.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size spyrmsd-0.4.0.tar.gz (224.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page