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 https://bitbucket.org/kliment/cadscore/downloads/ or the new implementation which is part of the Voronota package available from https://bitbucket.org/kliment/voronota/downloads/.

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).

Parameters:
  • 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.

Returns:

The result of the CAD score calculation

Return type:

CADResult

Raises:

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

Raises:

RuntimeError if the calculation failed

class CADResult(globalAA, localAA)

Holds the result of running CAD

globalAA

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

localAA

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

Type:

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