simulationTools
index


 
high-level refinement tools

 
Classes
       
builtins.object
AnnealIVM
FinalParams
InitialParams
NullClass
RunAction
IVMAction
LinRamp
MultRamp
StaticRamp
StructInfo
StructureLoop

 
class AnnealIVM(builtins.object)
    AnnealIVM(initTemp, finalTemp, ivm=0, numSteps=None, tempStep=None, rampedParams={}, extraCommands=0, toleranceFactor=1000)
 
class to perform simulated annealing using molecular dynamics.
 
  Methods defined here:
__init__(s, initTemp, finalTemp, ivm=0, numSteps=None, tempStep=None, rampedParams={}, extraCommands=0, toleranceFactor=1000)
construct by specifying the intial and final annealing temperatures,
and an ivm.IVM object.
 
if tempStep is specified, it will be used to determine the number of
  dynamics runs at different temperatures. If if is omitted, numSteps
  will be used (and tempStep implicitly determined).
 
rampedParams is a list of MultRamp and LinRamp objects which specify
refinement parameters to adjust during the simulated annealing run.
extraCommands is a function or string which is run before dynamics at
each temperature. If it is a function, is is passed the current
AnnealIVM instance as the argument.
 
During each temperature step the following instance variables are set:
 
  fractionDone - fraction (from 0 to 1) of annealing completed.
  bathTemp     - current temperature.
  step         - current step number.
 
toleranceFactor is used to adjust the ivm.IVM's energy tolerance
as the temperature changes. The energy tolerance is calculated as
 
    eTolerance = temp / toleranceFactor
 
The ivm argument doesn't actually have to be an ivm.IVM, but it
must be an object which has the following methods defined:
  setBathTemp
  setETolerance
  run
finalParameters(s)
sets parameters to final values
initParameters(s)
initialize ramped parameters
printTemp(s)
run(s)
runExtraCommands(s)
runIVM(s, temp)
updateParameters(s)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class FinalParams(builtins.object)
    FinalParams(pList, call=True)
 
constructor takes a list of ramped parameters. The constructor invokes
each parameter such that it set to its final value, unless the optional
call argument is specified as False.
Also, this object can be called as a function with zero arguments, to
set parameters to final values.
 
  Methods defined here:
__call__(s)
Call self as a function.
__init__(s, pList, call=True)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class IVMAction(RunAction)
    IVMAction(action)
 
convenience class for static parameter setup.
update() - increments value. It will not change the value beyond
           that specified by stopValue
value()  - return the current value
setNumSteps(ns) - set number of steps
init(ns)        - set number of steps and initialize val to startValue
 
 
Method resolution order:
IVMAction
RunAction
builtins.object

Methods defined here:
__init__(s, action)
Initialize self.  See help(type(self)) for accurate signature.

Methods inherited from RunAction:
finalize(s, caller=0)
init(s, numSteps, caller=0)
runAction(s, caller=0)
setNumSteps(s, numSteps)
update(s, caller=0)
value(s)

Data descriptors inherited from RunAction:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class InitialParams(builtins.object)
    InitialParams(pList, call=True)
 
Constructor takes a list of ramped parameters. The constructor invokes
each parameter such that it set to its initial value, unless the optional
call argument is specified as False.
Also, this object can be called as a function with zero arguments, to
set parameters to initial values.
 
  Methods defined here:
__call__(s)
Call self as a function.
__init__(s, pList, call=True)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class LinRamp(RunAction)
    LinRamp(startValue, stopValue, action=None)
 
convenience class for linearly
ramping a value from startValue to stopValue over numberSteps
constructor: MultRamp(startValue, stopValue, action)
methods:
  update() - increments value. It will not change the value beyond
             that specified by stopValue
  value()  - return the current value
  setNumSteps(ns) - set number of steps
  init(ns)        - set number of steps and initialize val to startValue
 
 
Method resolution order:
LinRamp
RunAction
builtins.object

Methods defined here:
__init__(s, startValue, stopValue, action=None)
Initialize self.  See help(type(self)) for accurate signature.
setNumSteps(s, numSteps)
update(s, caller=0)

Methods inherited from RunAction:
finalize(s, caller=0)
init(s, numSteps, caller=0)
runAction(s, caller=0)
value(s)

