Package Bio :: Package PDB :: Module Entity :: Class Entity
[hide private]
[frames] | no frames]

Class Entity

source code

object --+
         |
        Entity
Known Subclasses:

Basic container object. Structure, Model, Chain and Residue are subclasses of Entity. It deals with storage and lookup.

Instance Methods [hide private]
 
__init__(self, id)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__len__(self)
Return the number of children.
source code
 
__getitem__(self, id)
Return the child with given id.
source code
 
__delitem__(self, id)
Remove a child.
source code
 
__iter__(self)
Iterate over children.
source code
 
get_level(self)
Return level in hierarchy.
source code
 
set_parent(self, entity)
Set the parent Entity object.
source code
 
detach_parent(self)
Detach the parent.
source code
 
detach_child(self, id)
Remove a child.
source code
 
add(self, entity)
Add a child to the Entity.
source code
 
get_iterator(self)
Return iterator over children.
source code
 
get_list(self)
Return a copy of the list of children.
source code
 
has_id(self, id)
True if a child with given id exists.
source code
 
get_parent(self)
Return the parent Entity object.
source code
 
get_id(self)
Return the id.
source code
 
get_full_id(self)
Return the full id.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

get_level(self)

source code 

Return level in hierarchy.

A - atom R - residue C - chain M - model S - structure

get_full_id(self)

source code 

Return the full id.

The full id is a tuple containing all id's starting from the top object (Structure) down to the current object. A full id for a Residue object e.g. is something like:

("1abc", 0, "A", (" ", 10, "A"))

This corresponds to:

Structure with id "1abc" Model with id 0 Chain with id "A" Residue with id (" ", 10, "A")

The Residue id indicates that the residue is not a hetero-residue (or a water) beacuse it has a blank hetero field, that its sequence identifier is 10 and its insertion code "A".