AmberResidueType

class biskit.AmberResidueType(name=None, code=None, letter=None, source=None)[source]

Bases: biskit.pdbModel.PDBModel

Standard description of a certain class of residues.

In addition to the normal PDBModel things, this class defines three additional fields:

  • name … the full long residue name (str), e.g. ‘Alanine’
  • code … the three-letter name used in PDB files (str), e.g. ‘ALA’
  • letter … the single-letter residue code (str), e.g. ‘A’

The order and names of atoms are supposed to serve as a reference to check and normalize actual residues parsed from PDB files.

Currently, AmberResidueTypes can only be created from Amber prep library files.

An alternative method would be to create AmberResidueTypes from some standard PDB file:

>>> m = PDBModel('standard_aa.pdb')
>>> standard_res = [ AmberResidueType( res ) for res in m.resModels() ]

See also

AmberPrepParser

Methods Overview

__init__
param name:full residue name (converted to lower letters) :type name: str :param code: three-letter residue code (converted to upper letters) :type code: str :param letter: single-letter residue code (converted to upper letter) :type letter: str :param source: pdb file, model or structure of residue from which to extract all the other data :type source: PDBModel or str
addChainFromSegid Takes the last letter of the segment ID and adds it as chain ID.
addChainId Assign consecutive chain identifiers A - Z to all atoms.
argsort Prepare sorting atoms within residues according to comparison function.
atom2chainIndices Convert atom indices to chain indices.
atom2chainMask Mask (set to 0) chains for which all atoms are masked (0) in atomMask.
atom2resIndices Get list of indices of residues for which any atom is in indices.
atom2resMask Mask (set 0) residues for which all atoms are masked (0) in atomMask.
atom2resProfile Get a residue profile where each residue has the value that its first atom has in the atom profile.
atomNames Return a list of atom names from start to stop RESIDUE index
atomRange
>>> m.atomRange() == range( m.lenAtoms() )
atomkey Create a string key encoding the atom content of this model independent of the order in which atoms appear within residues.
biomodel Return the ‘biologically relevant assembly’ of this model according to the information in the PDB’s BIOMT record (captured in info[‘BIOMT’]).
center Geometric centar of model.
centerOfMass Center of mass of PDBModel.
centered Get model with centered coordinates.
chain2atomIndices Convert chain indices into atom indices.
chain2atomMask Convert chain mask to atom mask.
chainBreaks Identify discontinuities in the molecule’s backbone.
chainEndIndex Get the position of the each residue’s last atom.
chainIndex Get indices of first atom of each chain.
chainMap Get chain index of each atom.
clone Clone PDBModel.
compareAtoms Get list of atom indices for this and reference model that converts both into 2 models with identical residue and atom content.
compareChains Get list of corresponding chain indices for this and reference model.
compress Compress PDBmodel using mask.
concat Concatenate atoms, coordinates and profiles.
disconnect Disconnect this model from its source (if any).
equals Compares the residue and atom sequence in the given range.
extendIndex Translate a list of positions that is defined, e.g., on residues (/chains) to a list of atom positions AND also return the starting position of each residue (/chain) in the new sub-list of atoms.
extendMask Translate a mask that is defined,e.g., on residues(/chains) to a mask that is defined on atoms.
filter Extract atoms that match a combination of key=values.
filterIndex Get atom positions that match a combination of key=values.
fit Least-square fit this model onto refMode
getAtoms Get atom CrossViews that can be used like dictionaries.
getPdbCode Return pdb code of model.
getXyz Get coordinates, fetch from source PDB or pickled PDBModel, if necessary.
index2map Create a map of len_i length, giving the residue(/chain) numer of each atom, from list of residue(/chain) starting positions.
indices Get atom indices conforming condition.
indicesFrom Get atom indices conforming condition applied to an atom profile.
keep Replace atoms,coordinates,profiles of this(!) model with sub-set.
lenAtoms Number of atoms in model.
lenBiounits Number of biological assemblies defined in PDB BIOMT record, if any.
lenChains Number of chains in model.
lenResidues Number of residues in model.
magicFit Superimpose this model onto a ref.
map2index Identify the starting positions of each residue(/chain) from a map giving the residue(/chain) number of each atom.
mask Get atom mask.
maskBB Short cut for mask of all backbone atoms.
maskCA Short cut for mask of all CA atoms.
maskCB Short cut for mask of all CB I{and} CA of GLY.
maskDNA Short cut for mask of all atoms in DNA (based on residue name).
maskF Create list whith result of atomFunction( atom ) for each atom.
maskFrom Create an atom mask from the values of a specific profile.
maskH Short cut for mask of hydrogens.
maskH2O Short cut for mask of all atoms in residues named TIP3, HOH and WAT
maskHeavy Short cut for mask of all heavy atoms.
maskHetatm Short cut for mask of all HETATM
maskNA Short cut for mask of all atoms in DNA or RNA (based on residue name).
maskProtein Short cut for mask containing all atoms of amino acids.
maskRNA Short cut for mask of all atoms in RNA (based on residue name).
maskSolvent Short cut for mask of all atoms in residues named TIP3, HOH, WAT, Na+, Cl-, CA, ZN
mass Molecular weight of PDBModel.
masses Collect the molecular weight of all atoms in PDBModel.
mergeChains Merge two adjacent chains.
mergeResidues Merge two adjacent residues.
plot Get a quick & dirty overview over the content of a PDBModel.
profile Use:: profile( name, updateMissing=0) -> atom or residue profile
profile2atomMask Same as profile2mask, but converts residue mask to atom mask.
profile2mask
param cutoff_min:
 low value cutoff (all values >= cutoff_min) :type cutoff_min: float :param cutoff_max: high value cutoff (all values < cutoff_max) :type cutoff_max: float