Data descriptors inherited from RunAction:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class MultRamp(RunAction)
    MultRamp(startValue, stopValue, action=None)
 
convenience class for multiplicatively (geometrically)
ramping a value from startValue to stopValue over numberSteps
constructor: MultRamp(startValue, stopValue, action)
methods:
  update() - increments value. It will not change the value beyond
             that specified by stopValue
  value()  - return the current value
  setNumSteps(ns) - set number of steps
  init(ns)        - set number of steps and initialize val to startValue
  finalize()      - set value to the final value.
 
 
Method resolution order:
MultRamp
RunAction
builtins.object

Methods defined here:
__init__(s, startValue, stopValue, action=None)
Initialize self.  See help(type(self)) for accurate signature.
setNumSteps(s, numSteps)
update(s, caller=0)

Methods inherited from RunAction:
finalize(s, caller=0)
init(s, numSteps, caller=0)
runAction(s, caller=0)
value(s)

Data descriptors inherited from RunAction:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class NullClass(builtins.object)
    dummy empty class
 
  Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class RunAction(builtins.object)
    RunAction(action)
 
Base class for function or command string to be run in the defining
 frame at a later time. There is a value associated with this object which
 is always zero.
 
update() - increments value. It will not change the value beyond
           that specified by stopValue
value()  - return the current value
init(ns)        - set number of steps and initialize val to startValue
finalize()      - set value to the final value.
 
  Methods defined here:
__init__(s, action)
Initialize self.  See help(type(self)) for accurate signature.
finalize(s, caller=0)
init(s, numSteps, caller=0)
runAction(s, caller=0)
setNumSteps(s, numSteps)
update(s, caller=0)
value(s)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class StaticRamp(RunAction)
    StaticRamp(action, stride=1)
 
convenience class for static parameter setup.
update() - increments value. It will not change the value beyond
           that specified by stopValue
value()  - return the current value
setNumSteps(ns) - set number of steps
init(ns)        - set number of steps and initialize val to startValue
 
 
Method resolution order:
StaticRamp
RunAction
builtins.object

Methods defined here:
__init__(s, action, stride=1)
action is a function or string to be executed.
stride specifies how often the function is called. A stride value of
1 specifies that the function is called every time update is called.
Larger values of stride specify that action is called by update()
if caller.step%stride=0.
update(s, caller=0)

Methods inherited from RunAction:
finalize(s, caller=0)
init(s, numSteps, caller=0)
runAction(s, caller=0)
setNumSteps(s, numSteps)
value(s)

Data descriptors inherited from RunAction:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class StructInfo(builtins.object)
    StructInfo(filename, energy, viols, accept, id, atomPosArr=None)
 
helper class for generating structure statistics in StructureLoop.
 
  Methods defined here:
__init__(s, filename, energy, viols, accept, id, atomPosArr=None)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class StructureLoop(builtins.object)
    StructureLoop(numStructures=-1, startStructure=0, structureNums=[], pdbFilesIn=[], pdbFilesInErase=False, pdbFilesInCorrectSymmetricSidechains=True, inMemberModulo=None, structLoopAction='', pdbTemplate=None, doWriteStructures=False, calcMissingStructs=False, writeCrashStructures=True, writeSelection='all', potList=None, ivm=None, genViolationStats=False, storeCoordinates=False, averageFilename='', averagePotList=<potList.PotList; proxy of <Swig Object of type 'rc_DerivedPot< PotList > *' at 0x7f2b027b1620> >, averageRegularize=-1, averageFixedRegions=[], averageRigidRegions=[], averageSortPots=None, averageCrossTerms=[], averageContext=<function StructureLoop.<lambda> at 0x7f2b027fb380>, averageFitSel=-1, averageCompSel='not name H* and not PSEUDO', mleFitThreshold=2, averageTopFraction=0.5, averageTopNum=-1, averageAccept=<function StructureLoop.<lambda> at 0x7f2b027fb420>, averageRefineSteps=50, averageRestrain=False, averageRestrainSel='name CA or name C or name N or name O')
 
