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.


Return the residue full id.

add(self, atom)

Add an Atom object.

Checks for adding duplicate atoms, and raises a PDBConstructionException if so.


Set the disordered flag.


Return 1 if the residue contains disordered atoms.


Return the residue name.


Return the list of all atoms, unpack DisorderedAtoms.


Return the segment identifier.


Return atoms.

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.


Return disordered residue full identifier.

add(self, atom)

Add atom to residue.


Sort the atoms in the child Residue objects.

disordered_add(self, residue)

Add a residue object and use its resname as key.

  • residue - Residue object

disordered_remove(self, resname)

Remove a child residue from the DisorderedResidue.

  • resname - name of the child residue to remove, as a string.