noePot |
index |
Potential term appropriate for NOEs
constructor: NOEPot(instanceName,
restraintList,
sim1,sim2)
instanceName is a user-specified identifier
sim1, and sim2 are optional simulation.Simulation specifications
[they default to the current Simulation.]
restraintList is an optional XPLOR-style restraint table (string).
Appropriate ensemble averaging will be performed if the sim1 argument
is an ensembleSimulation.EnsembleSimulation.
methods
addRestraints(restraintList) - add the specified XPLOR-style restraints
removeRestraint(num) - remove the specified restraint. Restraints
are numbered from zero. Note that
after a restraint is removed, all
restraints with larger indices will be
renumbered.
calcEnergy() - calculate energy, returns the energy value.
calcEnergyAndDerivs(derivs) - calculate energy, derivatives,
returns the energy value.
rms() - return the NOE root mean square deviation (RMSD-
defined below).
numRestraints() - return the number of restraints defined for this term.
violations() - return number of violated restraints.
deviation() - return average deviation from the mean over ensemble.
This is zero unless an ensembleSimulation with size
greater than one is specified.
devationSpread() - return the average devation spread over ensemble.
restraints() - return a list of restraints. See the description of the
Restraint class below.
info() - current info about the state of this instance
showRestraints(violated) - return info on restraints. Argument violated is
boolean specifying whether to return only
violated restraints.
showViolations() - return string containing pretty-printed info
on all violated restraints.
The following parameters (explained in detail below) can be set [defaults in square brackets]
allowBadRestraints - By default, restraint definitions given to
addRestraints which select no atoms cause an
exception to be raised. If this flag is set to
True, only a warning message will be written. [False]
nMono - number of monomers [1]
verbose - if true, sporadically spit out info [False]
scale - scale factor [1]
aveExp - exponential to use in sum averaging [6]
dOffset - potential offset [0]
hardExp - exponential in hard region of potential [2]
rSwitch - distance at which to switch from hard form [0.5]
softExp - exponential in soft region of potential [1]
asympSlope - slope in linear asymptotic region of pot [1]
allowOverlap - boolean controlling behavior when reading a restraint which
contains a selection pair in which there is overlap in the
identity of from- and to- selections. If allowOverlap is
is True, a warning is printed, while if it's False, an
exception is thrown. [True]
deleteOverlapping - if true, selection pairs in a restraint are deleted if
they have any atoms in common. [False]
threshold - threshold in violation calculation [0.5]
potType - type of potential: "soft", "hard", "log" ["hard"]
aveType - type of restraint averaging: "average", "center", "sum",
"shortest", or "closest" ["sum"]
showAllRestraints - boolean which changes the behavior of showViolations.
If this parameter is set to True, the behavior of
showViolations is modified such that all restraints are
printed. Violated restraints are indicated by an
asterisk in the first column. [False]
useSimEnsWeight - whether to use the ensemble wieghts set with setEnsWeights
or to use those of the underlying EnsembleSimulation.
ensWeights - a sequence of ensemble weights to use when calculating
the ensemble- averaged value of each dipolar coupling. By
default, the weights of the underlying EnsembleSimulation
are used. If these are overridden by calling the
setEnsWeights method, and useSimEnsWeight is set to False.
useDistMultMat - boolean specifying whether to use distMultMat [False].
distMultMat - a row-major matrix (or 2D list) specifying multipiers of the
i,j 1/r^6 distance contributions for averaging typees sum or
average. This facility is rather fragile, requiring that
all restraints have exactly the same number of i and j
atoms, and that the distMultMat matches these dimensions.
No normalization is performed.
the above quantities may be retrieved using the member function form
quantity(), while they are set using the form setQuantity(value).
The input XPLOR-style NOE restraint table has restraints of the type:
ASSIgn (selection1) (selection2) d dMinus dPlus ! optional comment goes here
[OR (selection1) (selection2)]
...
The statement can be split across muliple lines, but the comment, if
specified, should be on the same line as dPlus. The "OR" keyword introduces
additional selection pairs (see below). Additional statements are recognized
in input restraint tables:
WEIGht <num> - specify a per-restraint energy scale factor associated
with restraints associated with the following ASSIgn
statements [Default: 1.0].
PROBability <num> - specify a per-restraint constant for restraints
associated with the following ASSIgn statements - to be
used in further analysis. It does not directly affect
energy or distance calculations [Default: 1.0].
The energy function, E, associated with each restraint depends on potType.
For potType = "hard" (also known as the "square-well" potential):
E = scale * delta^hardExp
For potType = "soft" (also known as the "soft-square" potential):
/
E = |scale * delta^hardExp (if delta < rSwitch)
|scale * (a + b / delta^softExp + (if delta > rSwitch)
| asympSlope * delta)
\
For potType = "log":
E = scale * log(delta/d)
[see W. Rieping, M. Habeck, and M. Nilges. Modeling errors
in NOE data with a lognormal distribution improves the
quality of NMR structures. J. Am. Chem. Soc., 127,
16026-16027 (2005)]
In the above energy expressions
b = rSwitch^(softExp+1) *
(asympSlope - hardExp * rSwitch^(hardExp-1)) / softExp
a = rSwitch^hardExp - b * rSwitch^(-softExp) - asympSlope * rSwitch
/
| d - dMinus - r (if r < d - dMinus)
delta = | r - (d + dPlus - dOffset) (if r > d + dPlus - dOffset)
| 0 (otherwise)
\
The distance r (appearing in delta above) is calculated according to aveType.
For aveType = "average":
r = [ <sum_pairs sum_ij | q_i - q_j |^(-aveExp) / Nij> ] ^(-1/aveExp)
where q_i is the position of the i-th atom, and Nij is the number
of atom pairs in the sum. sum_pairs denotes sum over all selection pairs
introduced using the "ASSIgn ... OR" syntax. Note carefully the angle
brackets: they denote ensemble average.
For aveType = "sum":
r = [ <sum_pairs sum_ij | q_i - q_j |^(-aveExp) / nMono> ] ^(-1/aveExp)
where q_i is the position of the i-th atom. sum_pairs denotes sum
over all selection pairs introduced using the "ASSIgn ... OR"
syntax. Note carefully the angle brackets: they denote ensemble average.
For aveType = "center":
r = | sum_i q_i /N_1 - sum_j q_j /N_2 |
where the sums are over the two selections listed in the restraint,
and N_1, N_2 are the number of atoms in these selections. Center
averaging ignores additional selection pairs introduced using the
"ASSIgn ... OR" syntax: only the first pair is used in calculation of
the average positions.
For aveType = "shortest" or "closest", r is a single distance
between two atoms corresponding to atoms in any atom selection
pair. For aveType = "shortest" the atoms are those which are closest
in space, while for aveType = "closest" the atoms are those whose
distance is closest to the nominal distance d(). When these aveTypes
are specified, each restraint will have two members atomi and atomj
containing the atom.Atom objects corresponding to shortest or
closest distance.
The RMSD value is computed as
sqrt( sum_k delta_k^2 )
where the sum is over all restraints.
Restraint class
members/methods:
name() - the restraint name
comment() - the restraint comment (entered after the ! in the NOE table)
sel1 - an atomSel.AtomSel corresponding to the first selection
in the restraint table. This member is identical to
selPairs()[0].a
sel2 - an atomSel.AtomSel corresponding to the second selection
in the restraint table. This member is identical to
selPairs()[0].b
selPairs()- a list of selection pairs, accessed through members a and b.
The first pair corresponds to (sel1, sel2), with additional
pairs correspond to those introduced using ASSIgn ... OR
assignment statements.
d() - the observed radius from the restraint table (d above)
dPlus() - the upper bound as listed in the restraint table (dPlus above)
dMinus() - the lower bound as listed in the restraint table (dMinus above)
weight() - a multiplicative weight for this restraint [default: 1]
probability()
- an ancillary per-restraint value used by external facilities
[default: 1].
dist() - the calculated average distance (r above)
diff() - the amount of violation.
asString() - a string representation of the restraint.
variance - variance in dist among an
ensembleSimulation.EnsembleSimulation set of structures.
bestPair() - for "ASSIgn ... OR" restraints, the (zero-offset) index of the
selection pair which gives the smallest energy contribution.
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
Classes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Functions | ||
|