Class that performs loop over structure calculations.
Constructor: StructureLoop()
  arguments:
    numStructures       -    number of structures to calculate
    startStructure      -    id of the first structure to calculate
    structureNums       -    sequence of explicit structure numbers to
                             calculate.
    pdbFilesIn          - A list of existing coordinate files, or a
                          string including a glob wildcard. If
                          specified, structLoopAction will be called
                          after reading each specified file. In this
                          case, if the arguments numStructures or
                          structureNums are specified, the coordinates
                          will be initialized to the appropriate structure
                          number modulus the length of pdbFilesIn. If
                          numStructures and structureNums are not
                          specified, len(pdbFilesIn) structures will be
                          calculated. This argument can also be a template
                          string including the STRUCTURE literal which is
                          replaced by structure number. For ensemble
                          simulations, a MEMBER literal should also be
                          present, if separate coordinates for
                          are desired for each ensemble member. Coordinates
                          are initialized by calling protocol.initCoords,
                          the return value of which is stored in
                          the initCoordsRet member of the instance object
                          (passed as the argument to the structLoopAction
                          function).
    pdbFilesInErase     - the value to pass to the erase argument of
                          protocol.initCoords, when pdbFilesIn is
                          specified.
                          [default: False]
    pdbFilesInCorrectSymmetricSidechains
                        - the value to pass to the
                          correctSymmetricSidechainserase argument of
                          protocol.initCoords, when pdbFilesIn is
                          specified.
                          [default: True]
    inMemberModulo      - is used in conjunction with pdbFilesIn in
                          the case that an ensemble calculation is
                          using input structures from a smaller ensemble.
                          This number specifies the size of the smaller
                          input ensemble.
    structLoopAction    - a user-defined function which takes
                          one argument: an instance of this class.
                          If this argument is omitted, new structures
                          are not calculated. Rather, existing structures
                          in files specified by pdbFilesIn are read-in,
                          and analyzed. There is a special null class
                          member named sharedData created during run()
                          which can be written to in structLoopAction
                          and read back out after run() is called,
                          but at that point, structData is a
                          dictionary whose keys are structure numbers. The
                          argument to the function is an instance of this
                          class, such that structure-specific info can be
                          accessed. Useful members include:
 
                            structNum    - the current structure number .
                            filename()   - returns the output filename
                                           for the current structure.
                            extraRemarks - extra data to place in the
                                           REMARKs section of the output
                                           PDB.
                                           
    pdbTemplate         - template string used to create a filename
                          for the pdbFile method. The filename is
                          generated using the makeFilename method.
                          Note that the template string should always
                          include the STRUCTURE literal so that distinct
                          structure files are generated. For
                          ensembleSimulation calculations a MEMBER
                          literal should also be present *after* the
                          STRUCTURE literal.
                          [default: "SCRIPT_STRUCTURE.pdb" for
                          non-EnsembleSimulations and
                          "SCRIPT_STRUCTURE_MEMBER.pdb" for
                          EnsembleSimulations]
    doWriteStructures   -    write the structures using writeStructure
                             after each call to structLoopAction. The
                             potList argument is used as the PotList for
                             analysis, the member altPotList (which
                             defaults to the value of averageCrossTerms)
                             is used as the second argument, and the
                             member extraRemarks is used as the third
                             argument.
                             [default: False]
    writeCrashStructures -   If structLoopAction (the structure calculation
                             function) throws an exception, a crash
                             coordinate file will be created if this is
                             True.
                             [default: True]
    writeSelection       -   Atom selection specifying which atoms to write
                             to output files, whether those written from
                             the pdbTemplate, crash structures, or the
                             averaged coordinates.
                             [default: all]
    potList              -   The potList argument to writeStructures if
                             doWriteStructures is True. If it is not set,
                             it defaults to averagePotList.
    ivm                  -   An ivm.IVM object, used for consistency
                             checking. If set, a check is made if fitting
                             of atomic coordinates is attempted while
                             (non-pseudo) atoms are fixed in the IVM. If so,
                             an exception is raised.
    calcMissingStructs   -   If True, structures are only calculated if
                             their associated filename does not exist.
                             However, all structures specified by
                             numStructures or structureNums are read in
                             and used for analysis.
                             [default: False]
                             
  if numStructures<0,   existing files matching pdbTemplate are processed,
  starting at startStructure, and stopping when a file does not exist.
  This mode of operation does not work with structure parallelism, but
  it does work with ensemble parallelism.
 
 There are additional arguments if you would like an average structure
 to be calculated. If averaging is enabled, the output structure files
 will be fit by averageFitSel to that which has the lowest averageSortPots
 energy. Ensemble Structures from ensembleSimulation.EnsembleSimulation
 calculations structures are fit to the respective ensemble member
 of the ensemble which has the lowest averageSortPots energy. This
 approach to ensemble fitting is often not appropriate.
 
   averageFilename      - name for output structure file. If not specified,
                          the average structure will not be calculated.
   averagePotList       - potential terms to use for average structure
                          calculation. These terms are reported on in the
                          .stats file.
   averageRegularize    - flag determining whether or not structure
                          regularization (gradient minimization) is
                          carried out on the average structure, by
                          minimizing against averagePotList.
                          [default: True, if averageFilename is set]
   averageFixedRegions  - sequence of regions held fixed in space during
                          structure regularization.
   averageRigidRegions  - sequence of regions held rigid during structure
                          regularization.
   averageSortPots      - potential terms used for sorting structures. The
                          top fraction or number of structures is reported
                          on in the .stats file.
                          [defaults to averagePotList]
   averageCrossTerms    - potential terms to report on, but not to use
                          in refinement of average structure.
   averageContext       - function to call to initialize force constants
                          and other parameters for the energy/observable
                          summary printed at the beginning of the output
                          structure files, .viols files, and statistical
                          restraint analysis. It is also used to setup the
                          average minimization run.  
   averageFitSel        - atom selection used to fit structures in
                          calculation of average structure and to fit
                          structures to the lowest energy
                          structure. A special selection keyword "ordered"
                          can be used to force a maximum likelihood
                          determination (using makeLikelyFit) of the
                          residues in ordered regions of the structure
                          after structure calculation. The literal
                          "ordered" is then replaced with a string
                          representing these regions. Setting averageFitSel
                          to None will disable fitting. If the energy
                          depends on the absolute position or orientation
                          of the coordinates, averageFitSel should be set
                          to None. The default value is None if the current
                          Simulation has the attribute noFit set to True,
                          and "name CA" otherwise.
   mleFitThreshold      - threshold RMSD for an atom to be considered in
                          an ordered region. Used if the "ordered" literal
                          is present in the averageFitSel selection
                          string [2].
   averageCompSel       - atom selection used for heavy atom rmsd
                          comparison metric [not name H* and not PSEUDO].
   averageTopFraction   - fraction of structures to use in calculation of
                          average structure. The structures are sorted
                          by energy, and the top fraction is retained.
                          [0.5 - half of calculated structures].
   averageTopNum        - number of structures to use in calculation of
                          average structure. Specify only one of 
                          averageTopFraction or averageTopNum.
 
   averageAccept        - function to call to assess whether it is
                          acceptable, i.e. meets violation, rmsd
                          requirements. The function has a single argument:
                          averagePotList [defaults to accepting all
                          structures.]
 
   averageRefineSteps   - number of minimization steps to take during
                          regularization refinement of the average
                          structure [50]
 
   genViolationStats    - flag controlling whether statics are gathered
                          (over all structures) on which restraints are
                          violated most often. The results are collected
                          in a file named pdbTemplate.stats. Statistics
                          will be gathered for all terms in
                          averagePotList, so this attribute must be
                          specified for this facility to work.
   storeCoordinates     - if True, atomic coordinates are saved in memory
                          for final analysis, but this may use excessive
                          memory if many structures are calculated. By
                          default, storeCoordinates=False.
 
   averageRestrain      - flag the control the inclusion of probDist energy
                          potential in calculating the average structure
                          from the ensemble. averageRestrainSel helps in
                          selecting atoms from which the density map is
                          created. inconsistentAveStruct is a flag that
                          is set to True if the sortEnergy (and associated
                          violation count) of the calculated average
                          structure is greater than all of the structures
                          used to compute it.
                          
 
