Package csb :: Package bio :: Package structure :: Class StructureChainsTable

[frames] | no frames]

# Class StructureChainsTable

source code

                  object --+
                           |
        core.AbstractIndexer --+
                               |
    core.BaseDictionaryContainer --+
                                   |
            core.DictionaryContainer --+
                                       |
                                      StructureChainsTable

Instance Methods

__init__(self, structure=None, chains=None) x.__init__(...) initializes x; see help(type(x)) for signature | source code

__repr__(self) repr(x) | source code

append(self, chain) Add a new Chain to the structure. | source code

remove(self, id) Remove a chain from the structure. | source code

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

Properties
Inherited from `core.BaseDictionaryContainer`: `length` Inherited from `object`: `__class__`

Method Details

### __init__(self, structure=None, chains=None)
(Constructor)

source code

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

Parameters:
  - `items` - an initialization dictionary
  - `restrict` - a list of keys allowed for this dictionary
Overrides: object.__init__
  (inherited documentation)

### __repr__(self)
(Representation operator)

source code

repr(x)

Overrides: object.__repr__
  (inherited documentation)

### append(self, chain)

source code

Add a new Chain to the structure.

Parameters:
  - `chain` (Chain) - the new chain to be appended
Raises:
  - `DuplicateChainIDError` - if a chain with same ID is already defined
  - `InvalidOperation` - if the chain is already associated with a structure
Overrides: core.DictionaryContainer.append

### remove(self, id)

source code

Remove a chain from the structure.

Parameters:
  - `id` (str) - ID of the chain to be detached
Raises:
  - `ChainNotFoundError` - if `id` is not a valid chain ID