probDistPot |
index |
Potential term to restrain a density map computed from atomic position to a
specified target map.
constructor: ProbDistPot(instanceName,
targetMap,
atomSel,
atomProb=None,
oAtom=Atom(),
xAtom=Atom(),
yAtom=Atom(),
zAtom=Atom(),
tAtom=Atom(),
ensembleRotateTranslate=False
)
- instanceName is an arbitray identifying string.
- targetMap contains the densityGrid.DensityGrid map to which
the structure will be fitted.
- atomSel specifies the atomSel.AtomSel used to generate a
map.
- the atomProb argument is an optional atomProb.AtomProb
object used to generate a density map from atomic coordinates.
- the atom arguments are specified if pseudo-atom rotation and
translation are to be enabled.
- ensembleRotateTranslate specifies whether or not, in an
ensembleSimualtion.EnsembleSimulation, each ensemble
member has a separate rotation and translation.
methods:
calcEnergy() - calc energy, returns the energy value.
calcEnergyAndDerivs(derivs) - calc energy, derivs, returns the energy value.
correlation() - return the normalized cross-correlation between
the map computed from atomic structure and
the target map.
rms() - ranges from 0 to 1. 0 means the maps matches
perfectly. 1 means maps are dissimilar.
simulation() - return the simulation.Simulation
associated with this energy term.
targetMap() - Return the densityGrid.DensityGrid object containing
the target map.
atomProb() - Return the atomProb.AtomProb object which contains the
map computed from atomic coordinates. This accessor will
call the term's calcEnergy method if coordinates or if one
or more of the term's properties has changed, so it is
not safe to call in an EnsembleSimualtion single-threaded
region.
rawAtomProb() - Return the atomProb.AtomProb object without calling
calcEnergy().
aveGrid() - Return the densityGrid.DensityGrid object containing
the ensemble-averaged map. For Ne=1, aveGrid() is the
same as atomProb().getGrid()
rho_contrib(member=-1) - returns the probability density values for the
grid associated with the specified ensemble
member index. A negative number specifies that
the values for the current member are to be
returned.
info() - a string containing status information.
accessors:
[ can be set using setAccessor( newVal ) ]
scale() - force constant for this energy term.
potType() - potential type: "diff" (default) or
"cross_correlation"
ensembleRotateCenter - each ensemble member will use a separate
rotation and translation if True, else the
rotation and translation of ensemble member 0
will be applied to the map in all ensemble
members.
oAtom - accessors specifying atoms, whose positions
xAtom specify projection orientation. If specified.
yAtom the gradient with respect to projection
zAtom orientation is collected for these atoms.
tAtom - tAtom.pos()-oAtom.pos() specifies translation to center
the map on the selected atoms.
members:
(direct member access is deprecated)
targetMap_ - densityGrid.DensityGrid object containing the target
map.
prStruct - atomProb.AtomProb object which contains the
map computed from atomSel.
The energy is calculated from rhoObs_i and rhoCalc_i, respectively,
the observed and calculated density at gridpoint i by:
[for "cross_correlation" potType]
E = scale * Natoms * rms
for rms = 1 - C where C is the normalized cross-correlation:
\sum_i rhoObs_i * rhoCalc_i
C = -------------------------------------------
sqrt(\sum_i rhoObs_i^2) sqrt(\sum_i rhoCalc_i^2)
For "correlation" potType, C is calculated as
E = scale * Natoms * rms
\sum_i rhoObs_i * rhoCalc_i - <rhoObs> * <rhoCalc>
C = --------------------------------------------------------------------------
sqrt(\sum_i rhoObs_i^2 - <rhoObs>^2) sqrt(\sum_i rhoCalc_i^2 - <rhoCalc>^2)
[for "diff" potType]
E = scale * Natoms * delta_x*delta_y*delta_z *
\sum_i (rhoObs_i - rhoCalc_i)^2
where delta_x/y/z correspond to grid spacings, and Natoms is the number of
int the atomSel, specified when this object was created. For 2D maps,
delta_z=1.
If the oAtom, xAtom, yAtom and zAtom psuedoatoms are specified, the
atomProb's translation is set to
translation = tAtom.pos() - oAtom.pos()
and atomProb's orientation member is set to the matrix constructed
from the column vectors ( ux, uy, uz),
where
ux = unitVec( xAtom.pos() - oAtom.pos() )
uy = unitVec( yAtom.pos() - oAtom.pos() )
uz = unitVec( zAtom.pos() - oAtom.pos() )
# 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 | ||
|