OpenStructure
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
SCRMSDScorer Class Reference

Inherits LigandScorer.

Public Member Functions

 __init__ (self, model, target, model_ligands, target_ligands, resnum_alignments=False, rename_ligand_chain=False, substructure_match=False, coverage_delta=0.2, max_symmetries=1e5, bs_radius=4.0, lddt_lp_radius=15.0, model_bs_radius=25, binding_sites_topn=100000, full_bs_search=False, min_pep_length=6, min_nuc_length=4, pep_seqid_thr=95., nuc_seqid_thr=95., mdl_map_pep_seqid_thr=0., mdl_map_nuc_seqid_thr=0., seqres=None, trg_seqres_mapping=None)
 
- Public Member Functions inherited from LigandScorer
 model (self)
 
 target (self)
 
 model_cleanup_log (self)
 
 target_cleanup_log (self)
 
 model_ligands (self)
 
 target_ligands (self)
 
 resnum_alignments (self)
 
 min_pep_length (self)
 
 min_nuc_length (self)
 
 pep_seqid_thr (self)
 
 nuc_seqid_thr (self)
 
 mdl_map_pep_seqid_thr (self)
 
 mdl_map_nuc_seqid_thr (self)
 
 seqres (self)
 
 trg_seqres_mapping (self)
 
 substructure_match (self)
 
 coverage_delta (self)
 
 max_symmetries (self)
 
 state_matrix (self)
 
 model_ligand_states (self)
 
 target_ligand_states (self)
 
 score_matrix (self)
 
 coverage_matrix (self)
 
 aux_matrix (self)
 
 assignment (self)
 
 score (self)
 
 aux (self)
 
 unassigned_target_ligands (self)
 
 unassigned_model_ligands (self)
 
 get_target_ligand_state_report (self, trg_lig_idx)
 
 get_model_ligand_state_report (self, mdl_lig_idx)
 
 guess_target_ligand_unassigned_reason (self, trg_lig_idx)
 
 guess_model_ligand_unassigned_reason (self, mdl_lig_idx)
 
 unassigned_model_ligands_reasons (self)
 
 unassigned_target_ligands_reasons (self)
 

Data Fields

 bs_radius
 
 lddt_lp_radius
 
 model_bs_radius
 
 binding_sites_topn
 
 full_bs_search
 
 model
 
- Data Fields inherited from LigandScorer
 model_ligands
 
 target_ligands
 
 state_decoding
 
 target
 
 model
 

Protected Member Functions

 _compute (self, symmetries, target_ligand, model_ligand)
 
 _score_dir (self)
 
 _get_repr (self, target_ligand, model_ligand)
 
 _get_target_binding_site (self, target_ligand)
 
 _get_get_repr_input (self, mdl_ligand)
 
- Protected Member Functions inherited from LigandScorer
 _get_report (self, ligand_state, pair_states)
 
 _chain_mapper (self)
 
 _chem_mapping (self)
 
 _chem_group_alns (self)
 
 _ref_mdl_alns (self)
 
 _chain_mapping_mdl (self)
 
 _mdl_chains_without_chem_mapping (self)
 
 _compute_scores (self)
 
 _copy_ligand (self, l, ent, ed, rename_ligand_chain)
 
 _cleanup_polymer_ent (self, ent, clib)
 

Protected Attributes

 _binding_sites
 
 _repr
 
 _get_repr_input
 
 _chem_group_alns
 
 _mdl_chains_without_chem_mapping
 
- Protected Attributes inherited from LigandScorer
 _model
 
 _target
 
 _target_cleanup_log
 
 _model_cleanup_log
 
 _target_ligand_ent
 
 _model_ligand_ent
 
 _target_ligands
 
 _model_ligands
 
 _resnum_alignments
 
 _substructure_match
 
 _coverage_delta
 
 _max_symmetries
 
 _min_pep_length
 
 _min_nuc_length
 
 _pep_seqid_thr
 
 _nuc_seqid_thr
 
 _mdl_map_pep_seqid_thr
 
 _mdl_map_nuc_seqid_thr
 
 _seqres
 
 _trg_seqres_mapping
 
 _state_matrix
 
 _model_ligand_states
 
 _target_ligand_states
 
 _score_matrix
 
 _coverage_matrix
 
 _aux_matrix
 
 _assignment
 
 _score_dict
 
 _aux_dict
 
 _chem_mapping
 
 _chem_group_alns
 

