This document is for OpenStructure version 2.3, the latest version is 2.8 !

cadscore - Compare protein structures by difference between physical contacts

CADScore(model, reference, mode='voronota', label='localcad', old_regime=False, cad_bin_path=None)

Calculates global and local atom-atom (AA) CAD Scores.

You can either access the original implementation available from or the new implementation which is part of the Voronota package available from

The scores of the two implementations differ but strongly correlate as the contacts between atoms are estimated differently. When using the “voronota” mode you can minimize those discrepancies by setting the old_regime flag to True.

Furthermore, the “voronota” mode generates per-residue scores that are inverted when compared to the classical implementation (0.0: bad, 1.0 good).

  • model (EntityView or EntityHandle) – The model structure.

  • reference (EntityView or EntityHandle) – The reference structure

  • mode – What CAD score implementation to use, must be one in [“classic”, “voronota”]

  • label (str) – Local CAD scores will be mapped on residues of model as float property with this name

  • old_regime (bool) – Only has an effect if mode is “voronota”. If set to true, the discrepancies between the two modes is minimized but the behaviour of inverted scores persists.

  • cad_bin_path (str) – Path to search for the required executables ([“CADscore_calc.bash”, “CADscore_read_global_scores.bash”, “CADscore_read_local_scores.bash”] for “classic” mode or [“voronota-cadscore”] for “voronota” mode). If not set, the env path is searched.


The result of the CAD score calculation

Return type:



FileNotFound if any of the CAD score executables could not be located.


RuntimeError if the calculation failed

class CADResult(globalAA, localAA)

Holds the result of running CAD


The global CAD’s atom-atom (AA) score


Dictionary containing local CAD’s atom-atom (AA) scores.


dictionary (key: tuple(chain, resnum) (e.g.: (“A”, ost.mol.ResNum(24)), value: CAD local AA score (see CAD Documentation online)


Enter search terms or a module, class or function name.


Documentation is available for the following OpenStructure versions:

dev / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / (Currently viewing 2.3) / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / 1.5 / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.