Bio.PDB.Residue module¶
Residue class, used by Structure objects.
-
class
Bio.PDB.Residue.
Residue
(id, resname, segid)¶ Bases:
Bio.PDB.Entity.Entity
Represents a residue. A Residue object stores atoms.
-
__init__
(self, id, resname, segid)¶ Initialize the class.
-
__repr__
(self)¶ Return the residue full id.
-
add
(self, atom)¶ Add an Atom object.
Checks for adding duplicate atoms, and raises a PDBConstructionException if so.
-
sort
(self)¶ Sort child atoms.
Atoms N, CA, C, O always come first, thereafter alphabetically by name, with any alternative location specifier for disordered atoms (altloc) as a tie-breaker.
-
flag_disordered
(self)¶ Set the disordered flag.
-
is_disordered
(self)¶ Return 1 if the residue contains disordered atoms.
-
get_resname
(self)¶ Return the residue name.
-
get_unpacked_list
(self)¶ Return the list of all atoms, unpack DisorderedAtoms.
-
get_segid
(self)¶ Return the segment identifier.
-
get_atoms
(self)¶ Return atoms.
-
get_atom
(self)¶ Return atom.
-
-
class
Bio.PDB.Residue.
DisorderedResidue
(id)¶ Bases:
Bio.PDB.Entity.DisorderedEntityWrapper
DisorderedResidue is a wrapper around two or more Residue objects.
It is used to represent point mutations (e.g. there is a Ser 60 and a Cys 60 residue, each with 50 % occupancy).
-
__init__
(self, id)¶ Initialize the class.
-
__repr__
(self)¶ Return disordered residue full identifier.
-
add
(self, atom)¶ Add atom to residue.
-
sort
(self)¶ Sort the atoms in the child Residue objects.
-
disordered_add
(self, residue)¶ Add a residue object and use its resname as key.
- Arguments:
residue - Residue object
-