Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
loadPDB Namespace Reference

Classes

class  chainType
 
class  new_PDBatom
 
class  PDBatom
 
class  PDBres
 
class  Protein
 
class  ProteinChain
 

Functions

def corr_int
 
def is_bb_complete
 
def loadAtoms
 
def parseAtomList
 
def convert_to_loadedPDB
 
def loadProt
 
def loadProtein
 
def outputCoords
 
def generatePDB
 
def generate_one_model
 
def writeToPDB
 
def writeSinglePDB
 
def writeMultipleModels
 
def center_at_origin
 
def translatePDB
 
def getCentroid
 
def addIndices
 
def popLigands
 
def getLigands
 
def extractChains
 
def parseByChain
 
def resetChain
 
def combine_identical_chains
 
def reset_chain
 
def extractResidues
 
def getSequence
 
def addasa
 
def getCAlist
 
def calcCAcentroid
 
def get_index
 
def transformResCoords
 
def transformCoords
 
def axisangle_to_rot
 
def condenseReslist
 
def printResList
 

Variables

int output_clean_pdb = 0
 
dictionary restypedict
 

Function Documentation

def loadPDB.addasa (   loadedPDB,
  pdbfile 
)
Call naccess on a pdb and then add the information into each residue of
the loadedPDB

References basic::database.open(), and popLigands().

def loadPDB.addIndices (   loadedPDB,
  start = 0 
)
Adds numerical indices to residues in a loadedPDB to facilitate
later data processing.

References ObjexxFCL.len(), and basic::options::OptionKeys::relax::range.range.

Referenced by calccontacts.contactProtein.find_contacts(), and loadProt().

def loadPDB.axisangle_to_rot (   axis,
  angle 
)
Converts a rotation axis and angle to a rotation matrix where
a clockwise rotation is a positive value of 'angle'
from Martin Baker
http://www.euclideanspace.com/maths/geometry/rotations/conversions/
angleToMatrix/index.htm    
def loadPDB.calcCAcentroid (   loadedPDB)

References getCAlist(), and coordlib.vavg().

Referenced by center_at_origin().

def loadPDB.center_at_origin (   pdb)

References calcCAcentroid().

def loadPDB.combine_identical_chains (   chainParsedPDB)
Input:  chainParsedPDB (output of parseByChain(loadedPDB))
Method:  using Nres of each chain, detect identical chain.  For ex., if I
had four chains with following Nres:

[141,146,141,146]

I would split the list as follows:

[ [141,141], [146,146] ]

This allows me to compare identical monomers

References ObjexxFCL.len(), and basic::options::OptionKeys::relax::range.range.

def loadPDB.condenseReslist (   resList)
def loadPDB.convert_to_loadedPDB (   resAtomList)
Input:  a list of PDBatoms parsed into residues
Output: a loadedPDB (each residue is converted to a PDBres class instance)

Residues with missing backbone atoms are skipped, and the global flag
output_clean_pdb is turned on so that a new pdb will be created without the
missing backbone

References is_bb_complete().

Referenced by loadProt().

def loadPDB.corr_int (   resid)
def loadPDB.extractChains (   loadedPDB,
  chains 
)

References ObjexxFCL.len().

Referenced by calccontacts.parse_and_pair().

def loadPDB.extractResidues (   loadedPDBchain,
  resnum1,
  resnum2 
)
inputs:
loadedPDBchain - a single chain of a pdb
resnum1, resnum2 - the range to extract

No protection against multiple chains
def loadPDB.generate_one_model (   splitPDB)
Input:  a loadedPDB split by chains
Output:  a list of PDB lines, with secondary structure at the beginning
and TERs at the end of each chain

Thanks to:
DSSP: W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637
(secondary structure determination)
dssp2pdb (James Stroud, 2002) - converting DSSP secondary structure
assignments to pdb format

References generatePDB(), basic::database.open(), and writeToPDB().

Referenced by writeMultipleModels(), and writeSinglePDB().

def loadPDB.generatePDB (   loadedPDB)
Output a loadedPDB in PDB format

References outputCoords().

Referenced by generate_one_model().

def loadPDB.get_index (   loadedPDB,
  resnum 
)
def loadPDB.getCAlist (   loadedPDB)

Referenced by calcCAcentroid().

def loadPDB.getCentroid (   atomlist)

References coordlib.vavg().

def loadPDB.getLigands (   loadedPDB)

References ObjexxFCL.len().

def loadPDB.getSequence (   loadedPDB)
def loadPDB.is_bb_complete (   PDBres)

Referenced by convert_to_loadedPDB().

