Rosetta
 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

Definition at line 966 of file loadPDB.py.

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.

Definition at line 815 of file loadPDB.py.

References ObjexxFCL.len().

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    

Definition at line 1033 of file loadPDB.py.

def loadPDB.calcCAcentroid (   loadedPDB)

Definition at line 997 of file loadPDB.py.

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

Referenced by center_at_origin().

def loadPDB.center_at_origin (   pdb)

Definition at line 773 of file loadPDB.py.

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

Definition at line 901 of file loadPDB.py.

References ObjexxFCL.len().

def loadPDB.condenseReslist (   resList)

Definition at line 1050 of file loadPDB.py.

References ObjexxFCL.len().

Referenced by printResList().

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

Definition at line 614 of file loadPDB.py.

References is_bb_complete().

Referenced by loadProt().

def loadPDB.corr_int (   resid)

Definition at line 21 of file loadPDB.py.

def loadPDB.extractChains (   loadedPDB,
  chains 
)

Definition at line 861 of file loadPDB.py.

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

Definition at line 941 of file loadPDB.py.

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

Definition at line 697 of file loadPDB.py.

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

Referenced by writeMultipleModels(), and writeSinglePDB().

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

Definition at line 677 of file loadPDB.py.

References outputCoords().

Referenced by generate_one_model().

def loadPDB.get_index (   loadedPDB,
  resnum 
)

Definition at line 1002 of file loadPDB.py.

References ObjexxFCL.len().

def loadPDB.getCAlist (   loadedPDB)

Definition at line 988 of file loadPDB.py.

Referenced by calcCAcentroid().

def loadPDB.getCentroid (   atomlist)

Definition at line 809 of file loadPDB.py.

References coordlib.vavg().

def loadPDB.getLigands (   loadedPDB)

Definition at line 851 of file loadPDB.py.

References ObjexxFCL.len().

def loadPDB.getSequence (   loadedPDB)

Definition at line 958 of file loadPDB.py.

Referenced by loadPDB.ProteinChain.parse().

def loadPDB.is_bb_complete (   PDBres)

Definition at line 558 of file loadPDB.py.

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

Definition at line 571 of file loadPDB.py.

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

Definition at line 633 of file loadPDB.py.

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

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

def loadPDB.loadProtein (   pdbfile)

Definition at line 659 of file loadPDB.py.

References loadProt().

def loadPDB.outputCoords (   coords)

Definition at line 670 of file loadPDB.py.

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.

Definition at line 588 of file loadPDB.py.

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.

Definition at line 873 of file loadPDB.py.

References ObjexxFCL.len().

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.

Definition at line 824 of file loadPDB.py.

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

def loadPDB.printResList (   resList)

Definition at line 1073 of file loadPDB.py.

References condenseReslist(), and ObjexxFCL.len().

def loadPDB.reset_chain (   loadedPDB,
  chain 
)

Definition at line 936 of file loadPDB.py.

def loadPDB.resetChain (   loadedPDB,
  newChain 
)

Definition at line 893 of file loadPDB.py.

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

Definition at line 1022 of file loadPDB.py.

References transformResCoords().

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

def loadPDB.transformResCoords (   PDBres,
  tran,
  rot 
)

Definition at line 1011 of file loadPDB.py.

Referenced by transformCoords().

def loadPDB.translatePDB (   pdb,
  vector 
)

Definition at line 795 of file loadPDB.py.

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)

Definition at line 739 of file loadPDB.py.

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

def loadPDB.writeSinglePDB (   loadedPDB,
  filename 
)

Definition at line 731 of file loadPDB.py.

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

Referenced by loadProt().

def loadPDB.writeToPDB (   outputLines,
  filename 
)

Definition at line 726 of file loadPDB.py.

References basic::database.open().

Referenced by generate_one_model(), writeMultipleModels(), and writeSinglePDB().

Variable Documentation

int loadPDB.output_clean_pdb = 0

Definition at line 19 of file loadPDB.py.

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  }

Definition at line 535 of file loadPDB.py.