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

S^2 Order parameter potential
 
  allows refinement against the S2 order parameter, usually obtained
from relaxation experiments. This potential term should be used with
ensembleSimulation.EnsembleSimulation calculations.
 
constructor:   
        OrderPot(instanceName,
                 restraints,
                 simulation)
  
  instanceName is a user-specified identifier. restraints is an optional 
  XPLOR-style restraints table- see below for details. simulation is an 
  optional simulation.Simulation specification. 
 
methods:
  addRestraints(restraintList) - add the specified restraints- see
                                 below for details on the format. Note
                                 that this is a string and not a filename.
 
  calcEnergy()                 - calc energy, returns the value of energy.
  calcEnergyAndDerivs(derivs)  - calc energy, derivs, returns the energy value.
 
 
  rms()           - return the rms of calcedS2 - effS2
  numRestraints() - return the number of restraints defined for this term.
  violations()    - return number of violations
  
  info()                    - current info about the state of this instance
  showViolations()          - return a string listing violated restraints.
 
  restraints() - return a list of restraints. See the description of the
                 Restraint class below.
  simulation() - return the associated simulation.
 
  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.
 
 The following parameters can be set [defaults in square brackets]
 
  verbose   - if true, sporadically spit out info [False]
  scale            - scale factor (force constant) [1]
  threshold - threshold in violation calculation [0]
  potType   - type of potential: "harmonic" or "square" ["harmonic"]
  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. [0]
  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).
 
assignment table:
  entries in the restraint list have the following form
 
      assign ( sel m  ) ( sel n  )  obsS2 error1 [error2] [! optional comment]
 
  the m and n selections specify the bonded atoms involved in the
  interaction. the observed value of S2 is given by
  the obsS2 argument, and the error bounds are given by error1 and
  error2.  If error2 is absent, it defaults to error1.
 
 
 The calculated order parameter is given by the equation
 
   calcedS2 = sum_ij w_i w_j ( 3/2 cos(dot(u_i,u_j)^2 - 1/2 )
 
 where w_i is the weight of ensemble member i (usually 1/Ne), and 
 u_i is the unitvector in the direction q_ni - q_mi.
 
 
 The energy function is defined as
 
       scale * rscale * (calcedS2 - effS2)^2
 
 where for potType=harmonic, effS2 = obsS2, and rscale = 1/error1^2
(if error1!=0). For potType=square, rscale=1, and 
 
       effS2 = calcedS2, if 
                    obsS2-error1 < calcedS2 < obsS2+error2
                = calcedS2+error1, if calcedS2 < obsS2-error1
                = calcedS2-error2, if calcedS2 > obsS2+error2
 
  
 
  Restraint class
 
methods:
  energy() - energy due to this restraint
    
  calcd()  - calculated value of S2.
  obs()    - observed value of S2.
  diff()   - return S2-effS2
 
  plusErr(), minusErr() - bounds for the square well potential
 
  aSel() - atomSel for atom A
  bSel() - atomSel for atom B
 
  comment() - return the optional comment string
 
 
 
# 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_OrderPot_Restraint
EnsemblePot
OrderPot_LetterClass
Modified
ModifiedBase
OrderPot
OrderPot_Restraint
VarEnsWeights
rc_EnsemblePot
rc_ptr_OrderPot_Restraint

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDS::rc_ptr< OrderPot_Restraint > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< OrderPot_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_OrderPot_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 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 OrderPot_LetterClass(EnsemblePot)
    OrderPot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
OrderPot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addRestraints(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
potType(self, *args, **kwargs) -> 'OrderPot::OrderPotType'
pyXplorHelp(self, *args, **kwargs) -> 'String'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< OrderPot_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
setPotType(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'
simulation(self, *args, **kwargs) -> 'EnsembleSimulation *'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
thisown

 
The membership flag

Data and other attributes defined here:
HARMONIC = 0
SQUARE = 1

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

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
aSelection(self, *args, **kwargs) -> 'AtomSel'
bSelection(self, *args, **kwargs) -> 'AtomSel'
calcVectors(self, *args, **kwargs) -> 'void'
calcd(self, *args, **kwargs) -> 'double'
comment(self, *args, **kwargs) -> 'String const'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'double'
minusErr(self, *args, **kwargs) -> 'double'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'double'
ok(self, *args, **kwargs) -> 'int'
plusErr(self, *args, **kwargs) -> 'double'
setComment(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_OrderPot_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
u

 
vecNorm

 

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

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'OrderPot_Restraint *'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__ref__(self, *args, **kwargs) -> 'OrderPot_Restraint &'
__repr__ = _swig_repr(self)
aSelection(self, *args, **kwargs) -> 'AtomSel'
bSelection(self, *args, **kwargs) -> 'AtomSel'
calcVectors(self, *args, **kwargs) -> 'void'
calcd(self, *args, **kwargs) -> 'double'
comment(self, *args, **kwargs) -> 'String const'
count(self, *args, **kwargs) -> 'int'
decr(self, *args, **kwargs) -> 'void'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'double'
forceDelete(self, *args, **kwargs) -> 'void'
incr(self, *args, **kwargs) -> 'void'
minusErr(self, *args, **kwargs) -> 'double'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'double'
ok(self, *args, **kwargs) -> 'int'
plusErr(self, *args, **kwargs) -> 'double'
ptr(self, *args, **kwargs) -> 'OrderPot_Restraint *'
release(self, *args, **kwargs) -> 'OrderPot_Restraint *'
reset(self, *args, **kwargs) -> 'void'
setComment(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_rc_ptr_OrderPot_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
u

 
vecNorm

 

 
realOrderPot = class OrderPot(builtins.object)
    realOrderPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'OrderPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'OrderPot &'
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
addRestraints(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'
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 *'
potType(self, *args, **kwargs) -> 'OrderPot::OrderPotType'
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< OrderPot_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type const'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setPotType(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, **kwargs) -> 'EnsembleSimulation *'
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_OrderPot(...)

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
       
OrderPot(*args)
pyXplorHelp(*args) -> 'String'