Detailed Description

 :class:`LigandScorer` implementing symmetry corrected RMSD (BiSyRMSD).

:class:`SCRMSDScorer` computes a score for a specific pair of target/model
ligands.

The returned RMSD is based on a binding site superposition.
The binding site of the target structure is defined as all residues with at
least one atom within `bs_radius` around the target ligand.
It only contains protein and nucleic acid residues from chains that
pass the criteria for the
:class:`chain mapping <ost.mol.alg.chain_mapping>`. This means ignoring
other ligands, waters, short polymers as well as any incorrectly connected
chains that may be in proximity.
The respective model binding site for superposition is identified by
naively enumerating all possible mappings of model chains onto their
chemically equivalent target counterparts from the target binding site.
The `binding_sites_topn` with respect to lDDT score are evaluated and 
an RMSD is computed.
You can either try to map ALL model chains onto the target binding site by
enabling `full_bs_search` or restrict the model chains for a specific
target/model ligand pair to the chains with at least one atom within
*model_bs_radius* around the model ligand. The latter can be significantly
faster in case of large complexes.
Symmetry correction is achieved by simply computing an RMSD value for
each symmetry, i.e. atom-atom assignments of the ligand as given by
:class:`LigandScorer`. The lowest RMSD value is returned.

Populates :attr:`LigandScorer.aux_data` with following :class:`dict` keys:

* rmsd: The BiSyRMSD score
* lddt_lp: lDDT of the binding pocket used for superposition (lDDT-LP)
* bs_ref_res: :class:`list` of binding site residues in target
* bs_ref_res_mapped: :class:`list` of target binding site residues that
  are mapped to model
* bs_mdl_res_mapped: :class:`list` of same length with respective model
  residues
* bb_rmsd: Backbone RMSD (CA, C3' for nucleotides; full backbone for 
  binding sites with fewer than 3 residues) for mapped binding site
  residues after superposition
* target_ligand: The actual target ligand for which the score was computed
* model_ligand: The actual model ligand for which the score was computed
* chain_mapping: :class:`dict` with a chain mapping of chains involved in
  binding site - key: trg chain name, value: mdl chain name
* transform: :class:`geom.Mat4` to transform model binding site onto target
  binding site
* inconsistent_residues: :class:`list` of :class:`tuple` representing
  residues with inconsistent residue names upon mapping (which is given by
  bs_ref_res_mapped and bs_mdl_res_mapped). Tuples have two elements:
  1) trg residue 2) mdl residue

:param model: Passed to parent constructor - see :class:`LigandScorer`.
:type model: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param target: Passed to parent constructor - see :class:`LigandScorer`.
:type target: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param model_ligands: Passed to parent constructor - see
                      :class:`LigandScorer`.
:type model_ligands: :class:`list`
:param target_ligands: Passed to parent constructor - see
                       :class:`LigandScorer`.
:type target_ligands: :class:`list`
:param resnum_alignments: Passed to parent constructor - see
                          :class:`LigandScorer`.
:type resnum_alignments: :class:`bool`
:param rename_ligand_chain: Passed to parent constructor - see
                            :class:`LigandScorer`.
:type rename_ligand_chain: :class:`bool`
:param substructure_match: Passed to parent constructor - see
                           :class:`LigandScorer`.
:type substructure_match: :class:`bool`
:param coverage_delta: Passed to parent constructor - see
                       :class:`LigandScorer`.
:type coverage_delta: :class:`float`
:param max_symmetries: Passed to parent constructor - see
                       :class:`LigandScorer`.
:type max_symmetries: :class:`int`
:param bs_radius: Inclusion radius for the binding site. Residues with
               atoms within this distance of the ligand will be considered
               for inclusion in the binding site.
:type bs_radius: :class:`float`
:param lddt_lp_radius: lDDT inclusion radius for lDDT-LP.
:type lddt_lp_radius: :class:`float`
:param model_bs_radius: inclusion radius for model binding sites.
                        Only used when full_bs_search=False, otherwise the
                        radius is effectively infinite. Only chains with
                        atoms within this distance of a model ligand will
                        be considered in the chain mapping.
:type model_bs_radius: :class:`float`
:param binding_sites_topn: maximum number of model binding site
                           representations to assess per target binding
                           site.
