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

Inherits object.

Public Member Functions

 __init__ (self, ent)
 
 GetName (self)
 
 SetName (self, new_name)
 
 ca_entity (self)
 
 ca_chains (self)
 
 GetAlignment (self, c1, c2)
 
 chem_groups (self)
 
 GetAngles (self, c1, c2)
 
 GetAxis (self, c1, c2)
 
 contacts (self)
 
 contacts (self, new_contacts)
 
 contacts_ca (self)
 
 contacts_ca (self, new_contacts)
 

Data Fields

 original_name
 
 ent
 
 removed_chains
 
 calpha_only
 
 is_valid
 

Protected Member Functions

 _GetSuperposeData (self, c1, c2)
 

Protected Attributes

 _ca_entity
 
 _ca_chains
 
 _alignments
 
 _chem_groups
 
 _angles
 
 _axis
 
 _contacts
 
 _contacts_ca
 

Detailed Description

Entity with cached entries for QS scoring.

Any known / precomputed information can be filled into the appropriate
attribute here as long as they are labelled as read/write. Otherwise the
quantities are computed on first access and cached (lazy evaluation). The
heaviest load is expected when computing :attr:`contacts` and
:attr:`contacts_ca`.

:param ent: Entity to be used for QS scoring. A copy of it will be processed.
:type ent:  :class:`~ost.mol.EntityHandle` or :class:`~ost.mol.EntityView`

.. attribute:: is_valid

  True, if successfully initialized. False, if input structure has no protein
  chains with >= 20 residues.

  :type: :class:`bool`

.. attribute:: original_name

  Name set for *ent* when object was created.

  :type: :class:`str`

.. attribute:: ent

  Cleaned version of *ent* passed at construction. Hydrogens are removed, the
  entity is processed with a :class:`~ost.conop.RuleBasedProcessor` and chains
  listed in :attr:`removed_chains` have been removed. The name of this entity
  might change during scoring (see :func:`GetName`). Otherwise, this will be
  fixed.

  :type: :class:`~ost.mol.EntityHandle`

.. attribute:: removed_chains

  Chains removed from *ent* passed at construction. These are ligand and water
  chains as well as small (< 20 res.) peptides or chains with no amino acids
  (determined by chem. type, which is set by rule based processor).

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

.. attribute:: calpha_only

  Whether entity is CA-only (i.e. it has 0 CB atoms)

  :type: :class:`bool`

Definition at line 630 of file qsscoring.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  ent 
)

Definition at line 679 of file qsscoring.py.

Member Function Documentation

◆ _GetSuperposeData()

_GetSuperposeData (   self,
  c1,
  c2 
)
protected

Class internal helpers (anything that doesnt easily work without this class)

Fill _angles and _axis from superposition of CA chains of c1 and c2.

Definition at line 853 of file qsscoring.py.

◆ ca_chains()

ca_chains (   self)
Map of chain names in :attr:`ent` to sequences with attached view to CA-only
chains (into :attr:`ca_entity`). Useful for alignments and superpositions.

:getter: Computed on first use (cached)
:type: :class:`dict` (key = :class:`str`,
       value = :class:`~ost.seq.SequenceHandle`)

Definition at line 737 of file qsscoring.py.

◆ ca_entity()

ca_entity (   self)
Reduced representation of :attr:`ent` with only CA atoms.
This guarantees that each included residue has exactly one atom.

:getter: Computed on first use (cached)
:type: :class:`~ost.mol.EntityHandle`

Definition at line 724 of file qsscoring.py.

◆ chem_groups()

chem_groups (   self)
Intra-complex group of chemically identical (seq. id. > 95%) polypeptide
chains as extracted from :attr:`ca_chains`. First chain in group is the one
with the longest sequence.

:getter: Computed on first use (cached)
:type: :class:`list` of :class:`list` of :class:`str` (chain names)

Definition at line 769 of file qsscoring.py.

◆ contacts() [1/2]

contacts (   self)
Connectivity dictionary (**read/write**).
As given by :func:`GetContacts` with *calpha_only* = False on :attr:`ent`.

