| ccrPot |
index |
ccrPot
For Cross-correlation relaxation and RDC correlation potentials.
constructor:
CCRPot(instanceName,
restraints,
simulation=None)
-instanceName is a user-specified identifier.
-restraints is an restraint table (the format is described below)
-simulation is an optional simulation.Simulation. It
defaults to the current Simulation.
methods:
addRestraints(string) - add restraints
rms() - return the RMSD of calculated - observed.
chi2() - return the chi-squared value.
correlation() - return the correlation between
calculated and observed.
calcEnergy() - calc energy, returns the energy value.
calcEnergyAndDerivs(derivs) - calc energy, derivs, returns the energy value.
deviation() - return average of deviation of
ensemble members. This is nonzero
only for Ne>1 ensembleSimulations.
numRestraints() - return the number of restraints.
violations() - return number of violations
info() - current info about the state of
this instance.
showViolations() - return a string listing violated restraints.
showRestraints(violated) - return info on restraints. Argument
violated is boolean specifying whether
to return only violated restraints.
restraints() - return a list of restraints. See the
description of the Restraint class below.
simulation() - return the associated simulation.Simulation.
The following members can be read using the method named member() and set
using the method setMember(val) [defaults in square brackets]
scale - scale factor (force constant) [1]
threshold - threshold in violation calculation [0]
potType - type of potential: "harmonic", "square", or
"correlation" ["harmonic"]
verbose - boolean, whether to produce verbose output [False]
prefactor - constant prefactor by which to multiply all
restraints [1]
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]
Assignment Table:
The native format for the restraint is
assign ( sel x1 ) ( sel x2 ) ( sel y1 ) (sel y2 ) obs err ! optional comment
where the x1, x2, y1 and y2 selections specify (single) atoms involved
in the interaction. The observed value is given by obs argument.
The error bound is given by error argument.
Restraint class
methods:
name() - name of this restraint.
energy() - energy due to this restraint
calcd() - calculated observable (ensemble average).
variance() - measure of spread between different ensemble members.
diff() - difference between calcd and obs
atomX1() - atoms as specified in the restraint table.
atomX2() -
atomY1() -
atomY2() -
bSelection() - atomSel for atom B
calced_contrib() - list of contributions due to each ensemble member.
deviation() -
The following members can be read using member() or set using setMember().
I.e. restraint.setObs( 1.2 )
obs - observed value
err - the experimental error.
comment - optional comment as specified in the restraint table.
The observable is computed as
delta = 1/2 * prefactor * ( 3 cosTheta^2 -1 )
where prefactor is specified as above, and cosTheta is
cosTheta = dotProd( unitVec( x2-x1 ) , unitVec( y2-y1 )
The energy computation depends on the value of potType:
For potType of "harmonic" and "square":
E = scale * \sum_i diff_i^2
where
/ (calc_i - obs_i)/err_i for potType=harmonic
diff_i = | (calc_i - obs_i - err) for potType=square calc_i > obs_i + err_i
| 0 for potType=square abs(calc_i-obs_i)<err_i
\ (calc_i - obs_i + err) for potType=square calc_i < obs_i - err_i
For potType of "correlation"
E = scale * (1 - correlation)
with
\sum_i (calcd_i-aveCalcd) * (obs_i-aveObs)
correlation = ----------------------------------------------------
sqrt( \sum_i (calcd_i-aveCalcd)^2 * \sum_i (obs_i-aveObs)^2 )
and aveCalcd and aveObs the average over calculdated and experimental
values, repspectively.
# 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 | ||
| ||