:type binding_sites_topn: :class:`int`
:param full_bs_search: If True, all potential binding sites in the model
                       are searched for each target binding site. If False,
                       the search space in the model is reduced to chains
                       around (`model_bs_radius` Å) model ligands.
                       This speeds up computations, but may result in
                       ligands not being scored if the predicted ligand
                       pose is too far from the actual binding site.
:type full_bs_search: :class:`bool`
:param min_pep_length: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`.
:type min_pep_length: :class:`int`
:param min_nuc_length: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type min_nuc_length: :class:`int`
:param pep_seqid_thr: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type pep_seqid_thr: :class:`float`
:param nuc_seqid_thr: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type nuc_seqid_thr: :class:`float`
:param mdl_map_pep_seqid_thr: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type mdl_map_pep_seqid_thr: :class:`float`
:param mdl_map_nuc_seqid_thr: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type mdl_map_nuc_seqid_thr: :class:`float`
:param seqres: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type seqres: :class:`ost.seq.SequenceList`
:param trg_seqres_mapping: See :class:`ost.mol.alg.ligand_scoring_base.LigandScorer`
:type trg_seqres_mapping: :class:`dict`

Definition at line 10 of file ligand_scoring_scrmsd.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  model,
  target,
  model_ligands,
  target_ligands,
  resnum_alignments = False,
  rename_ligand_chain = False,
  substructure_match = False,
  coverage_delta = 0.2,
  max_symmetries = 1e5,
  bs_radius = 4.0,
  lddt_lp_radius = 15.0,
  model_bs_radius = 25,
  binding_sites_topn = 100000,
  full_bs_search = False,
  min_pep_length = 6,
  min_nuc_length = 4,
  pep_seqid_thr = 95.,
  nuc_seqid_thr = 95.,
  mdl_map_pep_seqid_thr = 0.,
  mdl_map_nuc_seqid_thr = 0.,
  seqres = None,
  trg_seqres_mapping = None 
)

Reimplemented from LigandScorer.

Definition at line 127 of file ligand_scoring_scrmsd.py.

Member Function Documentation

◆ _compute()

_compute (   self,
  symmetries,
  target_ligand,
  model_ligand 
)
protected
 Implements interface from parent

Reimplemented from LigandScorer.

Definition at line 186 of file ligand_scoring_scrmsd.py.

◆ _get_get_repr_input()

_get_get_repr_input (   self,
  mdl_ligand 
)
protected

Definition at line 333 of file ligand_scoring_scrmsd.py.

◆ _get_repr()

_get_repr (   self,
  target_ligand,
  model_ligand 
)
protected

Definition at line 251 of file ligand_scoring_scrmsd.py.

◆ _get_target_binding_site()

_get_target_binding_site (   self,
  target_ligand 
)
protected

Definition at line 280 of file ligand_scoring_scrmsd.py.

◆ _score_dir()

_score_dir (   self)
protected
 Implements interface from parent

Reimplemented from LigandScorer.

Definition at line 246 of file ligand_scoring_scrmsd.py.

Field Documentation

◆ _binding_sites

_binding_sites
protected

Definition at line 165 of file ligand_scoring_scrmsd.py.

◆ _chem_group_alns

_chem_group_alns
protected

Definition at line 371 of file ligand_scoring_scrmsd.py.

◆ _get_repr_input

_get_repr_input
protected

Definition at line 172 of file ligand_scoring_scrmsd.py.

◆ _mdl_chains_without_chem_mapping

_mdl_chains_without_chem_mapping
protected

Definition at line 372 of file ligand_scoring_scrmsd.py.

◆ _repr

_repr
protected

Definition at line 168 of file ligand_scoring_scrmsd.py.

◆ binding_sites_topn

binding_sites_topn

Definition at line 158 of file ligand_scoring_scrmsd.py.

◆ bs_radius

bs_radius

Definition at line 155 of file ligand_scoring_scrmsd.py.

◆ full_bs_search

full_bs_search

Definition at line 159 of file ligand_scoring_scrmsd.py.

◆ lddt_lp_radius

lddt_lp_radius

Definition at line 156 of file ligand_scoring_scrmsd.py.

◆ model

model

Definition at line 267 of file ligand_scoring_scrmsd.py.

◆ model_bs_radius

model_bs_radius

Definition at line 157 of file ligand_scoring_scrmsd.py.


The documentation for this class was generated from the following file: