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

Class Chain

source code

   object --+    
            |    
Entity.Entity --+
                |
               Chain

Instance Methods [hide private]
 
__init__(self, id)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_sort(self, r1, r2)
Sort function for residues in a chain
source code
 
_translate_id(self, id)
A residue id is normally a tuple (hetero flag, sequence identifier, insertion code).
source code
 
__getitem__(self, id)
Return the residue with given id.
source code
 
__contains__(self, id)
True if a residue with given id is present in this chain.
source code
 
__delitem__(self, id)
Arguments:...
source code
 
__repr__(self)
repr(x)
source code
 
get_unpacked_list(self)
Return a list of undisordered residues.
source code
 
has_id(self, id)
Return 1 if a residue with given id is present.
source code
 
get_residues(self) source code
 
get_atoms(self) source code

Inherited from Entity.Entity: __iter__, __len__, add, copy, detach_child, detach_parent, get_full_id, get_id, get_iterator, get_level, get_list, get_parent, insert, set_parent, transform

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __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)

_sort(self, r1, r2)

source code 
Sort function for residues in a chain

Residues are first sorted according to their hetatm records.
Protein and nucleic acid residues first, hetatm residues next,
and waters last. Within each group, the residues are sorted according
to their resseq's (sequence identifiers). Finally, residues with the
same resseq's are sorted according to icode.

Arguments:
o r1, r2 - Residue objects

_translate_id(self, id)

source code 

A residue id is normally a tuple (hetero flag, sequence identifier,
insertion code). Since for most residues the hetero flag and the
insertion code are blank (i.e. " "), you can just use the sequence
identifier to index a residue in a chain. The _translate_id method
translates the sequence identifier to the (" ", sequence identifier,
" ") tuple.

Arguments:
o id - int, residue resseq

__getitem__(self, id)
(Indexing operator)

source code 
Return the residue with given id.

The id of a residue is (hetero flag, sequence identifier, insertion code).
If id is an int, it is translated to (" ", id, " ") by the _translate_id
method.

Arguments:
o id - (string, int, string) or int

Overrides: Entity.Entity.__getitem__

__contains__(self, id)
(In operator)

source code 
True if a residue with given id is present in this chain.

Arguments:
o id - (string, int, string) or int

Overrides: Entity.Entity.__contains__

__delitem__(self, id)
(Index deletion operator)

source code 

Arguments:
o id - (string, int, string) or int

Overrides: Entity.Entity.__delitem__

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: object.__repr__
(inherited documentation)

get_unpacked_list(self)

source code 
Return a list of undisordered residues.

Some Residue objects hide several disordered residues
(DisorderedResidue objects). This method unpacks them,
ie. it returns a list of simple Residue objects.

has_id(self, id)

source code 
Return 1 if a residue with given id is present.

The id of a residue is (hetero flag, sequence identifier, insertion code).
        If id is an int, it is translated to (" ", id, " ") by the _translate_id
method.

Arguments:
o id - (string, int, string) or int

Overrides: Entity.Entity.has_id