Table of Contents

Class: Chain Bio/PDB/Chain.py
Base Classes   
Entity
Methods   
__delitem__
__getitem__
__init__
__repr__
_sort
_translate_id
get_unpacked_list
has_id
  __delitem__ 
__delitem__ ( self,  id )

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

  __getitem__ 
__getitem__ ( self,  id )

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

  __init__ 
__init__ ( self,  id )

  __repr__ 
__repr__ ( self )

  _sort 
_sort (
        self,
        r1,
        r2,
        )

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 
_translate_id ( self,  id )

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 blanc (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

  get_unpacked_list 
get_unpacked_list ( self )

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 
has_id ( self,  id )

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


Table of Contents

This document was automatically generated on Mon Jul 1 12:02:52 2002 by HappyDoc version 2.0.1