# Module MMTK.Proteins

## Functions

- isPeptideChain()

  Returns 1 f x is a peptide chain.

- isProtein()

  Returns 1 f x is a protein.

## Class Residue: Amino acid residue

A subclass of MMTK.ChemicalObjects.Group.

Amino acid residues are a special kind of group. Like any other group, they are defined in the chemical database. Each residue has two subgroups (`peptide` and `sidechain`) and is usually connected to other residues to form a peptide chain. The database contains three variants of each residue (N-terminal, C-terminal, non-terminal) and various models (all-atom, united-atom, C_alpha).

Constructor: Residue(kind, model="all")

kind

  the name of the residue in the chemical database. This is the full name of the residue plus the suffix "_nt" or "_ct" for the terminal variants.

model

  one of "all" (all-atom), "none" (no hydrogens), "polar" (united-atom with only polar hydrogens), "polar_charmm" (like "polar", but defining polar hydrogens like in the CHARMM force field), "polar_opls" (like "polar", but defining polar hydrogens like in the latest OPLS force field), "calpha" (only the C_alpha atom)

Methods:

- backbone()

  Returns the peptide group.

- sidechains()

  Returns the sidechain group.

- phiPsi(conf=`None`)

  Returns the values of the backbone dihedral angles phi and psi.

## Class PeptideChain: Peptide chain

A subclass of MMTK.Biopolymers.ResidueChain.

Peptide chains consist of amino acid residues that are linked by peptide bonds. They are a special kind of molecule, i.e. all molecule operations are available.

Constructor: PeptideChain(sequence, **|properties|)

sequence

  the amino acid sequence. This can be a string containing the one-letter codes, or a list of three-letter codes, or a PDBPeptideChain object. If a PDBPeptideChain object is supplied, the atomic positions it contains are assigned to the atoms of the newly generated peptide chain, otherwise the positions of all atoms are undefined.

properties

  optional keyword properties:

- model: one of "all" (all-atom), "no_hydrogens" or "none" (no hydrogens), "polar_hydrogens" or "polar" (united-atom with only polar hydrogens), "polar_charmm" (like "polar", but defining polar hydrogens like in the CHARMM force field), "polar_opls" (like "polar", but defining polar hydrogens like in the latest OPLS force field), "calpha" (only the C_alpha atom of each residue). Default is "all".

- n_terminus: 1 if the first residue should be constructed using the N-terminal variant, 0 if the non-terminal version should be used. Default is 1.

- c_terminus: 1 if the last residue should be constructed using the C-terminal variant, 0 if the non-terminal version should be used. Default is 1.

- circular: 1 if a peptide bond should be constructed between the first and the last residue. Default is 0.

- name: a name for the chain (a string)

Peptide chains act as sequences of residues. If `p` is a PeptideChain object, then

- `len(p)` yields the number of residues

- `p[i]` yields residue number `i` (counting from zero)

- `p[i:j]` yields the subchain from residue number `i` up to but excluding residue number `j`

Methods:

- sequence()

  Returns the primary sequence as a list of three-letter residue codes.

- backbone()

  Returns a collection containing the peptide groups of all residues.

- sidechains()

  Returns a collection containing the sidechain groups of all residues.

- phiPsi(conf=`None`)

  Returns a list of the (phi, psi) backbone angle pairs for each residue.

- replaceResidue(r_old, r_new)

  Replaces residue r_old, which must be a residue object that is part of the chain, by the residue object r_new.

## Class SubChain: A contiguous part of a peptide chain

SubChain objects are the result of slicing operations on PeptideChain objects. They cannot be created directly. SubChain objects permit all operations of PeptideChain objects, but cannot be added to a universe.

## Class Protein: Protein

A subclass of MMTK.Complex.

A Protein object is a special kind of a Complex object which is made up of peptide chains.

Constructor: Protein(specification, **|properties|)

specification

  one of:

- a list of peptide chain objects

- a string, which is interpreted as the name of a database definition for a protein. If that definition does not exist, the string is taken to be the name of a PDB file, from which all peptide chains are constructed and assembled into a protein.

properties

  optional keyword properties:

- model: one of "all" (all-atom), "no_hydrogens" or "none" (no hydrogens), "polar_hydrogens" or "polar" (united-atom with only polar hydrogens), "polar_charmm" (like "polar", but defining polar hydrogens like in the CHARMM force field), "polar_opls" (like "polar", but defining polar hydrogens like in the latest OPLS force field), "calpha" (only the C_alpha atom of each residue). Default is "all".

- position: the center-of-mass position of the protein (a vector)

- name: a name for the protein (a string)

If the atoms in the peptide chains that make up a protein have defined positions, sulfur bridges within chains and between chains will be constructed automatically during protein generation based on a distance criterion between cystein sidechains.

Proteins act as sequences of chains. If `p` is a Protein object, then

- `len(p)` yields the number of chains

- `p[i]` yields chain number `i` (counting from zero)

Methods:

- residuesOfType(*types)

  Returns a collection that contains all residues whose type (one- or three-letter code) is contained in types.

- backbone()

  Returns a collection containing the peptide groups of all residues in all chains.

- sidechains()

  Returns a collection containing the sidechain groups of all residues in all chains.

- residues()

  Returns a collection containing all residues in all chains.

- phiPsi(conf=`None`)

  Returns a list containing the phi/psi backbone dihedrals for all chains.