All Projects → charnley → Rmsd

charnley / Rmsd

Licence: bsd-2-clause
Calculate Root-mean-square deviation (RMSD) of two molecules, using rotation, in xyz or pdb format

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rmsd

VSCoding-Sequence
VSCode Extension for interactively visualising protein structure data in the editor
Stars: ✭ 41 (-80.93%)
Mutual labels:  pdb, structure, molecule
cath-tools
Protein structure comparison tools such as SSAP and SNAP
Stars: ✭ 40 (-81.4%)
Mutual labels:  pdb, structure, alignment
Version3-1
Version 2020 (3.1) of Chem4Word - A Chemistry Add-In for Microsoft Word
Stars: ✭ 14 (-93.49%)
Mutual labels:  structure, molecule
Version3
Version 3 of Chem4Word - A Chemistry Add-In for Microsoft Word
Stars: ✭ 53 (-75.35%)
Mutual labels:  structure, molecule
Biopandas
Working with molecular structures in pandas DataFrames
Stars: ✭ 329 (+53.02%)
Mutual labels:  molecule, pdb
Ilspy
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
Stars: ✭ 14,011 (+6416.74%)
Mutual labels:  pdb
Dgl Lifesci
Python package for graph neural networks in chemistry and biology
Stars: ✭ 194 (-9.77%)
Mutual labels:  molecule
Biosyntax
Syntax highlighting for computational biology
Stars: ✭ 164 (-23.72%)
Mutual labels:  pdb
Kekule.js
A Javascript cheminformatics toolkit.
Stars: ✭ 156 (-27.44%)
Mutual labels:  molecule
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (+0%)
Mutual labels:  alignment
Blog
大前端技术为主,读书笔记、随笔、理财为辅,做个终身学习者。
Stars: ✭ 3,179 (+1378.6%)
Mutual labels:  structure
L5modular
Generates and handles Modules for Laravel
Stars: ✭ 188 (-12.56%)
Mutual labels:  structure
Pdb Cheatsheet
A cheatsheet for the Python Debugger (pdb)
Stars: ✭ 171 (-20.47%)
Mutual labels:  pdb
Mtcnn Accelerate Onet
MTCNN Face Detection & Alignment
Stars: ✭ 203 (-5.58%)
Mutual labels:  alignment
Pudb
Full-screen console debugger for Python
Stars: ✭ 2,267 (+954.42%)
Mutual labels:  pdb
Smartsystemmenu
SmartSystemMenu extends system menu of all windows in the system
Stars: ✭ 209 (-2.79%)
Mutual labels:  alignment
Jstarcraft Ai
目标是提供一个完整的Java机器学习(Machine Learning/ML)框架,作为人工智能在学术界与工业界的桥梁. 让相关领域的研发人员能够在各种软硬件环境/数据结构/算法/模型之间无缝切换. 涵盖了从数据处理到模型的训练与评估各个环节,支持硬件加速和并行计算,是最快最全的Java机器学习库.
Stars: ✭ 160 (-25.58%)
Mutual labels:  structure
Python Remote Pdb
Remote vanilla PDB (over TCP sockets).
Stars: ✭ 186 (-13.49%)
Mutual labels:  pdb
Ducible
A tool to make Windows builds reproducible.
Stars: ✭ 211 (-1.86%)
Mutual labels:  pdb
Fakepdb
Tool for PDB generation from IDA Pro database
Stars: ✭ 186 (-13.49%)
Mutual labels:  pdb

Calculate Root-mean-square deviation (RMSD) of Two Molecules Using Rotation

The root-mean-square deviation (RMSD) is calculated, using Kabsch algorithm (1976) or Quaternion algorithm (1991) for rotation, between two Cartesian coordinates in either .xyz or .pdb format, resulting in the minimal RMSD.

For more information please read RMSD_ and Kabsch algorithm_.

.. _RMSD: http://en.wikipedia.org/wiki/Root-mean-square_deviation .. _Kabsch algorithm: http://en.wikipedia.org/wiki/Kabsch_algorithm

Motivation

You have molecule A and B and want to calculate the structural difference between those two. If you just calculate the RMSD_ straight-forward you might get a too big of a value as seen below. You would need to first recenter the two molecules and then rotate them unto each other to get the true minimal RMSD. This is what this script does.

========== =========== ========== No Changes Re-centered Rotated


|begin| |translate| |rotate| ========== =========== ========== RMSD 2.50 RMSD 1.07 RMSD 0.25 ========== =========== ==========

.. |begin| image:: https://raw.githubusercontent.com/charnley/rmsd/master/img/plot_beginning.png .. |translate| image:: https://raw.githubusercontent.com/charnley/rmsd/master/img/plot_translated.png .. |rotate| image:: https://raw.githubusercontent.com/charnley/rmsd/master/img/plot_rotated.png

Citation

Please cite this project when using it for scientific publications.

Installation

Easiest is to get the program vis PyPi under the package name rmsd,

.. code-block:: bash

pip install rmsd

or download the project from GitHub via

.. code-block:: bash

git clone https://github.com/charnley/rmsd

There is only one Python file, so you can also download calculate_rmsd.py and put it in your bin folder.

.. code-block:: bash

wget -O calculate_rmsd https://raw.githubusercontent.com/charnley/rmsd/master/rmsd/calculate_rmsd.py
chmod +x calculate_rmsd

Usage examples

Use calculate_rmsd --help to see all the features. Usage is pretty straight forward, call calculate_rmsd with two structures in either .xyz or .pdb. In this example Ethane has the exact same structure, but is translated in space, so the RMSD should be zero.

.. code-block:: bash

calculate_rmsd tests/ethane.xyz tests/ethane_translate.xyz

It is also possible to ignore all hydrogens (useful for larger molecules where hydrogens move around indistinguishable) and print the rotated structure for visual comparison. The output will be in XYZ format.

.. code-block:: bash

calculate_rmsd --no-hydrogen --print tests/ethane.xyz tests/ethane_mini.xyz

If the atoms are scrambled and not aligned you can use the --reorder argument which will align the atoms from structure B unto A. Use --reorder-method to select what method for reordering. Choose between Hungarian_ (default), distance (very approximate) and brute force (slow).

.. _Hungarian: https://en.wikipedia.org/wiki/Hungarian_algorithm

.. code-block:: bash

calculate_rmsd --reorder tests/water_16.xyz tests/water_16_idx.xyz

It is also possible to use RMSD as a library in other scripts, see example.py for example usage.

Problems?

Submit issues or pull requests on GitHub.

Contributions

Please note that we are using black with line length of 99. Easiest way to abide to the code standard is to install the following package.

.. code-block:: bash

pip install pre-commit

and run the following command in your repository

.. code-block:: bash

pre-commit install

This will install a hook in your git and re-format your code to adhere to the standard. As well as check for code quality.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].