| |
- analyze(potlist)
- Perform analysis of DEERPot terms.
- create_DEERPot(instanceName, restraints=[], verbose=True, nonTagSel=None, paraAtomRadius=None, probWidth=0.7, distanceSigmoidWidth=None, fitExpt=True, errCol=3, errDefault=None, minFrac=0.1, varyWeights=False, zeroFit=False, fitPositive=False, dropInterval=0, minR=1.0, deltaR=1.0, maxR=100, tagInfo=None, tagSim=None, **kwargs)
- Create a deerPot.DEERPot energy term using the specified
restraints. The restraints argument should be a list of
3-element sequences. The first two specify the atom selections of
the two tags, while the third specifies a P(r), either as a filename or as
a string containing the deer time trace; in either case the file contents
or string should contain lines in which the first two columns are
t and Trace(t), respectively.
nonTagSel - selection for atoms which should be considered
in the computation of tag weight due to overlap.
If not specified, it is set to the tagTool
database value (or
tagPairDistTools.nonTagSelDefault fallback.
paraAtomRadius: - radius of paramagnateic tag atom. If specified,
this value overrides that specified in the
tagCoord file. If neither is specified, it is set
to 3.2 angstroms.
distanceSigmoidWidth - parameter used to compute distance-based weight
based on tag atom distance to atoms in nonTagSel.
If specified, this value overrides that specified
in the tagCoord file. If neither is specified, it
is set to 3 angstroms.
probWidth - width of the distance distribution contribution
from a single pair of rotamers. If specified, this
value overrides that specified in the tagCoord
file. If neither is specified, it is set to
0.7 angstroms.
zeroFit - scale experiment and shift input time values
such that initial maximum is approximately 1 at
time zero. This is performed using the function
gaussianZeroFit.
fitPositive - used when zeroFit is True- use this if there are
few data points before the maximum in the DEER
curve..
dropInterval - time interval (in micro sec) of the input
experimental curve to omit at the end of the
DEER trace.
varyWeights - configure the DEERPot instance to allow the
population values of the rotater contributions
to vary with the use of pseudo atoms using the
aWeights facility. The value of the argument
can be an aWeights.AWeights object, or True
in which case, an object is created. [False]
minFrac - if varyWeights=True, set the minimum allowed
weight as a fraction of 1/N. For instance, if
minFrac=0.1 and there are 20 rotamers the minimum
population would be 0.1/20 [0.1].
tagInfo - pre-generated tagTool.TagInfo object.
tagSim - pre-generated tagSimualtion.TagSimulation
object.
fitExpt - if True, determine modDepth and slope using a fit
to experiment.
errCol - which column of input data provides error values.
A value of None means that errDefault (a constant
value) should be used instead.
errDefault - Default (constant) error value in the DEER trace.
There are three special values:
0 - compute the value as errDefaultMult
({errDefaultMult} by default) times
the magnitude of the largest trace value.
"deerlab" - compute the value using
deerlab.noiselevel() if that
module is available.
None - use errCol instead.
The created TagSimulation instance is held in the tagSimulation member.
The follow optional arguments are handled by
tagPairDistTools.createTags, and documented there:
numRotamers
resname
tagCoordFilename
paraAtomname
outSegidPref
numCopies
The verbose argument can be a boolean, or an integer, where larger value
results in more verbose output.
- doTestGrad(x, cost, dcost, label=None, prefix=None, eps=1e-08)
- fitBackgroundModdepth(restraint, normalize=False, absSlopeVals=(5,), modDepthVals=(0.1, 0.2, 0.3, 0.4, 0.5), testGrad=False)
- Given a DEERPot Restraint restraint, determine the modulation depth and
background contribution parameters which optimizes the restraint's
score using a gradient search. When complete update restraint to contain
these new values.
The search proceeds as a sequence of gradient searches in modDepth and
slope, beginning with modDepth values of modDepthVals and negative slope
values of absSlopeVals in units of 1/usec.
For now, the background is represented by an exponential with slope k.
If normalize=True, a uniform scale factor is also determined.
If testGrad=True, a printout of gradient w/ respect to parameters is
printed before and after gradient minimization.
- fitParams(restraint, testGrad=False)
- Gradient optimization of slope, modulation depth, overall normalization
and zero time for the specified DEERPot restraint. This function updates
the restraint's slope modulationDepth, and the timeVals and normalization
of the target trace corresponding to the optimal parameters found.
FIX: the gradient appears to be incorrect after the frist minimization
step.
- gaussianZeroFit(timeVals, expt, errs, tolerance=2, asymm=False, fitTime0=0.15, returnFit=False, maxIters=200, verbose=False, testGrad=False)
- Determine normalization and zero-time point correction.
Find max value of expt - then fit all values within
-t_0.. t_0 (with t_0 = -t_min) to a Gaussian, repeat fit with t_0=-t_min/2
Return calibrated values of timeVals, expt and errs with the maximum at
t=0 with value approximately 1.
The tolerance argument specifies the cost (reduced chi^2) value at which
to exit. The number of fit data points around the experimental maximum
is reduced by a factor of two until tolerance is achieved or the number
of data points falls below 5.
By default, a Gaussian symmetric about the maximum is fit, but the asymm
argument can be set to True for traces with an
insufficient number of points before the maximum so that an asymmetric
Gaussian is fit. In this case, the initial
Gaussian fit is performed from t=0 to fitTime0 (specified in microsec)
beyond the time corresponding to the maximum.
The maxIters argument specifies the number of steps taken in calls to the
conjugate gradient algorithm.
If returnFit is True, the Gaussian fit to the initial time and trace is
returned as the forth elemenet of the returned tuple.
- randomizeWeights(pot, minFrac=None, verbose=False)
- Randomize the rotamer populations in the DEERPot term passed as pot.
The minFrac term can be used to specify a minimum value allowed for
weights as minFrac * 1/N, where N is the number of rotamers.
The procedure involves randomly chosing N-1 angle values uniformly
distributed, and then encoding the weights in hyper-spherical coordinates.
It is likely that A Jacobian in this transformation prevents resulting
uniformly distributed weights.
|