method: run():
   performs numStructures loop of action. In each pass, the coordinates
   of the current Simulation are reset to their initial values and the
   instance variable count is incremented. Also, the global random seed
   is incremented. If the current simulation is an EnsembleSimulation,
   the seed-setting takes this into account.
 
   After run() has completed, average structure coordinates are left in
   the current Simulation, if they have been calculated. If restraint
   statistics are generated, the StructureLoop instance will have the
   following members when run() returns:
     restraintStats 
     restraintStatsCross
   These are restraintStats.RestraintStats objects corresponding to
   potential terms in averagePotList and AverageCrossTerms, respectively.
   The precision of the calculated structures is stored in the members
     fitRMSD
     compRMSD
   corresponding to averageFitSel and averageCompSel, respectively. The
   member
     structInfo
   contains a list of StructInfo objects, one for each structure reported
   on the the .stats file.
   Also, the cpu time spent within the run() method will be contained
   in the members
     cpuTime
     cpuTimes
     cpuTimeTot
   The first contains the local process's cpu time, the second is an array
   of times from each process, and the third is the sum.
 
  Methods defined here:
__init__(s, numStructures=-1, startStructure=0, structureNums=[], pdbFilesIn=[], pdbFilesInErase=False, pdbFilesInCorrectSymmetricSidechains=True, inMemberModulo=None, structLoopAction='', pdbTemplate=None, doWriteStructures=False, calcMissingStructs=False, writeCrashStructures=True, writeSelection='all', potList=None, ivm=None, genViolationStats=False, storeCoordinates=False, averageFilename='', averagePotList=<potList.PotList; proxy of <Swig Object of type 'rc_DerivedPot< PotList > *' at 0x7f2b027b1620> >, averageRegularize=-1, averageFixedRegions=[], averageRigidRegions=[], averageSortPots=None, averageCrossTerms=[], averageContext=<function StructureLoop.<lambda> at 0x7f2b027fb380>, averageFitSel=-1, averageCompSel='not name H* and not PSEUDO', mleFitThreshold=2, averageTopFraction=0.5, averageTopNum=-1, averageAccept=<function StructureLoop.<lambda> at 0x7f2b027fb420>, averageRefineSteps=50, averageRestrain=False, averageRestrainSel='name CA or name C or name N or name O')
Initialize self.  See help(type(self)) for accurate signature.
directFit(s, comm, sim, structInfo)
filename(s, structNum=None, memberNum=None, suffix='')
Return filename generated by makeFilename() from the pdbTemplate 
member which can be initialized using the thus-named argument in the
class constructor. If structNum is not specified, it
defaults to s.structNum.
genAveStats(s, comm, sim)
generate averages, statistics for calculated structures
getExtraRemarks(s, pdbFile)
Return those REMARKs records previously written by writeStructure
using the extraRemarks argument.
makeFilename(s, template, structNum=None, memberNum=None)
create a filename given a template. In the template:
the following substitutions are made:
    SCRIPT    -> name of input script (without .py suffix)
    STRUCTURE -> structNum if specified, else s.structNum
    MEMBER    -> memberNum if specified, else ensemble member
                 index
