Package csb :: Package bio :: Package structure :: Class ChainResiduesCollection

[frames] | no frames]

# Class ChainResiduesCollection

source code

                  object --+
                           |
        core.AbstractIndexer --+
                               |
    core.BaseCollectionContainer --+
                                   |
            core.CollectionContainer --+
                                       |
                                      ChainResiduesCollection

Instance Methods

__init__(self, chain, residues) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__repr__(self) repr(x) | source code

int

append(self, residue) Append a new residue to the chain. | source code

Inherited from `core.BaseCollectionContainer`: `__bool__`, `__contains__`, `__getitem__`, `__iter__`, `__len__`, `__nonzero__` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties
Inherited from `core.BaseCollectionContainer`: `last_index`, `length`, `start_index` Inherited from `object`: `__class__`

Method Details

### __init__(self, chain, residues)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  - `items` - initialization list
  - `type` - if defined, makes the container type-safe
  - `start_index` - the index of the zero element
Overrides: object.__init__
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)

### append(self, residue)

source code

Append a new residue to the chain.

Parameters:
  - `residue` (Residue) - the new residue
Returns: int
  the index of the new element
Raises:
  - `DuplicateResidueIDError` - if a residue with the same ID already exists
Overrides: core.CollectionContainer.append