Contact Mode Score

The Contact Mode Score, or CMS, is a new metric to assess the conformational similarity based on intermolecular protein-ligand contacts. In contrast to RMSD, the CMS is less dependent on the ligand size and has the ability to handle flexible receptors. Further, the eXtended Contact Mode Score, or XCMS, was developed to compare binding poses of non-identical ligands bound to different proteins.
If you find CMS and XCMS useful, please cite the following paper:

CMS and XCMS are also available at

CMS - Contact Mode Score

Source codes
Version (hover) Download Size MD5  

1.0 latest cms-1.0.tar.gz 3.2M 5f9eb1e885799f951dba81f94053a71a  

The code has been tested with g++ 4.2.1, but any modern compiler supporting the c++ standard library should work.


Download the package, unpack the tarball, go to src, and run make:

$ tar xvf cms-1.0.tar.gz

$ cd cms-1.0/src

$ make cms -f makefile

If successful, the binary cms will show up in bin:

$ ls ../bin/


Append the path to cms to the PATH environment variable.


$ cms -h

Usage: cms [options] files...

Note that multiple options may follow a hyphen delimiter in a single token, -cr is equivalent with -c -r


-h, --help      display this help and exit
-c, --cms       calculate contact mode score
-r, --rmsd      calculate rmsd between two ligands
-f, --frac      calculate fraction of non-specific contacts

To calculate contact mode score, use:
cms -c --lig1 <first ligand> --prt1 <first protein>  --lig2 <second ligand> --prt2 <second protein>

To calculate rmsd, use:
cms -r --lig1 <first ligand> --lig2 <second ligand>

To calculate fraction of non-specific contacts,
PLEASE USE NATIVE ligand and NATIVE protein for the arguments of lig1 and prt1:
cms -f --lig1 <native ligand> --prt1 <native protein>  --lig2 <second ligand> --prt2 <second protein>


$ cd data

$ sh

XCMS - eXtended Contact Mode Score

  • Python 2.7 and pip: It is recommended to install Anaconda on your system to set up the python working environment, which provides most of the python dependencies to run XCMS, except for Pybel, whose installation is explained below.
  • OpenBabel and Pybel: We use OpenBabel and its python binding pybel to handle various input formats. See here for the instructions how you can compile OpenBabel together with its python binding.Be aware, you must use the old Eigen2 instead of Eigen3.
  • Kcombu: We use pkcombu in the KCOMBU package to compare two ligands. You may download the KCOMBU program here. Please add pkcombu to your PATH variable.
  • APoc: We use APoc to compare two binding pockets. You may donwload the APoc program here. Please add apoc to your PATH variable.

At the command line:

$ pip install xcms

To install locally only for yourself:

$ pip install xcms --user


$ x-cms --help
Usage: x-cms [OPTIONS]

calculate extended contact mode score provided the query and template
protein-ligand structures

  --template-protein PATH  template protein file path, in PDB format
  --query-protein PATH     query protein file path, in PDB format
  --query-ligand PATH      query ligand file path, in SDF format
  --template-ligand PATH   template ligand file path, in SDF format
  --help                   show this message and exit

$ cd data

$ sh


© Michal Brylinski
This website is hosted at the CCT