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)
Initialize the class.
source code
 
__gt__(self, other)
Test greater than.
source code
 
__ge__(self, other)
Test greater or equal.
source code
 
__lt__(self, other)
Test less than.
source code
 
__le__(self, other)
Test less or equal.
source code
 
_translate_id(self, id)
Translate sequence identifer to tuple form (PRIVATE).
source code
 
__getitem__(self, id)
Return the residue with given id.
source code
 
__contains__(self, id)
Check if a residue with given id is present in this chain.
source code
 
__delitem__(self, id)
Delete item.
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: __eq__, __hash__, __iter__, __len__, __ne__, 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 Entity.Entity (private): _generate_full_id, _reset_full_id

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

Properties [hide private]

Inherited from Entity.Entity: id

Inherited from object: __class__

Method Details [hide private]

__init__(self, id)
(Constructor)

source code 
Initialize the class.
Overrides: object.__init__

__gt__(self, other)
(Greater-than operator)

source code 
Test greater than.
Overrides: Entity.Entity.__gt__
(inherited documentation)

__ge__(self, other)
(Greater-than-or-equals operator)

source code 
Test greater or equal.
Overrides: Entity.Entity.__ge__
(inherited documentation)

__lt__(self, other)
(Less-than operator)

source code 
Test less than.
Overrides: Entity.Entity.__lt__
(inherited documentation)

__le__(self, other)
(Less-than-or-equals operator)

source code 
Test less or equal.
Overrides: Entity.Entity.__le__
(inherited documentation)

_translate_id(self, id)

source code 

Translate sequence identifer to tuple form (PRIVATE).

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:

  • 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:

  • id - (string, int, string) or int
Overrides: Entity.Entity.__getitem__

__contains__(self, id)
(In operator)

source code 

Check if a residue with given id is present in this chain.

Arguments:

  • id - (string, int, string) or int
Overrides: Entity.Entity.__contains__

__delitem__(self, id)
(Index deletion operator)

source code 

Delete item.

Arguments:

  • 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:

  • id - (string, int, string) or int
Overrides: Entity.Entity.has_id