distSymmPot
index
/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/distSymmPot.py


 
Potential term restraining distances expected to be symmetric. This is
approximately the same functionality as that of the XPLOR NOE SYMMetry
routine. The primary difference is that this term will correctly treat
<n ensembleSimulation>.EnsembleSimulation averaging.
 
 
Constructor:
 
  It is suggested that this potential term be created using the helper 
  function distSymmTools.create_DistSymmPot().
 
 
  DistSymmPot(instanceName,   - creates a potential term with the given name. 
              simulation  )     The simulation argument is optional- it omitted
                                simulation.defaultSimulation() will be used.
 
  
Methods:
 
  addRestraint(listOfTuples) - list of two-membered tuples of atom
                                selections, each of which specifies a
                                distance which should be
                                restrained. E.g. for a dimer, the list
                                should contain two sets of distances.
 
  rms()                      - returns a measure of RMSD of distance
                               symmetry violation (see below).
 
  violations()               - returns number of violated distance
                               symmetry restraints
 
  numRestraints()            - return the number of restraints
 
  info()                    - current info about the state of this instance
  showViolations()          - return string containing pretty-printed info
                              on all violated restraints.
 
  restraints()              - return a list of restraints. See the description 
                              of the Restraint class below.
 
  ensWeigth(index) - return the ensemble weight associated with the
                     specified member.
  setEnsWeights(vals) - use the specified ensemble weights instead of those
                        in the underlying EnsembleSimulation.
 
 Read-Write accessors:
  scale             - scale factor (force constant) for the potential term.
  ensembleAveType   - "none" or "average" - controls whether to enforce
                      symmetry restraints on each ensemble member- or to
                      enforce only overall ensemble symmetry (see below).
  threshold         - amount of violation of restraint greater than which 
                      the restraint is considered violated [0.2 angstrom]
  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.
  
 
 the above quantities may be retrieved using the member function form
 quantity(), while they are set using the form setQuantity(value).
 
 
class DistSymmPot_Restraint:
 
methods:
    
public:
  energy() - return current energy
  name()   - restraint name (String)
 
raw members:
 
  tol      - error tolerance for this restraint
 
  distAtom1 - list of lists of atoms. These contain atoms specified by
  distAtom2   addRestraints.
 
  
  contrib    - array containing the contribution to energy from each ensemble 
               member
 
  aveDistIntra - ave. dist. within an ensemble member
  deltaIntra     
  aveDistInter -  distance between atom1 in different ensemble members
  deltaInter1
  aveDistInter2 - distance between atom2 in different ensemble members
  deltaInter2
 
The potential term is defined as
 
  E = scale() * sum_r E_r
 
with
 
  E_r being the contribution from each restraint.
 
For ensembleAveType="none", each restraint's energy is a sum over
contributions from each ensemble member i:
 
   E_r = sum_i w_i ( ca_i + sum_i' w_i' (cr1_ii' + cr2_ii') ),
 
with w_i being the ensemble member's weight,
 
  ca_i = < d_i^2 >_j - < d_i >_j^2        (averaged over all distances)
 
   with  d_ij = |q1_ij - q2_ij|
   and q1_ij, the position of the atom corresponding to the first
   selection of the jth entry in the restraint's distAtom1 in ensemble
   member i.
 
  cr1_ii' = < dr1_ii'^2 >_j - < dr1_ii' >_j^2 
  cr2_ii' = < dr2_ii'^2 >_j - < dr2_ii' >_j^2 
 
    with dr1_ii'j = |q1_ij - q2_i'j|
 
for ensembleAveType="average", distances are calculated using
ensemble-averaged positions:
 
  E_r = ( <d^2>_k - <d>_k^2 - tol ) 
 
for <d^2>_k - <d>_k^2 > tol and zero otherwise.
 
The average distance is
 
<d>_k = 1/Nk sum_k |<q1_k>_e - <q2_k>_e|
 
and variance is
 
<d^2>_k = 1/Nk sum_k |<q1_k>_e - <q2_k>_e|^2
 
where the k-sums are over the restraint's distances, and <>_e denotes
ensemble average.
 
The RMSD is calculated as
 
   sqrt( sum_r E_r / N_r )
 
  where N_r is the number of restraints.
 
 
 