mleFit(s, comm, sim, structInfo, mleThreshold)
Maximum likeihood fitting of structures - to determine ordered
regions used for fitting. Return a valid selection string
corresponding to this region.
 
Currently, the values of the fit coordinates are not returned.
 
This function cannot be used in a socketComm single-process
region.
pdbFile(s, nameSuffix='')
return a PDBTool object whose filename is generated by
makeFilename() from the pdbTemplate argument of the class
constructor. nameSuffix specifies an optional additional suffix
for the generated filename.
pdbFileIn(s)
return the input pdb filename corresponding to structNum. If
running in the context of an EnsembleSimulation, the MEMBER literal
in the filename is replaced with the appropriate ensemble member
identifier.
run(s)
structureNum(s)
return the current structure number, or -1.
writeStructure(s, potList=None, altPotList=None, extraRemarks='', nameSuffix='', makeBackup=True)
perform analysis using analyze(), then write a structure with
the analysis information included as remarks.
 
The filename is generated from the pdbTemplate argument of the
StructureLoop constructor.
 
A summary is written out for each term in potList (and in altPotList,
if specified), and more detailed violation information is output
to a file named filename + '.viols' .
 
If potList is not specified, it defaults to s.averagePotList.
If altPotList is not specified, it defaults to s.averageCrossTerms.
 
