schemarecomb.pdb_structure.AminoAcid

class schemarecomb.pdb_structure.AminoAcid(atoms)

Amino acid within a PDB structure.

This class is a collection of Atom objects that make up a residue in a schemarecomb.PDBStructure, plus additional functions for schemarecomb calculation.

Parameters

atoms (list[Atom]) – Atoms within the AminoAcid. All Atom objects in list must have the same res_name and res_index. res_index must be indexed from 0, not 1, but this should have happened on Atom initialization.

Attributes
  • atoms (list[Atom]) – The residue’s atoms.

  • name (str) – Name of the residue, e.g. ALA, LEU.

  • index (int) – Index of the residue within the structure.

  • orig_index (int) – Original struct_index. Not set unless the AminoAcid is renumbered.

  • letter (str) – name converted to one letter code.

  • coords (np.ndarray) – x, y, and z coordinates of each atom in a Nx3 numpy ndarray, where N is the number of atoms.

Raises
  • ValueError – During initialization, if the list is empty or atoms do not all have the same res_name and res_index.

  • AttributeError – If AminoAcid has not been renumbered and orig_index is accessed.