OpenStructure
Public Member Functions | Static Public Member Functions
ContactScorer Class Reference

Public Member Functions

def __init__ (self, target, chem_groups, model, alns, contact_mode="aa", contact_d=5.0)
 
def cent1 (self)
 
def chem_groups (self)
 
def cent2 (self)
 
def alns (self)
 
def ScoreICS (self, mapping, check=True)
 
def ScoreICSInterface (self, trg_ch1, trg_ch2, mdl_ch1, mdl_ch2)
 
def ICSFromFlatMapping (self, flat_mapping)
 
def ScoreIPS (self, mapping, check=True)
 
def ScoreIPSInterface (self, trg_ch1, trg_ch2, mdl_ch1, mdl_ch2)
 
def IPSFromFlatMapping (self, flat_mapping)
 

Static Public Member Functions

def FromMappingResult (mapping_result, contact_mode="aa", contact_d=5.0)
 

Detailed Description

 Helper object to compute Contact scores

Tightly integrated into the mechanisms from the chain_mapping module.
The prefered way to derive an object of type :class:`ContactScorer` is
through the static constructor: :func:`~FromMappingResult`.

Usage is the same as for :class:`ost.mol.alg.QSScorer`

Definition at line 438 of file contact_score.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  target,
  chem_groups,
  model,
  alns,
  contact_mode = "aa",
  contact_d = 5.0 
)

Definition at line 448 of file contact_score.py.

Member Function Documentation

◆ alns()

def alns (   self)
 Alignments between chains in :attr:`~cent1` and :attr:`~cent2`

Provided at object construction. Each alignment is accessible with
``alns[(t_chain,m_chain)]``. First sequence is the sequence of the
respective chain in :attr:`~cent1`, second sequence the one from
:attr:`~cent2`.

:type: :class:`dict` with key: :class:`tuple` of :class:`str`, value:
       :class:`ost.seq.AlignmentHandle`

Definition at line 532 of file contact_score.py.

◆ cent1()

def cent1 (   self)
 Represents *target*

:type: :class:`ContactEntity`

Definition at line 506 of file contact_score.py.

◆ cent2()

def cent2 (   self)
 Represents *model*

:type: :class:`ContactEntity`

Definition at line 524 of file contact_score.py.

◆ chem_groups()

def chem_groups (   self)
 Groups of chemically equivalent chains in *target*

Provided at object construction

:type: :class:`list` of :class:`list` of :class:`str`

Definition at line 514 of file contact_score.py.

◆ FromMappingResult()

def FromMappingResult (   mapping_result,
  contact_mode = "aa",
  contact_d = 5.0 
)
static
 The preferred way to get a :class:`ContactScorer`

Static constructor that derives an object of type :class:`ContactScorer`
using a :class:`ost.mol.alg.chain_mapping.MappingResult`

:param mapping_result: Data source
:type mapping_result: :class:`ost.mol.alg.chain_mapping.MappingResult`

Definition at line 488 of file contact_score.py.

◆ ICSFromFlatMapping()

def ICSFromFlatMapping (   self,
  flat_mapping 
)
 Same as :func:`ScoreICS` but with flat mapping

:param flat_mapping: Dictionary with target chain names as keys and
                     the mapped model chain names as value
:type flat_mapping: :class:`dict` with :class:`str` as key and value
:returns: Result object of type :class:`ContactScorerResultICS`

Definition at line 634 of file contact_score.py.

◆ IPSFromFlatMapping()

def IPSFromFlatMapping (   self,
  flat_mapping 
)
 Same as :func:`ScoreIPS` but with flat mapping

:param flat_mapping: Dictionary with target chain names as keys and
                     the mapped model chain names as value
:type flat_mapping: :class:`dict` with :class:`str` as key and value
:returns: Result object of type :class:`ContactScorerResultIPS`

Definition at line 759 of file contact_score.py.

◆ ScoreICS()

def ScoreICS (   self,
  mapping,
  check = True 
)
 Computes ICS given chain mapping

Again, the preferred way is to get *mapping* is from an object
of type :class:`ost.mol.alg.chain_mapping.MappingResult`.

:param mapping: see 
                :attr:`ost.mol.alg.chain_mapping.MappingResult.mapping`
:type mapping: :class:`list` of :class:`list` of :class:`str`
:param check: Perform input checks, can be disabled for speed purposes
              if you know what you're doing.
:type check: :class:`bool`
:returns: Result object of type :class:`ContactScorerResultICS`

Definition at line 545 of file contact_score.py.

◆ ScoreICSInterface()

def ScoreICSInterface (   self,
  trg_ch1,
  trg_ch2,
  mdl_ch1,
  mdl_ch2 
)
 Computes ICS scores only considering one interface

This only works for interfaces that are computed in :func:`Score`, i.e.
interfaces for which the alignments are set up correctly.

:param trg_ch1: Name of first interface chain in target
:type trg_ch1: :class:`str`
:param trg_ch2: Name of second interface chain in target
:type trg_ch2: :class:`str`
:param mdl_ch1: Name of first interface chain in model
:type mdl_ch1: :class:`str`
:param mdl_ch2: Name of second interface chain in model
:type mdl_ch2: :class:`str`
:returns: Result object of type :class:`ContactScorerResultICS`
:raises: :class:`RuntimeError` if no aln for trg_ch1/mdl_ch1 or
         trg_ch2/mdl_ch2 is available.

Definition at line 582 of file contact_score.py.

◆ ScoreIPS()

def ScoreIPS (   self,
  mapping,
  check = True 
)
 Computes IPS given chain mapping

Again, the preferred way is to get *mapping* is from an object
of type :class:`ost.mol.alg.chain_mapping.MappingResult`.

:param mapping: see 
                :attr:`ost.mol.alg.chain_mapping.MappingResult.mapping`
:type mapping: :class:`list` of :class:`list` of :class:`str`
:param check: Perform input checks, can be disabled for speed purposes
              if you know what you're doing.
:type check: :class:`bool`
:returns: Result object of type :class:`ContactScorerResultIPS`

Definition at line 669 of file contact_score.py.

◆ ScoreIPSInterface()

def ScoreIPSInterface (   self,
  trg_ch1,
  trg_ch2,
  mdl_ch1,
  mdl_ch2 
)
 Computes IPS scores only considering one interface

This only works for interfaces that are computed in :func:`Score`, i.e.
interfaces for which the alignments are set up correctly.

:param trg_ch1: Name of first interface chain in target
:type trg_ch1: :class:`str`
:param trg_ch2: Name of second interface chain in target
:type trg_ch2: :class:`str`
:param mdl_ch1: Name of first interface chain in model
:type mdl_ch1: :class:`str`
:param mdl_ch2: Name of second interface chain in model
:type mdl_ch2: :class:`str`
:returns: Result object of type :class:`ContactScorerResultIPS`
:raises: :class:`RuntimeError` if no aln for trg_ch1/mdl_ch1 or
         trg_ch2/mdl_ch2 is available.

Definition at line 706 of file contact_score.py.


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