profile2resList Group the profile values of each residue’s atoms into a separate list.
profileChangedFromDisc Check if profile has changed compared to source.
profileInfo Use:
remove Convenience access to the 3 different remove methods.
removeProfile Remove residue or atom profile(s)
removeRes Remove all atoms with a certain residue name.
renameAmberRes Rename special residue names from Amber back into standard names (i.e CYX S{->} CYS )
renumberResidues Make all residue numbers consecutive and remove any insertion code letters.
report Print (or return) a brief description of this model.
reportAtoms
param i:optional list of atom positions to report (default: all) :type i: [ int ] :return: formatted string with atom and residue names similar to PDB :rtype: str
res2atomIndices Convert residue indices to atom indices.
res2atomMask Convert residue mask to atom mask.
res2atomProfile Get an atom profile where each atom has the value its residue has in the residue profile.
resEndIndex Get the position of the each residue’s last atom.
resIndex Get the position of the each residue’s first atom.
resList Return list of lists of atom pseudo dictionaries per residue, which allows to iterate over residues and atoms of residues.
resMap Get list to map from any atom to a continuous residue numbering (starting with 0).
resMapOriginal Generate list to map from any atom to its ORIGINAL(!) PDB residue number.
resModels Creates one new PDBModel for each residue in the parent PDBModel.
residusMaximus Take list of value per atom, return list where all atoms of any residue are set to the highest value of any atom in that residue.
rms Rmsd between two PDBModels.
saveAs Pickle this PDBModel to a file, set the ‘source’ field to this file name and mark atoms, xyz, and profiles as unchanged.
sequence Amino acid sequence in one letter code.
setPdbCode Set model pdb code.
setSource
param source:LocalPath OR PDBModel OR str
setXyz Replace coordinates.
slim Remove xyz array and profiles if they haven’t been changed and could hence be loaded from the source file (only if there is a source file…).
sort Apply a given sort list to the atoms of this model.
sourceFile Name of pickled source or PDB file.
structureFit Structure-align this model onto a reference model using the external TM-Align program (which needs to be installed).
take Overriding PDBModel.take to rescue and copy additional fields
takeChains Get copy of this model with only the given chains.
takeResidues Copy the given residues into a new model.
transform Transform coordinates of PDBModel.
transformation Get the transformation matrix which least-square fits this model onto the other model.
unequalAtoms Identify atoms that are not matching between two models.
unsort Undo a previous sorting on the model itself (no copy).
update Read coordinates, atoms, fileName, etc.
validSource Check for a valid source on disk.
version
writePdb Save model as PDB file.
xplor2amber Rename atoms so that tleap from Amber can read the PDB.
xyzChangedFromDisc Tell whether xyz can currently be reconstructed from a source on disc.
xyzIsChanged Tell if xyz or atoms have been changed compared to source file or source object (which can be still in memory).

Attributes Overview

PDB_KEYS

AmberResidueType Method & Attribute Details

__init__(name=None, code=None, letter=None, source=None)[source]
Parameters:
  • name (str) – full residue name (converted to lower letters)
  • code (str) – three-letter residue code (converted to upper letters)
  • letter (str) – single-letter residue code (converted to upper letter)
  • source (PDBModel or str) – pdb file, model or structure of residue from which to extract all the other data
take(i, rindex=None, cindex=None, *initArgs, **initKw)[source]

Overriding PDBModel.take to rescue and copy additional fields