OpenStructure
Loading...
Searching...
No Matches
Data Structures | Functions
ost.bindings.cadscore Namespace Reference

Data Structures

class  CADResult
 

Functions

 _SetupFiles (model, reference, chain_mapping)
 
 _CleanupFiles (dir_name)
 
 _ParseCADGlobal (lines)
 
 _ParseCADLocal (lines)
 
 _ParseVoronotaGlobal (lines)
 
 _ParseVoronotaLocal (lines)
 
 _RunCAD (tmp_dir, mode, cad_bin_path, old_regime)
 
 _HasInsertionCodes (model, reference)
 
 _MapLabels (model, cad_results, label, chain_mapping)
 
 CADScore (model, reference, mode="voronota", label="localcad", old_regime=False, cad_bin_path=None, chain_mapping=None)
 

Detailed Description

Wrapper for the CAD score.

References:

Olechnovic K, Kulberkyte E, Venclovas C., CAD-score: A new contact area 
difference-based function for evaluation of protein structural models
Proteins. 2012 Aug 30. [Epub ahead of print]

Authors: Valerio Mariani, Alessandro Barbato

Function Documentation

◆ _CleanupFiles()

_CleanupFiles (   dir_name)
protected

Definition at line 78 of file cadscore.py.

◆ _HasInsertionCodes()

_HasInsertionCodes (   model,
  reference 
)
protected

Definition at line 259 of file cadscore.py.

◆ _MapLabels()

_MapLabels (   model,
  cad_results,
  label,
  chain_mapping 
)
protected

Definition at line 268 of file cadscore.py.

◆ _ParseCADGlobal()

_ParseCADGlobal (   lines)
protected

Definition at line 102 of file cadscore.py.

◆ _ParseCADLocal()

_ParseCADLocal (   lines)
protected

Definition at line 108 of file cadscore.py.

◆ _ParseVoronotaGlobal()

_ParseVoronotaGlobal (   lines)
protected

Definition at line 127 of file cadscore.py.

◆ _ParseVoronotaLocal()

_ParseVoronotaLocal (   lines)
protected

Definition at line 130 of file cadscore.py.

◆ _RunCAD()

_RunCAD (   tmp_dir,
  mode,
  cad_bin_path,
  old_regime 
)
protected

Definition at line 152 of file cadscore.py.

◆ _SetupFiles()

_SetupFiles (   model,
  reference,
  chain_mapping 
)
protected

Definition at line 34 of file cadscore.py.

◆ CADScore()

CADScore (   model,
  reference,
  mode = "voronota",
  label = "localcad",
  old_regime = False,
  cad_bin_path = None,
  chain_mapping = 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). 

:param model: The model structure. 
:type model: :class:`~ost.mol.EntityView` or :class:`~ost.mol.EntityHandle`
:param reference: The reference structure
:type reference: :class:`~ost.mol.EntityView` or 
                 :class:`~ost.mol.EntityHandle`
:param mode:  What CAD score implementation to use, must be one in 
              ["classic", "voronota"]
:param label: Local CAD scores will be mapped on residues of model as 
              float property with this name
:type label: :class:`str`
:param old_regime: 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.
:type old_regime: :class:`bool`
:param cad_bin_path: 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.
:type cad_bin_path: :class:`str`
:param chain_mapping: Provide custom chain mapping in case of oligomers
                      (only supported for "voronota" *mode*). Provided as
                      :class:`dict` with model chain name as key and target
                      chain name as value. If set, scoring happens on a
                      substructure of model that is stripped to chains with
                      valid mapping.
:type chain_mapping: :class:`dict`
:returns: The result of the CAD score calculation
:rtype: :class:`CADResult`

:raises: :class:`~ost.settings.FileNotFound` if any of the CAD score 
         executables could not be located.
:raises: :class:`RuntimeError` if the calculation failed

Definition at line 287 of file cadscore.py.