extraRemarks, if specified, is extra (string or a list of
strings) information in the REMARKS section of the PDB file,
printed after the usual summary.
 
nameSuffix specifies an optional additional suffix for the
generated filename.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
calcAverageStruct(structs, fitSel, compSel, potList=[], regularizeSteps=50, averageRestrainSel='', averageRestrain=False, fixedRegions=[], rigidRegions=[])
compute unregularized average structure given structs.
The structures are first fit using fitSel, and analysis is performed
using compSel.
 
For homogeneous ensembleSimulation.EnsembleSimulations with Ne>1, this
routine calculate the average of the ensemble averages.
 
if potList is set, the sum of the specified terms 
will be will be minimized with respect to the average coordinates, after
the straight average structure has been calculated.
 
fixedRegions and rigidRegions arguments are passed to regularizeRefine.
 
The return value is a namedtuple with the following members:
     aveCoords rmsdArray rmsdCompArray bFactors remarks
The average coordinates will be placed in the current 
simulation.Simulation's atomPosArr,
convertToPotList(obj)
convert a single potential term or a sequence to a
potList.PotList, if necessary.
ensembleAvePos()
return the (unregularized) average coordinates of the current ensemble
For heterogeneous ensembles, this average is not meaningful, and the
full ensemble is returned.
flattenPotList(potList, includePotLists=False)
Given a potList.PotList, or other sequence of potential terms,
return a list of potentials obtained from recursively the sequence,
and any contained sequences.
 
If includePotLists is True, include the non-toplevel PotLists themselves
in the returned list.
gcRegisteredTopoTerms(verbose=False)
Remove any registered Topo terms without external references.
Set verbose to True to debug garbage collection.
genFilename(template, structure=0, member=0)
create a filename given a template. In the template:
the following substitutions are made:
    SCRIPT    -> name of input script (without .py suffix)
    STRUCTURE -> the structure argument
    MEMBER    -> the member argument
getRegisteredTopoTerms(potType, simulation=None)
return a list of all pot.Pot objects with potName potType registered to
the specified simulation.
minimizeRefine(potList, refineSteps=50, minimizeSteps=100, xplorPots=['BOND', 'ANGL', 'IMPR'], scaleMultiplier=0.001, rigidRegions=(), fixedRegions=(), translateRegions=(), simulation=None, verbose=False)
simple refinement using gradient minimization in Cartesian coordinates.
Some potential terms are held fixed during minimization, while others are
scaled up from a smaller value progressively, during each round of
minimization.
 
refineSteps specifies how many rounds of minimization to perform, while
minimizeSteps are how many minimization steps are taken at each energy
scale value.
 
xplorPots are XPLOR terms which are to always be present, and for which
          the scale constant is held constant.
scaleMultiplier specifies the initial value for the scale constant.
 
rigidRegions specifies selections of atoms which do not move relative to
each other. This argument can also be a single string.
 
fixedRegions specifies selections of atoms which do not move at
all. This argument can also be a single string.
 
translateRegions specifies selections of atoms which can translate
as a rigid body, but not rotate.
 
If the verbose argument is True, energies of the energy terms are printing
during each minimization.
mktemp(suffix='', prefix='tmp', dir=None)
return a temporary file name which is unique for each process and
thread within an ensemble simulation.
potType(pot)
return the potential's type.
For most potential terms, the type is given by the potName() accessor,
exception:
  for avePotAvePot, potType(subPot()) is returned.
reduce(...)
reduce(function, iterable[, initial]) -> value
 
Apply a function of two arguments cumulatively to the items of a sequence
or iterable, from left to right, so as to reduce the iterable to a single
value.  For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates
((((1+2)+3)+4)+5).  If initial is present, it is placed before the items
of the iterable in the calculation, and serves as a default when the
iterable is empty.
registerTopoTerm(term, simulation=None)
add the given pot.Pot to a list associated with its simulation.
These objects will be automatically processed by topologySetup and
massSetup.
saRefine(potList, refineSteps=50, xplorPots=['BOND', 'ANGL', 'IMPR', 'RAMA'], initTemp=10, finalTemp=5, finalTime=0.2, numSteps=100, htFinalTime=10, htNumSteps=1000, initVel=1, scaleMultiplier=0.001, rigidRegions=(), fixedRegions=())
Added by Robin A Thottungal 
Add explanation 07/16/09
refineSteps specifies how many rounds of minimization to perform.
xplorPots are XPLOR terms which are to always be present, and for which
          the scale constant is held constant.
