parmed.residue module

This module contains basic information and functionality related to individual residues in typical biopolymers.

class parmed.residue.AminoAcidResidue(name, abbr, symbol, aliases=None)[source]

Bases: parmed.residue.BiomolecularResidue

An individual amino acid residue.

Parameters
namestr

The name of the residue

abbrstr

The 3-letter abbreviation of the amino acid residue

symbolstr

The 1-letter symbol of the amino acid

aliaseslist of str, optional

A list of other abbreviations that also refer to this residue

Raises
ValueError

If any aliases have the same abbreviation as other

Methods

get(key[, abbronly])

Gets the amino acid corresponding to either the residue name, 3-letter abbreviation or 1-letter symbol.

has(thing)

Determines if a particular BiomolecularResidue or residue name is present in this classification of biomolecular residues

all_residues = [<Amino Acid Residue Alanine: ALA [A]>, <Amino Acid Residue Arginine: ARG [R]>, <Amino Acid Residue Asparagine: ASN [N]>, <Amino Acid Residue Aspartate: ASP [D]>, <Amino Acid Residue Cysteine: CYS [C]>, <Amino Acid Residue Glutamate: GLU [E]>, <Amino Acid Residue Glutamine: GLN [Q]>, <Amino Acid Residue Glycine: GLY [G]>, <Amino Acid Residue Histidine: HIS [H]>, <Amino Acid Residue Hydroxyproline: HYP [None]>, <Amino Acid Residue Isoleucine: ILE [I]>, <Amino Acid Residue Leucine: LEU [L]>, <Amino Acid Residue Lysine: LYS [K]>, <Amino Acid Residue Methionine: MET [M]>, <Amino Acid Residue Phenylalanine: PHE [F]>, <Amino Acid Residue Proline: PRO [P]>, <Amino Acid Residue Serine: SER [S]>, <Amino Acid Residue Threonine: THR [T]>, <Amino Acid Residue Tryptophan: TRP [W]>, <Amino Acid Residue Tyrosine: TYR [Y]>, <Amino Acid Residue Valine: VAL [V]>]
classmethod get(key, abbronly=False)[source]

Gets the amino acid corresponding to either the residue name, 3-letter abbreviation or 1-letter symbol. It is case-insensitive.

Parameters
keystr

1-letter symbol, 3-letter abbreviation, or residue name

abbronlybool

If True, only look for the 3-letter abbreviation (not the 1-letter symbol)

Returns
residueAminoAcidResidue

The residue corresponding to the given key

Raises
KeyError if key is not a symbol, abbreviation, or case-insensitive
name of an amino acid residue, or any of its abbreviations.
class parmed.residue.DNAResidue(name, abbr, aliases=None)[source]

Bases: parmed.residue.BiomolecularResidue

An individual DNA residue

Parameters
namestr

The name of the residue

abbrstr

The abbreviation of the nucleic acid residue

aliaseslist of str, optional

A list of other abbreviations that also refer to this residue

Methods

get(key)

Gets the nucleic acid corresponding to either the residue name or abbreviation.

has(thing)

Determines if a particular BiomolecularResidue or residue name is present in this classification of biomolecular residues

all_residues = [<DNA Residue Guanine: DG>, <DNA Residue Cytosine: DC>, <DNA Residue Adenine: DA>, <DNA Residue Thymine: DT>]
classmethod get(key)[source]

Gets the nucleic acid corresponding to either the residue name or abbreviation. It is case-insensitive.

Parameters
keystr

abbreviation or residue name

Returns
residueDNAResidue

The residue corresponding to the given key

Raises
KeyError if key is not a recognized residue name or abbreviation for
an DNA residue.
class parmed.residue.RNAResidue(name, abbr, aliases=None)[source]

Bases: parmed.residue.DNAResidue

An individual RNA residue

Parameters
namestr

The name of the residue

abbrstr

The abbreviation of the nucleic acid residue

aliaseslist of str, optional

A list of other abbreviations that also refer to this residue

Methods

get(key)

Gets the nucleic acid corresponding to either the residue name or abbreviation.

has(thing)

Determines if a particular BiomolecularResidue or residue name is present in this classification of biomolecular residues

all_residues = [<RNA Residue Guanine: G>, <RNA Residue Cytosine: C>, <RNA Residue Adenine: A>, <RNA Residue Uracil: U>, <RNA Residue Thymine: T>]
classmethod get(key)[source]

Gets the nucleic acid corresponding to either the residue name or abbreviation. It is case-insensitive.

Parameters
keystr

abbreviation or residue name

Returns
residueRNAResidue

The residue corresponding to the given key

Raises
KeyError if key is not a recognized residue name or abbreviation for
an RNA residue.