def loadPDB.loadAtoms (   pdb)
takes opened pdb file 'pdb' and reduces each ATOM entry to a
PDBatom as defined
in the PDBatom class above.
the output is a list of PDBatoms
At this step, waters and hydrogens are removed

Referenced by loadProt().

def loadPDB.loadProt (   pdbfile)
combines above functions
Input is a pdb file
Output is a the output of function reduceReslist above.
Function proceeds in several steps:
1) Extract ATOM lines and reduce them to pdbatom classes (function
loadAtoms)
2) Parse pdbatom list (result of (1)) into residues (function
getResidues) and convert to PDBres classes

References addIndices(), convert_to_loadedPDB(), loadAtoms(), basic::database.open(), parseAtomList(), and writeSinglePDB().

Referenced by calccontacts.contactProtein.initializePDB(), and loadProtein().

def loadPDB.loadProtein (   pdbfile)

References loadProt().

def loadPDB.outputCoords (   coords)

Referenced by generatePDB().

def loadPDB.parseAtomList (   pdbatoms)
takes a list of pdbatoms (output of loadAtoms above) and splits
it into sublists, one for each residue
The output looks like the following:
[[atom1, atom2, ... , atom-Natoms(res1)] , [atom1, atom2, ... ,
atom-Natoms(res2)] , ... , Nres]
The format of the pdbatom entries does not change, only the list
structure.

References ObjexxFCL.len().

Referenced by loadProt().

def loadPDB.parseByChain (   loadedPDB)
Parse a loadedPDB into chains.
Input:  loadedPDB (output of loadProt())
Output:  a nested list of chains corresponding to loadedPDB

Just a standard parsing routine.

References ObjexxFCL.len(), and basic::options::OptionKeys::relax::range.range.

Referenced by loadPDB.Protein.parse(), writeMultipleModels(), and writeSinglePDB().

def loadPDB.popLigands (   loadedPDB)
removes ligands from a loadedPDB object and returns them.
Input:   a loadedPDB object (output of loadProt)
Output:  ligands are removed from loadedPDB
         function returns the ligands

Intended usage:  Some protein structure calculations use ligands (e.g.
contacts), while others must ignore them (protein torsion angles).
For the latter kind of calculation, this allows you to remove the ligands
during the calculation but have them handy to add back in at the end to
preserve the pdb.

Referenced by addasa(), calccontacts.contactProtein.find_contacts(), and calccontacts.parse_and_pair().

def loadPDB.printResList (   resList)
def loadPDB.reset_chain (   loadedPDB,
  chain 
)
def loadPDB.resetChain (   loadedPDB,
  newChain 
)

Referenced by writeMultipleModels().

def loadPDB.transformCoords (   loadedPDB,
  tran,
  rot 
)
Input:  loadedPDB, a translation vector, and a rotation matrix
Output: a new loadedPDB with the desired transformations

References transformResCoords().

Referenced by loadPDB.ProteinChain.transformall(), and loadPDB.Protein.transformall().

def loadPDB.transformResCoords (   PDBres,
  tran,
  rot 
)

Referenced by transformCoords().

def loadPDB.translatePDB (   pdb,
  vector 
)
def loadPDB.writeMultipleModels (   loadedPDBlist,
  filename 
)
For writing multiple models of the same protein to a pdb file.

1) Each model must be bracketed by 'MODEL' and 'ENDMDL' keywords so
that viewer programs do not bond distinct models together
2) Each chain must have a unique chainID so that they can be
distinguished by viewer programs
3) secondary structure and TERs (see generate_one_model)

References generate_one_model(), parseByChain(), resetChain(), and writeToPDB().

def loadPDB.writeSinglePDB (   loadedPDB,
  filename 
)

References generate_one_model(), parseByChain(), and writeToPDB().

Referenced by loadProt().

def loadPDB.writeToPDB (   outputLines,
  filename 
)

Variable Documentation

int loadPDB.output_clean_pdb = 0
dictionary loadPDB.restypedict
Initial value:
1 = {
2  'ALA': 'A',
3  'CYS': 'C',
4  'ASP': 'D',
5  'GLU': 'E',
6  'PHE': 'F',
7  'GLY': 'G',
8  'HIS': 'H',
9  'ILE': 'I',
10  'LYS': 'K',
11  'LEU': 'L',
12  'MET': 'M',
13  'ASN': 'N',
14  'PRO': 'P',
15  'GLN': 'Q',
16  'ARG': 'R',
17  'SER': 'S',
18  'THR': 'T',
19  'VAL': 'V',
20  'TRP': 'W',
21  'TYR': 'Y',
22  }