# Bio.PDB.Chain module

Chain class, used in Structure objects.

class Bio.PDB.Chain.Chain(id)

  Bases: `Entity`[`Model`, `Residue`]

  Define Chain class.

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

  __init__(id)

    Initialize the class.

  __gt__(other)

    Validate if id is greater than other.id.

  __ge__(other)

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

  __lt__(other)

    Validate if id is less than other.id.

  __le__(other)

    Validate if id is less or equal than other id.

  __getitem__(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__(id)

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

    Arguments:

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

  __delitem__(id)

    Delete item.

    Arguments:

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

  __repr__()

    Return the chain identifier.

  get_unpacked_list()

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

    Return residues.

  get_atoms()

    Return atoms from residues.

  atom_to_internal_coordinates(verbose: bool = False) → None

    Create/update internal coordinates from Atom X,Y,Z coordinates.

    Internal coordinates are bond length, angle and dihedral angles.

    Parameters:

      bool (verbose) – default False describe runtime problems

  internal_to_atom_coordinates(verbose: bool = False, start: int | None = None, fin: int | None = None)

    Create/update atom coordinates from internal coordinates.

    Parameters:

      bool (verbose) – default False describe runtime problems

    Param:

      start, fin integers optional sequence positions for begin, end of subregion to process. N.B. this activates serial residue assembly, <start> residue CA will be at origin

    Raises:

      Exception – if any chain does not have .internal_coord attribute

  __annotations__ = {}
  __firstlineno__ = 21
  __orig_bases__ = (Bio.PDB.Entity.Entity[ForwardRef('Model'), ForwardRef('Residue')],)
  __parameters__ = ()
  __static_attributes__ = ('internal_coord', 'level')

Biopython v: 1.85

Versions
  Previous
  Latest
  Develop

Biopython Project
  Homepage
  On GitHub