protocol
index
protocol.py

high-level initialization routines.
 
These routines provide high level interfaces to initialize potential terms
and to set up minimization and dynamics calculations.

 
Classes
       
InitCoordsResult

 
class InitCoordsResult
     A class to simplify returning B factors and occupancies read
    during a call to initCoords 
 
  Methods defined here:
__init__(self)

 
Functions
       
addDisulfideBond(sel1, sel2)

    deprecated. Calls psfGen.addDisulfideBond
    
cartesianTopology(ivm, sel='known', oTensors=[])
configure the ivm.IVM tolopogy for Cartesian dynamics/minimization -
    for the specified selection.
 
    This consists of breaking topological bonds, and specifying that all atoms
    are tree ``bases.''
 
    This function should be called after any custom changes are made to the
    ivm's topology setup, but before torsionTopology().
 
    oTensors is a list of varTensor.VarTensor objects used for alignment
    tensors
    
downloadPDB(entry)
download a compressed PDB file from the RCSB database
    return the PDB record as a string.
    
genExtendedStructure(pdbFilename=0, sel=0, verbose=0, maxFixupIters=500)

    This assigns X, Y, and Z coordinates to each atom, and then calls
    protocol.fixupCovalentGeom() to correct the covalent geometry, using
    maxFixupIters as the maxIters argument to that function.
 
    The Y and Z coordinates are random (but small enough (within a range
    of -0.5 to 0.5) to allow bonded atoms to form their bonds) and the X
    coordinate is the atom number divided by 10. This will result in
    an extended configuration along the X axis.
 
    If pdbFilename is nonnull, the file will be read if it exists, and that
    structure wil be used as a starting point (an attempt will be made to fix
    the the covalent geom).
 
    Whether it exists or not, it will be written to before returning.
    
initCarb13(filenames=[], scale=0.5)
initialize the XPLOR carbon chemical shift potential term.
 
    arguments are:
       filenames   - either a single filename, or a sequence of filenames of
                     chemical shift assignment tables.
 
    In addition to these files C13SHIFTS:rcoil_c13.tbl and
    C13SHIFTS:expected_edited.tbl are always added.
    
initCollapse(sel='all', Rtarget=-1, scale=1)
initialize the XPLOR radius of gyration potential term.
 
    parameters are:
       sel - string or atom selection specifying atoms in include in the
             Rgyr calculation. If this is omitted, all atoms are included.
       Rtarget - target radius. If this is omitted, the target Rgyr is
                 calculated as
                    Rgyr = 2.2*numResidues^0.38 -1 [angstrom]
      scale - scale factor. If omitted, it defaults to 1. Note that the
              per-assignment scale is always 100, so the energy is actually
              scaled by 100*scale.
    
initCoords(files=[], string='', model=-1, verbose=-1, erase=False, useChainID=True, correctSymmetricSidechains=True, strictResNames=False, maxUnreadEntries=(20, 0.20000000000000001), deleteUnknownAtoms=False, selection='all')

    Initialize coordinates from one of more pdb file,
      or from a string containing a PDB entry.
 
    if model is specified, the specified PDB MODEL record will be read.
 
    if erase is set to True, then atom positions in selection are cleared
    before reading the pdb record.
 
    If useChainID is True (the default), then the the chain ID PDB field is
    used as the segment name (if set), If the chain ID field is blank it is
    ignored regardless.
 
    If deleteUnknownAtoms is True, then atoms whose coordinates are still
    unknown after the PDB file is read will be deleted
    
    If correctSymmetricSidechains is True (the default), then the sidechains
    of phe, tyr, asp, and glu residues are checked to ensure that their
    symmetric torsion angles (chi3 for glu, chi2 for the rest) are in
    the correct (0..180 degree) range. If they are incorrect, then atomic
    positions are swapped using selectTools.correctSymmetricSidechains.
 
    If strictResNames is True, then residue names in the PDB must match
    those in the PSF, otherwise, the residue names need not match
    and backbone atoms for mutants can be read. Note that sidechain atoms (or
    base atoms in nucleic acids) may be strangely placed if this option is
    False.
 
    PDB ATOM records which do not exactly match the expected input (the
    atom name is not exactly the same) are attempted to be matched using the
    function matchInexactAtomEntry. If more than maxUnreadEntries[0] or
    maxUnreadEntries[1]*(num atoms) unmatchable ATOM records are
    encountered, an exception is thrown. This check is disabled (no exception
    will be thrown) if maxUnreadEntries is set to None.
    
