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

# Class AbstractEntity

source code

    object --+
             |
            AbstractEntity

Known Subclasses:
  - Atom
  - , Chain
  - , Ensemble
  - , Residue
  - , Structure

Base class for all protein structure entities.

This class defines uniform interface of all entities (e.g. Structure, Chain, Residue) according to the Composite pattern.

Nested Classes
| __metaclass__ Metaclass for defining Abstract Base Classes (ABCs).

Instance Methods
components(self, klass=None) Return an iterator over all descendants of the entity. | 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
transform(self, rotation, translation) Apply in place RotationMatrix and translation Vector to all atoms. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

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

Properties
iterator of AbstractEntity | items Iterator over all immediate children of the entity
Inherited from `object`: `__class__`

Method Details

### components(self, klass=None) | source code
Return an iterator over all descendants of the entity. Parameters: `klass` - return entities of the specified AbstractEntity subclass only. If None, traverse the hierarchy down to the lowest level. `klass` - class

### 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` (list or None) - 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

### transform(self, rotation, translation) | source code
Apply in place RotationMatrix and translation Vector to all atoms. Parameters: `rotation` (numpy array) `translation` (numpy array)

Property Details

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