Python: module probDistPot
 
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
       
builtins.object
EnsemblePot
ProbDistPot_LetterClass
Modified
ModifiedBase
ProbDistPot
VarEnsWeights
rc_EnsemblePot

 
class EnsemblePot(builtins.object)
    EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
simulation(self, *args) -> 'EnsembleSimulationBase const *'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

Static methods defined here:
__swig_destroy__ = delete_EnsemblePot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
class Modified(builtins.object)
    Modified(*args, **kwargs)
 

 
  Methods defined here:
__call__(self, *args, **kwargs) -> 'int'
Call self as a function.
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
asString(self, *args, **kwargs) -> 'String'
assertClear(self, *args, **kwargs) -> 'void'
clear(self, *args, **kwargs) -> 'void'
set(self, *args, **kwargs) -> 'void'
update(self, *args, **kwargs) -> 'void'
value(self, *args, **kwargs) -> 'int'

Static methods defined here:
__swig_destroy__ = delete_Modified(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

Data and other attributes defined here:
MOD_SELF = 1
MOD_SIMULATION = 2

 
class ModifiedBase(builtins.object)
    ModifiedBase(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
registerTo(self, *args, **kwargs) -> 'void'
unRegister(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_ModifiedBase(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
modified

 
registeredSimulations

 
thisown

 
The membership flag

 
class ProbDistPot_LetterClass(EnsemblePot)
    ProbDistPot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
ProbDistPot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__contains__(s, attr)
__getattr__(s, attr)
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
atomProb(self)
aveGrid(self, *args, **kwargs) -> 'DensityGrid const'
calcRadiusGrad(self, *args, **kwargs) -> 'bool const'
correlation(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensembleRotateCenter(self, *args, **kwargs) -> 'bool'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
oAtom(self, *args, **kwargs) -> 'Atom const'
potType(self, *args, **kwargs) -> 'ProbDistPot::ProbDist_PotType const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
radiusGrad(self, *args, **kwargs) -> 'CDSVector< float_type >'
rawAtomProb(self, *args, **kwargs) -> 'AtomProb *'
renamed_atomProb(self, *args, **kwargs) -> 'AtomProb *'
rho_contrib(self, *args, **kwargs) -> 'CDSVector< float_type >'
rms(self, *args, **kwargs) -> 'float_type'
setCalcRadiusGrad(self, *args, **kwargs) -> 'void'
setEnsembleRotateCenter(self, *args, **kwargs) -> 'void'
setOAtom(self, *args, **kwargs) -> 'void'
setPotType(self, *args, **kwargs) -> 'void'
setTAtom(self, *args, **kwargs) -> 'void'
setXAtom(self, *args, **kwargs) -> 'void'
setYAtom(self, *args, **kwargs) -> 'void'
setZAtom(self, *args, **kwargs) -> 'void'
simulation(self, *args, **kwargs) -> 'EnsembleSimulationBase *'
tAtom(self, *args, **kwargs) -> 'Atom const'
targetMap(self, *args, **kwargs) -> 'DensityGrid *'
violations(self, *args, **kwargs) -> 'float_type'
xAtom(self, *args, **kwargs) -> 'Atom const'
yAtom(self, *args, **kwargs) -> 'Atom const'
zAtom(self, *args, **kwargs) -> 'Atom const'

Static methods defined here:
__swig_destroy__ = delete_ProbDistPot_LetterClass(...)

Data descriptors defined here:
atomProb_

 
ensembleRotateCenter_

 
numAtoms

 
ownAtomProb

 
rmsval

 
targetMap_

 
thisown

 
The membership flag

Data and other attributes defined here:
CORRELATION = 2
CROSS_CORRELATION = 1
DIFF = 0

Methods inherited from EnsemblePot:
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

Data descriptors inherited from EnsemblePot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class VarEnsWeights(builtins.object)
    VarEnsWeights(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

Static methods defined here:
__swig_destroy__ = delete_VarEnsWeights(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
ensWeights

 
mult

 
thisown

 
The membership flag

 
class rc_EnsemblePot(builtins.object)
    rc_EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

Static methods defined here:
__swig_destroy__ = delete_rc_EnsemblePot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
thisown

 
The membership flag

 
realProbDistPot = class ProbDistPot(builtins.object)
    realProbDistPot(*args)
 

 
  Methods defined here:
__contains__(s, attr)
__deref__(self, *args, **kwargs) -> 'ProbDistPot *'
__getattr__(s, attr)
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'ProbDistPot &'
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
atomProb(self)
aveGrid(self, *args, **kwargs) -> 'DensityGrid const'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcRadiusGrad(self, *args, **kwargs) -> 'bool const'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
correlation(self, *args, **kwargs) -> 'float_type'
decrRefCnt(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
ensembleRotateCenter(self, *args, **kwargs) -> 'bool'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
incrRefCnt(self, *args, **kwargs) -> 'void'
info(self, *args, **kwargs) -> 'String'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
numRestraints(self, *args, **kwargs) -> 'int'
oAtom(self, *args, **kwargs) -> 'Atom const'
potName(self, *args, **kwargs) -> 'char const *'
potType(self, *args, **kwargs) -> 'ProbDistPot::ProbDist_PotType const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
radiusGrad(self, *args, **kwargs) -> 'CDSVector< float_type >'
rawAtomProb(self, *args, **kwargs) -> 'AtomProb *'
refCnt(self, *args, **kwargs) -> 'int'
registerInstanceData(self, *args, **kwargs) -> 'void'
registerTo(self, *args, **kwargs) -> 'void'
renamed_atomProb(self, *args, **kwargs) -> 'AtomProb *'
resetInstanceName(self, *args, **kwargs) -> 'void'
resetPotName(self, *args, **kwargs) -> 'void'
rho_contrib(self, *args, **kwargs) -> 'CDSVector< float_type >'
rms(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type const'
setCalcRadiusGrad(self, *args, **kwargs) -> 'void'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setEnsembleRotateCenter(self, *args, **kwargs) -> 'void'
setOAtom(self, *args, **kwargs) -> 'void'
setPotType(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setTAtom(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
setXAtom(self, *args, **kwargs) -> 'void'
setYAtom(self, *args, **kwargs) -> 'void'
setZAtom(self, *args, **kwargs) -> 'void'
simulation(self, *args, **kwargs) -> 'EnsembleSimulationBase *'
tAtom(self, *args, **kwargs) -> 'Atom const'
targetMap(self, *args, **kwargs) -> 'DensityGrid *'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'
xAtom(self, *args, **kwargs) -> 'Atom const'
yAtom(self, *args, **kwargs) -> 'Atom const'
zAtom(self, *args, **kwargs) -> 'Atom const'

Static methods defined here:
__swig_destroy__ = delete_ProbDistPot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
atomProb_

 
ensembleRotateCenter_

 
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
numAtoms

 
ownAtomProb

 
registeredSimulations

 
rmsval

 
targetMap_

 
thisown

 
The membership flag

 
Functions
       
ProbDistPot(*args)
pyXplorHelp(*args) -> 'String'