initDihedrals(filenames=[], string='', scale=1, useDefaults=1, simulation=0)
initialize the XPLOR restraints dihe (CDIH) potential term.
 
    parameters are:
       filenames   - either a single filename, or a sequence of filenames of
                     dihedral restraint assignment tables.
       string      - assignment table as a plain string.
       scale       - scale factor (defaults to 1).
       useDefaults - use the default sidechain restraints (default: TRUE)
                     these force chi2 angles of PHE, TYR, ASP, and chi3 of GLU
                     to obey IUPAC naming conventions.
    
initDynamics(ivm, bathTemp=-1, finalTime=0.20000000000000001, numSteps=0, stepsize=0.001, potList=0, printInterval=50, initVelocities=0, eTol_factor=0.001, eTol_minimum=0)

    initialize an IVM object (from the ivm module)
    for PC6 (6th order predictor-corrector) dynamics.
    The default value of bathTemp is the ivm's current value.
 
    In addition to the function arguments, the following IVM parameters are
    initialized:
      constraintLengths
      maxDeltaE
      responseTime
      eTolerance
      adjustStepsize
      scaleVel
      resetCMInterval
 
    additionally, if initVelocities!=0, the initial velocities will be
    randomized.
 
    eTolerance is set by the following formula:
       eTolerance = eTol_factor * bathTemp + eTol_minimum
    
initHBDA(filename, scale=500, simulation=0)
initialize the XPLOR hbda potential term
    
initHBDB(selection='not resname ANI', prnfrq=0)
initialize the XPLOR hbdb potential term
    database hydrogen-bonding term - h-bonds are determined dynamically.
 
    the selection argument specifies which atoms in included in the
    calculation.
 
    prnfrq can be changed from zero to periodically print out HBDB info during
    dynamics and minimization.
 
    The HBDB term may have issues with hetereo multimers. Please use with
    caution.
    
    
initMinimize(ivm, potList=0, printInterval=10, numSteps=500, maxCalls=20000, dEPred=0.001)
initialize an IVM object (from the ivm module)
    for Powell minimization.
 
    In addition to the function arguments, the following IVM parameters are
    initialized:
      constrainLengths
      maxDeltaE
      eTolerance
      gTolerance
    
initNBond(cutnb=4.5, rcon=4.0, nbxmod=3, selStr='known', tolerance=0.5, repel=0.80000000000000004, onlyCA=0, simulation=0)
standard initialization of the non-bonded repel potential. The XPLOR
    nonbonded potential term is described here
 
    note that cutnb should be greater than rmax + 2*tolerance, where rmax
    is the largest vdw radius.
 
    selStr specifies which atoms to use in nonbonded energy calculations.
    
    If onlyCA is True, this string gets set to "name CA" - but this option is
    deprecated.
    
initParams(files, reset=0, weak_omega=0, simulation=0)
file is a structure type or filename or a list of a combination of
    these two.
 
    valid structure types are: protein, nucleic, and water
 
    The default protein, nucleic and water parameter files are specified in
    the protocol.parameters dictionary. Default values can be modified from
    a script using e.g.
       import protocol
       protocol.parameters['protein'] = '/path/to/other/file.par' 
 
    If the argument is a filename, the current directory is first searched
    for the file, and then the TOPPAR directory is searched.
    XPLOR parameters are documented here.
    If reset is true, all previous parameter settings are discarded
    If weak_omega is true, improper force constants associated with the
    peptide bond are reduced by 1/2 to allow a small amount of flexibility.
    
initRamaDatabase(type='protein', simulation=0)
standard initialization of the rama torsion-angle database potential.
    