:getter: Computed on first use (cached)
:setter: Uses :func:`FilterContacts` to ensure that we only keep contacts
         for chains in the cleaned entity.
:type: See return type of :func:`GetContacts`

Definition at line 815 of file qsscoring.py.

◆ contacts() [2/2]

contacts (   self,
  new_contacts 
)

Definition at line 830 of file qsscoring.py.

◆ contacts_ca() [1/2]

contacts_ca (   self)
CA-only connectivity dictionary (**read/write**).
Like :attr:`contacts` but with *calpha_only* = True in :func:`GetContacts`.

Definition at line 835 of file qsscoring.py.

◆ contacts_ca() [2/2]

contacts_ca (   self,
  new_contacts 
)

Definition at line 845 of file qsscoring.py.

◆ GetAlignment()

GetAlignment (   self,
  c1,
  c2 
)
Get sequence alignment of chain *c1* with chain *c2*.
Computed on first use based on :attr:`ca_chains` (cached).

:param c1: Chain name for first chain to align.
:type c1:  :class:`str`
:param c2: Chain name for second chain to align.
:type c2:  :class:`str`
:rtype: :class:`~ost.seq.AlignmentHandle` or None if it failed.

Definition at line 753 of file qsscoring.py.

◆ GetAngles()

GetAngles (   self,
  c1,
  c2 
)
Get Euler angles from superposition of chain *c1* with chain *c2*.
Computed on first use based on :attr:`ca_chains` (cached).

:param c1: Chain name for first chain to superpose.
:type c1:  :class:`str`
:param c2: Chain name for second chain to superpose.
:type c2:  :class:`str`
:return: 3 Euler angles (may contain nan if something fails).
:rtype:  :class:`numpy.array`

Definition at line 784 of file qsscoring.py.

◆ GetAxis()

GetAxis (   self,
  c1,
  c2 
)
Get axis of symmetry from superposition of chain *c1* with chain *c2*.
Computed on first use based on :attr:`ca_chains` (cached).

:param c1: Chain name for first chain to superpose.
:type c1:  :class:`str`
:param c2: Chain name for second chain to superpose.
:type c2:  :class:`str`
:return: Rotational axis (may contain nan if something fails).
:rtype:  :class:`numpy.array`

Definition at line 799 of file qsscoring.py.

◆ GetName()

GetName (   self)
Wrapper to :func:`~ost.mol.EntityHandle.GetName` of :attr:`ent`.
This is used to uniquely identify the entity while scoring. The name may
therefore change while :attr:`original_name` remains fixed.

Definition at line 708 of file qsscoring.py.

◆ SetName()

SetName (   self,
  new_name 
)
Wrapper to :func:`~ost.mol.EntityHandle.SetName` of :attr:`ent`.
Use this to change unique identifier while scoring (see :func:`GetName`).

Definition at line 716 of file qsscoring.py.

Field Documentation

◆ _alignments

_alignments
protected

Definition at line 701 of file qsscoring.py.

◆ _angles

_angles
protected

Definition at line 703 of file qsscoring.py.

◆ _axis

_axis
protected

Definition at line 704 of file qsscoring.py.

◆ _ca_chains

_ca_chains
protected

Definition at line 700 of file qsscoring.py.

◆ _ca_entity

_ca_entity
protected

Definition at line 699 of file qsscoring.py.

◆ _chem_groups

_chem_groups
protected

Definition at line 702 of file qsscoring.py.

◆ _contacts

_contacts
protected

Definition at line 705 of file qsscoring.py.

◆ _contacts_ca

_contacts_ca
protected

Definition at line 706 of file qsscoring.py.

◆ calpha_only

calpha_only

Definition at line 687 of file qsscoring.py.

◆ ent

ent

Definition at line 687 of file qsscoring.py.

◆ is_valid

is_valid

Definition at line 692 of file qsscoring.py.

◆ original_name

original_name

Definition at line 681 of file qsscoring.py.

◆ removed_chains

removed_chains

Definition at line 687 of file qsscoring.py.


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