Skip to main content

Proper RMSD calculation between molecules using the Kuhn-Munkres Hungarian algorithm.

Project description

RMSD

Determining the Root Mean Square Deviation (RMSD) between the Maximum Common Substructures (MCS) of two molecules.

The Kuhn-Munkres Hungarian algorithm allows for a fast match of atoms based on:

  • atomic symbol
  • Sybyl atom types
  • pharmacophoric types (i.e. H-bond donors and acceptors or charges)

Installation

pip install munkres-rmsd

Example

from munkres_rmsd import CalcLigRMSD, AtomType
from munkres_rmsd.RMSD import get_example_molecules

# First, load 3D poses of molecules 
mol1, mol2 = get_example_molecules()

# Then compute the RMSD of the best atomic match
rmsd = CalcLigRMSD(mol1, mol2)

print(rmsd) # 10.76150...

Let's use Sybyl atom types to match atoms between the two molecules instead of the default, using atomic elements.

# Then compute the RMSD of the best atomic match
rmsd = CalcLigRMSD(mol1, mol2, AtomType.Sybyl)

print(rmsd) # 11.59752...

Should you prefer pharmacophore types (i.e. H-bond donors & acceptors, charges and others):

# Then compute the RMSD of the best atomic match
rmsd = CalcLigRMSD(mol1, mol2, AtomType.Pharmacophore)

print(rmsd) # 9.49120...

Project details


Download files

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

Source Distribution

munkres_rmsd-0.0.1.post1.dev0.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

munkres_rmsd-0.0.1.post1.dev0-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page