| | |
- potList.PotList(potList.rc_Pot)
-
- PotListWithContext
- AnnealIVM
- FinalParams
- InitialParams
- RampedParameter
-
- LinRamp
- MultRamp
- StaticRamp
- StructureLoop
class AnnealIVM |
| |
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.
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)
|
class FinalParams |
| |
constructor takes a list of ramped parameters. The constructor invokes
each parameter such that it set to its final value.
Also, this object can be called as a function with zero arguments, to
set parameters to final values.
|
| |
Methods defined here:
- __call__(s)
- __init__(s, pList)
|
class InitialParams |
| |
constructor takes a list of ramped parameters. The constructor invokes
each parameter such that it set to its initial value.
Also, this object can be called as a function with zero arguments, to
set parameters to initial values
|
| |
Methods defined here:
- __call__(s)
- __init__(s, pList)
|
class LinRamp(RampedParameter) |
| |
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
|
| |
Methods defined here:
- __init__(s, startValue, stopValue, action=None)
- setNumSteps(s, numSteps)
- update(s, caller=0)
Methods inherited from RampedParameter:
- finalize(s, caller=0)
- init(s, numSteps, caller=0)
- runAction(s, caller)
- value(s)
|
class MultRamp(RampedParameter) |
| |
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.
|
| |
Methods defined here:
- __init__(s, startValue, stopValue, action=None)
- setNumSteps(s, numSteps)
- update(s, caller=0)
Methods inherited from RampedParameter:
- finalize(s, caller=0)
- init(s, numSteps, caller=0)
- runAction(s, caller)
- value(s)
|
class PotListWithContext(potList.PotList) |
| |
a potList.PotList with an initializing function called before
calcEnergy/calcEnergyAndDerivs
|
| |
- Method resolution order:
- PotListWithContext
- potList.PotList
- potList.rc_Pot
- __builtin__.object
Methods defined here:
- __init__(s, name='', potList=None, context=None)
- calcEnergy(s)
- calcEnergyAndDerivs(s, derivs)
Methods inherited from potList.PotList:
- __del__(self, destroy=<built-in function delete_PotList>)
- __deref__(*args)
- __getattr__ lambda self, name
- __getitem__(self, cnt)
- __getslice__(*args)
- __len__(*args)
- __mul__(*args)
- __oldinit__ = __init__(self, *args)
- __repr__(self)
- __setattr__ lambda self, name, value
- add(self, pot)
- addEnergyReport(*args)
- append(self, pot)
- byName(*args)
- clearEnergyReports(*args)
- copy(self, potList)
- energyMaybeDerivs0(*args)
- energyMaybeDerivs1(*args)
- energyMaybeDerivs2(*args)
- energyMaybeDerivs3(*args)
- energyMaybeDerivs4(*args)
- energyReports(*args)
- getitem_int(*args)
- getitem_string(*args)
- help(*args)
- incrRefCount(*args)
- instanceData(*args)
- list(*args)
- numRestraints(*args)
- pointer(*args)
- registerInstanceData(*args)
- registerTo(*args)
- remove(*args)
- removeAll(*args)
- renamed_add(*args)
- resetPotName(*args)
- rms(*args)
- setThreshold(*args)
- showReport(*args)
- simulation(*args)
- size(*args)
- threshold(*args)
- unRegister(*args)
- updateValues(*args)
- violations(*args)
Properties inherited from potList.PotList:
- instanceData_
- get = PotList_instanceData__get(...)
- set = PotList_instanceData__set(...)
- modified
- get = PotList_modified_get(...)
- set = PotList_modified_set(...)
- registeredSimulations
- get = PotList_registeredSimulations_get(...)
- set = PotList_registeredSimulations_set(...)
Data and other attributes inherited from potList.PotList:
- __swig_getmethods__ = {'instanceData_': <built-in function PotList_instanceData__get>, 'modified': <built-in function PotList_modified_get>, 'registeredSimulations': <built-in function PotList_registeredSimulations_get>}
- __swig_setmethods__ = {'instanceData_': <built-in function PotList_instanceData__set>, 'modified': <built-in function PotList_modified_set>, 'registeredSimulations': <built-in function PotList_registeredSimulations_set>}
Methods inherited from potList.rc_Pot:
- instanceName(*args)
- potName(*args)
- scale(*args)
- setScale(*args)
Data and other attributes inherited from potList.rc_Pot:
- __dict__ = <dictproxy object at 0x116b948>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'rc_Pot' objects>
- list of weak references to the object (if defined)
|
class RampedParameter |
| |
Base class for ramped parameters.
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)
- finalize(s, caller=0)
- init(s, numSteps, caller=0)
- runAction(s, caller)
- setNumSteps(s, numSteps)
- update(s, caller=0)
- value(s)
|
class StaticRamp(RampedParameter) |
| |
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
|
| |
Methods defined here:
- __init__(s, action)
- update(s, caller=0)
Methods inherited from RampedParameter:
- finalize(s, caller=0)
- init(s, numSteps, caller=0)
- runAction(s, caller)
- setNumSteps(s, numSteps)
- value(s)
|
class StructureLoop |
| |
class which 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.
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 pdbTemplate are read-in,
and analyzed.
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.
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 to each other.
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]
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 setup average minimization
run.
averageFitSel - atom selection used to fit structures in
calculation of average structure [name CA].
averageCompSel - atom selection used for heavy atom rmsd
comparison metric [not (name H* not resname ANI)].
averageTopFraction - fraction of structures to use in calculation of
average structure. The structures are sorted
by energy, and the top fraction is retained.
[1 - all 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.
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.
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=[], structLoopAction=0, pdbTemplate='', genViolationStats=0, averageFilename='', averagePotList=<C rc_DerivedPot<(PotList)> instance at _f0a6a90000000000_p_rc_DerivedPotTPotList_t>, averageRegularize=True, averageSortPots=None, averageCrossTerms=[], averageContext=<function <lambda> at 0x1166f50>, averageFitSel='name CA', averageCompSel='not name H* and not resname ANI', averageTopFraction=1, averageTopNum=-1, averageAccept=<function <lambda> at 0x116d050>, averageRefineSteps=50)
- analyze(s, potList, altPotList=<C rc_DerivedPot<(PotList)> instance at _b0b5a90000000000_p_rc_DerivedPotTPotList_t>)
- print violation info to violations file
and return summary information as a string
- filename(s)
- return filename generated by makeFilename() from the pdbTemplate
argument of the class constructor.
- genAveStats(s, comm, sim)
- generate averages, statistics for calculated structures
- makeFilename(s, template)
- 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 number
MEMBER -> the ensemble member index
- pdbFile(s)
- return a PDBTool object whose filename is generated by
makeFilename() from the pdbTemplate argument of the class
constructor.
- run(s)
- structureNum(s)
- return the current structure number, or -1.
- writeStructure(s, potList=None, altPotList=None, extraRemarks='')
- 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 information in the REMARKS section
of the PDB file, printed after the usual summary.
| |