Package csb :: Package bio :: Package structure :: Class Residue |
[frames] | no frames]

# Class Residue

source code

                object --+
                         |
    core.AbstractContainer --+
                             |
      core.AbstractNIContainer --+
                                 |
                    object --+   |
                             |   |
                AbstractEntity --+
                                 |
                                Residue

Known Subclasses:
  - NucleicResidue
  - , ProteinResidue
  - , UnknownResidue

Base class representing a single residue. Provides a dictionary-like access to the atoms contained in the residue:

    >>> residue['CA']
    <Atom [3048]: CA>
    >>> residue.atoms['CA']
    <Atom [3048]: CA>
    >>> residue.items
    <iterator of Atom-s>

Nested Classes
Inherited from `core.AbstractContainer`: `__metaclass__`

Instance Methods
__init__(self, rank, type, sequence_number=None, insertion_code=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code
__repr__(self) repr(x) | source code
clone(self) | source code
list |
get_coordinates(self, what=None, skip=False) Extract the coordinates of the specified kind(s) of atoms and return them as a list. | source code
Inherited from `core.AbstractNIContainer`: `__getitem__` Inherited from `core.AbstractContainer`: `__bool__`, `__iter__`, `__len__`, `__nonzero__` Inherited from `AbstractEntity`: `components`, `transform` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Static Methods
Residue subclass |
create(sequence_type, *a, **k) Residue factory method, which returns the proper Residue instance based on the specified `sequence_type`. | source code

Class Variables
| __abstractmethods__ = ``frozenset([``])``

Properties
ResidueAtomsTable | atoms Access residue's atoms by atom name
bool | has_structure True if this residue has any atoms
str | id PDB sequence number [+ insertion code]
str | insertion_code PDB insertion code (if defined)
bool | is_modified Return True id this is a modified residue
iterator of AbstractEntity | items Iterator over all immediate children of the entity
str | label Original residue label (different from `Residue.type` for modified residues)
int | rank Residue's position in the sequence (1-based)
SecondaryStructureElement | secondary_structure Secondary structure element this residue is part of
int | sequence_number PDB sequence number (if residue.has_structure is True)
TorsionAngles | torsion Torsion angles
enum item | type Residue type - a member of any sequence alphabet
Inherited from `object`: `__class__`

Method Details

### __init__(self, rank, type, sequence_number=None, insertion_code=None) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Parameters: `rank` (int) - rank of the residue with respect to the chain `type` (csb.core.EnumItem) - residue type - a member of any SequenceAlphabets `sequence_number` (str) - PDB sequence number of the residue `insertion_code` (str) - PDB insertion code, if any Overrides: object.__init__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
repr(x) Overrides: object.__repr__ (inherited documentation)

### create(sequence_type, *a, **k) Static Method | source code
Residue factory method, which returns the proper Residue instance based on the specified `sequence_type`. All additional arguments are used to initialize the subclass by passing them automatically to the underlying constructor. Parameters: `sequence_type` (csb.core.EnumItem) - create a Residue of that SequenceType Returns: Residue subclass a new residue of the proper subclass Raises: `ValueError` - if the sequence type is not known

### get_coordinates(self, what=None, skip=False) | source code
Extract the coordinates of the specified kind(s) of atoms and return them as a list. Parameters: `what` - a list of atom kinds, e.g. ['N', 'CA', 'C'] Returns: list a list of lists, each internal list corresponding to the coordinates of a 3D vector Raises: `Broken3DStructureError` - if a specific atom kind cannot be retrieved from a residue Overrides: AbstractEntity.get_coordinates (inherited documentation)

Property Details

### atoms Access residue's atoms by atom name Get Method: unreachable.atoms(self) - Access residue's atoms by atom name Type: ResidueAtomsTable

### has_structure True if this residue has any atoms Get Method: unreachable.has_structure(self) - True if this residue has any atoms Type: bool

### id PDB sequence number [+ insertion code] Get Method: unreachable.id(self) - PDB sequence number [+ insertion code] Set Method: unreachable.id(self, value) Type: str

### insertion_code PDB insertion code (if defined) Get Method: unreachable.insertion_code(self) - PDB insertion code (if defined) Type: str

### is_modified Return True id this is a modified residue Get Method: unreachable.is_modified(self) - Return True id this is a modified residue Type: bool

### items Iterator over all immediate children of the entity Get Method: unreachable.items(self) Type: iterator of AbstractEntity

### label Original residue label (different from `Residue.type` for modified residues) Get Method: unreachable.label(self) - Original residue label (different from `Residue.type` for modified residues) Set Method: unreachable.label(self, value) Type: str

### rank Residue's position in the sequence (1-based) Get Method: unreachable.rank(self) - Residue's position in the sequence (1-based) Type: int

### secondary_structure Secondary structure element this residue is part of Get Method: unreachable.secondary_structure(self) - Secondary structure element this residue is part of Set Method: unreachable.secondary_structure(self, structure) Type: SecondaryStructureElement

### sequence_number PDB sequence number (if residue.has_structure is True) Get Method: unreachable.sequence_number(self) - PDB sequence number (if residue.has_structure is True) Type: int

### torsion Torsion angles Get Method: unreachable.torsion(self) - Torsion angles Set Method: unreachable.torsion(self, torsion) Type: TorsionAngles

### type Residue type - a member of any sequence alphabet Get Method: unreachable.type(self) - Residue type - a member of any sequence alphabet Set Method: unreachable.type(self, type) Type: enum item