Bio.PDB.Chain module

Chain class, used in Structure objects.

class Bio.PDB.Chain.Chain(id)

Bases: Bio.PDB.Entity.Entity

Define Chain class.

Chain is an object of type Entity, stores residues and includes a method to access atoms from residues.

__init__(self, id)

Initialize the class.

__gt__(self, other)

Validate if id is greater than other.id.

__ge__(self, other)

Validate if id is greater or equal than other.id.

__lt__(self, other)

Validate if id is less than other.id.

__le__(self, other)

Validate if id is less or equal than other id.

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

  • id - (string, int, string) or int

__contains__(self, id)

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

Arguments:

  • id - (string, int, string) or int

__delitem__(self, id)

Delete item.

Arguments:

  • id - (string, int, string) or int

__repr__(self)

Return the chain identifier.

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

  • id - (string, int, string) or int

get_residues(self)

Return residues.

get_atoms(self)

Return atoms from residues.