AmberResidueType¶
-
class
biskit.AmberResidueType(name=None, code=None, letter=None, source=None)[source]¶ Bases:
biskit.pdbModel.PDBModelStandard 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
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 addChainFromSegidTakes the last letter of the segment ID and adds it as chain ID. addChainIdAssign consecutive chain identifiers A - Z to all atoms. argsortPrepare sorting atoms within residues according to comparison function. atom2chainIndicesConvert atom indices to chain indices. atom2chainMaskMask (set to 0) chains for which all atoms are masked (0) in atomMask. atom2resIndicesGet list of indices of residues for which any atom is in indices. atom2resMaskMask (set 0) residues for which all atoms are masked (0) in atomMask. atom2resProfileGet a residue profile where each residue has the value that its first atom has in the atom profile. atomNamesReturn a list of atom names from start to stop RESIDUE index atomRange>>> m.atomRange() == range( m.lenAtoms() )
atomkeyCreate a string key encoding the atom content of this model independent of the order in which atoms appear within residues. biomodelReturn the ‘biologically relevant assembly’ of this model according to the information in the PDB’s BIOMT record (captured in info[‘BIOMT’]). centerGeometric centar of model. centerOfMassCenter of mass of PDBModel. centeredGet model with centered coordinates. chain2atomIndicesConvert chain indices into atom indices. chain2atomMaskConvert chain mask to atom mask. chainBreaksIdentify discontinuities in the molecule’s backbone. chainEndIndexGet the position of the each residue’s last atom. chainIndexGet indices of first atom of each chain. chainMapGet chain index of each atom. cloneClone PDBModel. compareAtomsGet list of atom indices for this and reference model that converts both into 2 models with identical residue and atom content. compareChainsGet list of corresponding chain indices for this and reference model. compressCompress PDBmodel using mask. concatConcatenate atoms, coordinates and profiles. disconnectDisconnect this model from its source (if any). equalsCompares the residue and atom sequence in the given range. extendIndexTranslate 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. extendMaskTranslate a mask that is defined,e.g., on residues(/chains) to a mask that is defined on atoms. filterExtract atoms that match a combination of key=values. filterIndexGet atom positions that match a combination of key=values. fitLeast-square fit this model onto refMode getAtomsGet atom CrossViews that can be used like dictionaries. getPdbCodeReturn pdb code of model. getXyzGet coordinates, fetch from source PDB or pickled PDBModel, if necessary. index2mapCreate a map of len_i length, giving the residue(/chain) numer of each atom, from list of residue(/chain) starting positions. indicesGet atom indices conforming condition. indicesFromGet atom indices conforming condition applied to an atom profile. keepReplace atoms,coordinates,profiles of this(!) model with sub-set. lenAtomsNumber of atoms in model. lenBiounitsNumber of biological assemblies defined in PDB BIOMT record, if any. lenChainsNumber of chains in model. lenResiduesNumber of residues in model. magicFitSuperimpose this model onto a ref. map2indexIdentify the starting positions of each residue(/chain) from a map giving the residue(/chain) number of each atom. maskGet atom mask. maskBBShort cut for mask of all backbone atoms. maskCAShort cut for mask of all CA atoms. maskCBShort cut for mask of all CB I{and} CA of GLY. maskDNAShort cut for mask of all atoms in DNA (based on residue name). maskFCreate list whith result of atomFunction( atom ) for each atom. maskFromCreate an atom mask from the values of a specific profile. maskHShort cut for mask of hydrogens. maskH2OShort cut for mask of all atoms in residues named TIP3, HOH and WAT maskHeavyShort cut for mask of all heavy atoms. maskHetatmShort cut for mask of all HETATM maskNAShort cut for mask of all atoms in DNA or RNA (based on residue name). maskProteinShort cut for mask containing all atoms of amino acids. maskRNAShort cut for mask of all atoms in RNA (based on residue name). maskSolventShort cut for mask of all atoms in residues named TIP3, HOH, WAT, Na+, Cl-, CA, ZN massMolecular weight of PDBModel. massesCollect the molecular weight of all atoms in PDBModel. mergeChainsMerge two adjacent chains. mergeResiduesMerge two adjacent residues. plotGet a quick & dirty overview over the content of a PDBModel. profileUse:: profile( name, updateMissing=0) -> atom or residue profile profile2atomMaskSame as profile2mask, but converts residue mask to atom mask.profile2maskparam 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 profile2resListGroup the profile values of each residue’s atoms into a separate list. profileChangedFromDiscCheck if profile has changed compared to source. profileInfoUse: removeConvenience access to the 3 different remove methods. removeProfileRemove residue or atom profile(s) removeResRemove all atoms with a certain residue name. renameAmberResRename special residue names from Amber back into standard names (i.e CYX S{->} CYS ) renumberResiduesMake all residue numbers consecutive and remove any insertion code letters. reportPrint (or return) a brief description of this model. reportAtomsparam 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 res2atomIndicesConvert residue indices to atom indices. res2atomMaskConvert residue mask to atom mask. res2atomProfileGet an atom profile where each atom has the value its residue has in the residue profile. resEndIndexGet the position of the each residue’s last atom. resIndexGet the position of the each residue’s first atom. resListReturn list of lists of atom pseudo dictionaries per residue, which allows to iterate over residues and atoms of residues. resMapGet list to map from any atom to a continuous residue numbering (starting with 0). resMapOriginalGenerate list to map from any atom to its ORIGINAL(!) PDB residue number. resModelsCreates one new PDBModel for each residue in the parent PDBModel. residusMaximusTake 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. rmsRmsd between two PDBModels. saveAsPickle this PDBModel to a file, set the ‘source’ field to this file name and mark atoms, xyz, and profiles as unchanged. sequenceAmino acid sequence in one letter code. setPdbCodeSet model pdb code. setSourceparam source: LocalPath OR PDBModel OR str setXyzReplace coordinates. slimRemove 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…). sortApply a given sort list to the atoms of this model. sourceFileName of pickled source or PDB file. structureFitStructure-align this model onto a reference model using the external TM-Align program (which needs to be installed). takeOverriding PDBModel.take to rescue and copy additional fields takeChainsGet copy of this model with only the given chains. takeResiduesCopy the given residues into a new model. transformTransform coordinates of PDBModel. transformationGet the transformation matrix which least-square fits this model onto the other model. unequalAtomsIdentify atoms that are not matching between two models. unsortUndo a previous sorting on the model itself (no copy). updateRead coordinates, atoms, fileName, etc. validSourceCheck for a valid source on disk. versionwritePdbSave model as PDB file. xplor2amberRename atoms so that tleap from Amber can read the PDB. xyzChangedFromDiscTell whether xyz can currently be reconstructed from a source on disc. xyzIsChangedTell 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