scaleMultiplier specifies the initial value for the scale constant.
 
initTemp specifies the initial temperature for high-temperature dynamics,
and at the start of simulated annealing. The parameters finalTime, and
numSteps specify dynamics duration and number of steps at each step of
simulated annealing, while htFinalTime and htNumSteps specify these
parameters for initial dynamics.
 
rigidRegions specifies selections of atoms which do not move relative to
each other.
 
fixedRegion specifies selections of atoms which do not move at all.
sortFilesByEnsMember(ensembleFiles)
given a list of files corresponding to an ensemble, extract the
ensemble member numbers and use these to sort ensembleFiles and return
the result.
testGradient(pots, eachTerm=0, alwaysPrint=0, components=[0], tolerance=0.001, eTolerance=1e-08, epsilon=1e-07, selString='all', sim=0)
check the analytic gradient in the given potential terms against finite
difference values.
 
If the eachTerm argument is set, each term in the potList is tested
individually.
 
If alwaysPrint is True, all gradient terms will always be printed. If it
is set to "nonzero", only nonzero gradients will be printed.
 
components specificies which of the three gradient components x,
y, z (specified by the numbers 0,1,2) to test. By default this is
just the x (0) component; specify "all" to test all three
components. A value of "random" specifies that a random component
is tested for each atom.
 
tolerance specifies the agreement expected between numerical and
analytic gradient
 
eTolerance specifies the ageement relative to the magnitude of the energy
 
epsilon specifies the stepsize used in the finite different gradient
calculation:
 
        dE/dqi(xyz) = E(qi(xyz)+epsilon) - E(qi(xyz)) / epsilon
 
where E(0) is the energy evaluated at the nominal coordinate value
qi(xyz).
 
The Simulation is specified with the optional sim argument. The selString
argument can be used to test a subrange of atoms' gradients.
 
For each atom, the following is printed:
atom identifying string  numerical gradient  analytical gradient
unregisterTopoTerm(term, simulation=None)
verticalFormat(name, nameValuePairs, minWidth=6, numericFormat='.2f')
writeStructure(pdbFile, potList, altPotList=None, analyzeFilename=None, remarks='', makeBackup=True, clearRemarks=True)
perform analysis using analyze(), then write a structure with
the analysis information included as remarks.
 
The filename is generated from the pdbTemplate argument of the
StructureLoop constructor.
 
A summary is written out for each term in potList (and in altPotList,
if specified), and more detailed violation information is output
to a file named filename + '.viols' .
 
If potList is not specified, it defaults to s.averagePotList.
If altPotList is not specified, it defaults to s.averageCrossTerms.
 
extraRemarks, if specified, is extra (string or a list of
strings) information in the REMARKS section of the PDB file,
printed after the usual summary.
 
nameSuffix specifies an optional additional suffix for the
generated filename.

 
Data
        modules = {'__future__': <module '__future__' from '/home/schwitrs/xplor/...n/bin.Linux_x86_64/lib/python3.11/__future__.py'>, '__main__': <module '__main__' (built-in)>, '_abc': <module '_abc' (built-in)>, '_ast': <module '_ast' (built-in)>, '_atom': <module '_atom' from '/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/_atom.so'>, '_atomSel': <module '_atomSel' from '/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/_atomSel.so'>, '_atomSelAction': <module '_atomSelAction' from '/home/schwitrs/bz...plor-python3/bin.Linux_x86_64/_atomSelAction.so'>, '_avePot1': <module '_avePot1' from '/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/_avePot1.so'>, '_bisect': <module '_bisect' from '/home/schwitrs/xplor/pyt...dynload/_bisect.cpython-311-x86_64-linux-gnu.so'>, '_bz2': <module '_bz2' from '/home/schwitrs/xplor/python...ib-dynload/_bz2.cpython-311-x86_64-linux-gnu.so'>, ...}
registeredTopoTerms = {}