|
| __init__ (self, model, target, model_ligands, target_ligands, resnum_alignments=False, rename_ligand_chain=False, substructure_match=False, coverage_delta=0.2, max_symmetries=1e4, lddt_pli_radius=6.0, add_mdl_contacts=True, lddt_pli_thresholds=[0.5, 1.0, 2.0, 4.0], lddt_pli_binding_site_radius=None, 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) |
|
|
| _compute (self, symmetries, target_ligand, model_ligand) |
|
| _score_dir (self) |
|
| _compute_lddt_pli_add_mdl_contacts (self, symmetries, target_ligand, model_ligand) |
|
| _compute_lddt_pli_classic (self, symmetries, target_ligand, model_ligand) |
|
| _lddt_pli_unmapped_chain_penalty (self, unmapped_chains, non_mapped_cache, mdl_bs, mdl_ligand_res, mdl_sym) |
|
| _lddt_pli_get_mdl_data (self, model_ligand) |
|
| _lddt_pli_get_trg_data (self, target_ligand, max_r=None) |
|
| _lddt_pli_cut_ref_mdl_alns (self, chem_groups, chem_mapping, mdl_bs, ref_bs) |
|
| _mappable_atoms (self) |
|
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) |
|
:class:`LigandScorer` implementing LDDT-PLI.
LDDT-PLI is an LDDT score considering contacts between ligand and
receptor. Where receptor consists of protein and nucleic acid chains that
pass the criteria for :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.
:class:`LDDTPLIScorer` computes a score for a specific pair of target/model
ligands. Given a target/model ligand pair, all possible mappings of
model chains onto their chemically equivalent target chains are enumerated.
For each of these enumerations, all possible symmetries, i.e. atom-atom
assignments of the ligand as given by :class:`LigandScorer`, are evaluated
and an LDDT-PLI score is computed. The best possible LDDT-PLI score is
returned.
The LDDT-PLI score is a variant of LDDT with a custom inclusion radius
(`lddt_pli_radius`), no stereochemistry checks, and which penalizes
contacts added in the model within `lddt_pli_radius` by default
(can be changed with the `add_mdl_contacts` flag) but only if the involved
atoms can be mapped to the target. This is a requirement to
1) extract the respective reference distance from the target
2) avoid usage of contacts for which we have no experimental evidence.
One special case are contacts from chains that are not mapped to the target
binding site. It is very well possible that we have experimental evidence
for this chain though its just too far away from the target binding site.
We therefore try to map these contacts to the chain in the target with
equivalent sequence that is closest to the target binding site. If the
respective atoms can be mapped there, the contact is considered not
fulfilled and added as penalty.
Populates :attr:`LigandScorer.aux_data` with following :class:`dict` keys:
* lddt_pli: The LDDT-PLI score
* lddt_pli_n_contacts: Number of contacts considered in LDDT computation
* 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
* bs_ref_res: :class:`set` of residues with potentially non-zero
contribution to score. That is every residue with at least one
atom within *lddt_pli_radius* + max(*lddt_pli_thresholds*) of
the ligand.
* bs_mdl_res: Same for model
: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 lddt_pli_radius: LDDT inclusion radius for LDDT-PLI.
:type lddt_pli_radius: :class:`float`
:param add_mdl_contacts: Whether to penalize added model contacts.
:type add_mdl_contacts: :class:`bool`
:param lddt_pli_thresholds: Distance difference thresholds for LDDT.
:type lddt_pli_thresholds: :class:`list` of :class:`float`
:param lddt_pli_binding_site_radius: Pro param - dont use. Providing a value
Restores behaviour from previous
implementation that first extracted a
binding site with strict distance
threshold and computed LDDT-PLI only on
those target residues whereas the
current implementation includes every
atom within *lddt_pli_radius*.
:type lddt_pli_binding_site_radius: :class:`float`
: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`
Definition at line 12 of file ligand_scoring_lddtpli.py.
Stores mappable atoms given a chain mapping
Store for each ref_ch,mdl_ch pair all mdl atoms that can be
mapped. Don't store mappable atoms as hashes but rather as tuple
(mdl_r.GetNumber(), mdl_a.GetName()). Reason for that is that one might
operate on Copied EntityHandle objects without corresponding hashes.
Given a tuple defining c_pair: (ref_cname, mdl_cname), one
can check if a certain atom is mappable by evaluating:
if (mdl_r.GetNumber(), mdl_a.GetName()) in self._mappable_atoms(c_pair)
Definition at line 912 of file ligand_scoring_lddtpli.py.