ProtoCaller.IO.PDB.Chain module

class ProtoCaller.IO.PDB.Chain.Chain(residues=None)

Bases: ProtoCaller.IO.PDB.Residue.Residue, ProtoCaller.Utils.ConditionalList.ConditionalList

Represents a single Chain in a PDB file.

Parameters

atoms ([ProtoCaller.IO.PDB.Residue.Residue]) – A list of residues.

chainID

Chain identifier.

Type

str

property numberOfAtoms

Returns the number of atoms.

Type

int

property numberOfResidues

Returns the number of Residues.

Type

int

purgeAtoms(atoms, mode)

Removes or keeps the selected atoms.

Parameters
  • atoms ([ProtoCaller.IO.PDB.Atom.Atom]) – Atoms to be removed or kept

  • mode (str) – One of “keep” and “discard” - either keeps only the selection or discards the latter.

purgeEmpty()

Removes empty elements.

purgeResidues(residues, mode)

Removes or keeps the selected residues.

Parameters
  • atoms ([ProtoCaller.IO.PDB.Atom.Atom]) – Residues to be removed or kept

  • mode (str) – One of “keep” and “discard” - either keeps only the selection or discards the latter.

reNumberAtoms(start=1, custom_serials=None)

Renumbers the atoms.

Parameters
  • start (int, optional) – Initial index.

  • custom_serials ([int] or None, optional) – A list of custom indices. If None, atoms are renumbered sequentially.

reNumberResidues(start=1, custom_resSeqs=None, custom_iCodes=None)

Renumbers the residues.

Parameters
  • start (int, optional) – Initial index.

  • custom_resSeqs ([int] or None, optional) – A list of custom resSeqs. If None, residues are renumbered sequentially.

  • custom_iCodes ([str] or None, optional) – A list of custom iCodes. If None, residues are renumbered sequentially.

property sequence

Returns the single-character sequence of the amino acids in the chain. Missing amino acids are not taken into account.

Type

str

property type

“chain” if it has amino acid residues and “molecules” otherwise.

Type

str

Type

Returns the type of the chain