initRandomSeed(seed=None)
set the initial random seed. If the seed argument is omitted, it is set
    to seconds from the epoch mod 10^7
    
initStruct(files=0, erase=1, simulation=0)
read XPLOR PSF files.
 
    the file argument is a filename or list of filenames to read.
    First the current directory is searched for the file, and then TOPPAR
    is searched. Alternatively, a psf entry (starting with PSF...) can be
    directly passed as the files argument.
 
    Any pre-existing structure information is erased unless the erase argument
    is cleared. 
    
initTopology(files, reset=0, simulation=0)
file is a structure type or filename or a list of a combination of
    these two.
 
    valid structure types are: protein, nucleic, and water
 
    The default protein, nucleic and water topology files are specified in
    the protocol.topology dictionary. Default values can be modified from
    a script using e.g.
       import protocol
       protocol.topology['protein'] = '/path/to/other/file.top' 
 
    First the current directory is searched for the file, and then TOPPAR
    is searched.
    XPLOR topology is documented here.
    If reset is true, all previous topology settings are discarded
    
initialRandomSeed()
return the initial random seed value, or that from
    simulationWorld.random if initRandomSeed has not been called.
    
loadPDB(file='', string='', entry='', model=-1, simulation=None, deleteUnknownAtoms=False, verbose=-1)
load a PDB entry from file, string, or from the RCSB database.
    autogenerate the psf and initialize coordinates.
 
    deleteUnknownAtoms is passed to initCoords()
 
    A side-effect is that protein or nucleic covalent force field parameters
    are loaded by initParams()
    
matchInexactAtomEntry(entry, pdbTool, selection, strictResNames, verbose=0)
 try to match a PDB record to an atom if the name is not exactly the
    same. The coordinates will only be overwritten if they are unknown.
 
    The current algorithm for matching is as follows:
      match H to HT1 
      else match if there's only a single undefined atom whose name starts
      with the same character.
      else
      match if atom names start with the same character and the remainder
      of the characters are simple tranpositions of each other.
      else
      match if there's only a single undefined atom whose name starts
      with and ends with the same character.
      else
      match if the first name of the name is a digit present in the correct
      atom name and the second character matches the first character of the
      correct name.
      else
      match if the two names have two matching characters.
      else
      match up   O --> OT1
               OXT --> OT2
 
      If the match is not unique, it is not made.
 
    The residue number and segment id must match.
 
    Entries with nonnumeric residue numbers are ignored.
 
    For atoms with residue names corresponding to those of pseudo atoms
    (e.g. ANI), this function prints a warning on missing atoms, but returns
    a True value.
 
    If strictResNames is True, then residue names in the PDB must match
    those in the PSF (default), otherwise, the residue names need not match
    and backbone atoms for mutants can be read. Note that sidechain atoms (or
    base atoms in nucleic acids) may be strangely placed if this option is
    False.
 
    
syncArrayBeforeDelete(anArray, selectionToDelete)
 Given an array of values indexed by atom number, and a selection of
    atoms to be deleted, remove the entries in the array so that they will
    match up with the correct atoms after the atoms are actually deleted 
torsionTopology(ivm, fixedOmega=0, oTensors=[])
configure the ivm.IVM topology for standard torsion angle setup:
    group rigid sidechains and break proline, ribose rings in the
    appropriate places. Disulfide bonds are also broken.
 
    This function sets all groupings and hinge types which are not already
    specified, so it must be called last in the setup of an IVM's topology.
 
    If fixedOmega is set, also fix protein omega backbone angles.
 
    oTensors is a list of varTensor.VarTensor objects used for alignment
    tensors
    

 
Data
        parameters = {'nucleic': 'nucleic.par', 'protein': 'protein.par', 'water': 'tip3p.parameter'}
parametersInitialized = {'nucleic': [], 'protein': [], 'water': []}
pdbLocation = 'ftp://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/'
pseudoResNames = ['ANI']
topology = {'nucleic': 'nucleic.top', 'protein': 'protein.top', 'water': 'tip3p.topology'}
topologyInitialized = {'nucleic': [], 'protein': [], 'water': []}