# 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
CDSList_CDSList_Atom
CDSList_DistSymmPot_Restraint
DistSymmPot
EnsemblePot
DistSymmPot_LetterClass
Modified
ModifiedBase
Restraint_DistSymmPot
DistSymmPot_Restraint
VarEnsWeights
rc_EnsemblePot
rc_ptr_DistSymmPot_Restraint

 
class CDSList_CDSList_Atom(builtins.object)
    CDSList_CDSList_Atom(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDSList< Atom,10 > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDSList< Atom,10 > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

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

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 CDSList_DistSymmPot_Restraint(builtins.object)
    CDSList_DistSymmPot_Restraint(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDS::rc_ptr< DistSymmPot_Restraint > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< DistSymmPot_Restraint > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

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

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 DistSymmPot_LetterClass(EnsemblePot)
    DistSymmPot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
DistSymmPot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addRestraint(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
ensembleAveType(self, *args, **kwargs) -> 'DistSymmPot::DistSymmEnsembleAveType'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
pyXplorHelp(self, *args, **kwargs) -> 'String'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< DistSymmPot_Restraint > >'
rms(self, *args, **kwargs) -> 'double'
setEnsembleAveType(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showAllRestraints(self, *args, **kwargs) -> 'bool const'
showViolations(self, *args, **kwargs) -> 'String'
simulation2(self, *args, **kwargs) -> 'Simulation *'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
thisown

 
The membership flag

Data and other attributes defined here:
AVERAGE = 1
NONE = 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'
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) -> 'EnsembleSimulation const *'
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 DistSymmPot_Restraint(Restraint_DistSymmPot)
    DistSymmPot_Restraint(*args, **kwargs)
 

 
 
Method resolution order:
DistSymmPot_Restraint
Restraint_DistSymmPot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'double'
name(self, *args, **kwargs) -> 'String'

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

Data descriptors defined here:
aveDistInter1

 
aveDistInter2

 
aveDistIntra

 
contrib

 
deltaInter1

 
deltaInter2

 
deltaIntra

 
distAtom1

 
distAtom2

 
thisown

 
The membership flag
tol

 
verbose

 

Methods inherited from Restraint_DistSymmPot:
diff(self, *args, **kwargs) -> 'float_type'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

Data descriptors inherited from Restraint_DistSymmPot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
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) -> 'EnsembleSimulation 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)
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 Restraint_DistSymmPot(builtins.object)
    Restraint_DistSymmPot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
diff(self, *args, **kwargs) -> 'float_type'
name(self, *args, **kwargs) -> 'String const'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

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

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 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

 
class rc_ptr_DistSymmPot_Restraint(builtins.object)
    rc_ptr_DistSymmPot_Restraint(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'DistSymmPot_Restraint *'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__ref__(self, *args, **kwargs) -> 'DistSymmPot_Restraint &'
__repr__ = _swig_repr(self)
count(self, *args, **kwargs) -> 'int'
decr(self, *args, **kwargs) -> 'void'
deriv(self, *args, **kwargs) -> 'void'
diff(self, *args, **kwargs) -> 'float_type'
energy(self, *args, **kwargs) -> 'double'
forceDelete(self, *args, **kwargs) -> 'void'
incr(self, *args, **kwargs) -> 'void'
name(self, *args, **kwargs) -> 'String'
ptr(self, *args, **kwargs) -> 'DistSymmPot_Restraint *'
release(self, *args, **kwargs) -> 'DistSymmPot_Restraint *'
reset(self, *args, **kwargs) -> 'void'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
aveDistInter2

 
aveDistIntra

 
contrib

 
deltaInter1

 
deltaInter2

 
deltaIntra

 
distAtom1

 
distAtom2

 
thisown

 
The membership flag
tol

 
verbose

 

 
realDistSymmPot = class DistSymmPot(builtins.object)
    realDistSymmPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'DistSymmPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'DistSymmPot &'
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
addRestraint(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'
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'
ensembleAveType(self, *args, **kwargs) -> 'DistSymmPot::DistSymmEnsembleAveType'
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'
potName(self, *args, **kwargs) -> 'char const *'
pyXplorHelp(self, *args, **kwargs) -> 'String'
refCnt(self, *args, **kwargs) -> 'int'
registerInstanceData(self, *args, **kwargs) -> 'void'
registerTo(self, *args, **kwargs) -> 'void'
resetInstanceName(self, *args, **kwargs) -> 'void'
resetPotName(self, *args, **kwargs) -> 'void'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< DistSymmPot_Restraint > >'
rms(self, *args, **kwargs) -> 'double'
scale(self, *args, **kwargs) -> 'float_type const'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setEnsembleAveType(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showAllRestraints(self, *args, **kwargs) -> 'bool const'
showViolations(self, *args, **kwargs) -> 'String'
simulation(self, *args) -> 'EnsembleSimulation const *'
simulation2(self, *args, **kwargs) -> 'Simulation *'
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'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
instanceDataCreate

 
instanceData_

 
modified

 
registeredSimulations

 
thisown

 
The membership flag

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