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

Class Entity

source code

Known Subclasses:

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

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

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".

get_level(self)

source code 

Return level in hierarchy.

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