orderPot
index
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.
 
 
 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]
 
 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
 

 
Classes
       
__builtin__.object
CDSList_OrderPot_Restraint
CDSList_OrderPot_RestraintPtr
Modified
ModifiedPtr
ModifiedBase
ModifiedBasePtr
OrderPot
OrderPotPtr
OrderPot_LetterClass
OrderPot_LetterClassPtr
OrderPot_Restraint
OrderPot_RestraintPtr
rc_ptr_OrderPot_Restraint
rc_ptr_OrderPot_RestraintPtr

 
class CDSList_OrderPot_Restraint(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_CDSList_OrderPot_Restraint>)
__delitem__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__init__(self, *args)
__len__(*args)
__repr__(self)
__setattr__ lambda self, name, value
__setitem__(*args)
help(*args)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x140ff68>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSList_OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
class CDSList_OrderPot_RestraintPtr(CDSList_OrderPot_Restraint)
    
Method resolution order:
CDSList_OrderPot_RestraintPtr
CDSList_OrderPot_Restraint
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSList_OrderPot_Restraint:
__del__(self, destroy=<built-in function delete_CDSList_OrderPot_Restraint>)
__delitem__(*args)
__getattr__ lambda self, name
__getitem__(*args)
__getslice__(*args)
__len__(*args)
__repr__(self)
__setattr__ lambda self, name, value
__setitem__(*args)
help(*args)

Data and other attributes inherited from CDSList_OrderPot_Restraint:
__dict__ = <dictproxy object at 0x140fec0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSList_OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
class Modified(__builtin__.object)
     Methods defined here:
__call__(*args)
__del__(self, destroy=<built-in function delete_Modified>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
clear(*args)
set(*args)
update(*args)
value(*args)

Data and other attributes defined here:
MOD_SELF = 1
MOD_SIMULATION = 2
__dict__ = <dictproxy object at 0x140fef8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'Modified' objects>
list of weak references to the object (if defined)

 
class ModifiedBase(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_ModifiedBase>)
__getattr__ lambda self, name
__init__(self)
__repr__(self)
__setattr__ lambda self, name, value
registerTo(*args)
unRegister(*args)
updateValues(*args)

Properties defined here:
modified
get = ModifiedBase_modified_get(...)
set = ModifiedBase_modified_set(...)
registeredSimulations
get = ModifiedBase_registeredSimulations_get(...)
set = ModifiedBase_registeredSimulations_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x140fe50>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'modified': <built-in function ModifiedBase_modified_get>, 'registeredSimulations': <built-in function ModifiedBase_registeredSimulations_get>}
__swig_setmethods__ = {'modified': <built-in function ModifiedBase_modified_set>, 'registeredSimulations': <built-in function ModifiedBase_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'ModifiedBase' objects>
list of weak references to the object (if defined)

 
class ModifiedBasePtr(ModifiedBase)
    
Method resolution order:
ModifiedBasePtr
ModifiedBase
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from ModifiedBase:
__del__(self, destroy=<built-in function delete_ModifiedBase>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
registerTo(*args)
unRegister(*args)
updateValues(*args)

Properties inherited from ModifiedBase:
modified
get = ModifiedBase_modified_get(...)
set = ModifiedBase_modified_set(...)
registeredSimulations
get = ModifiedBase_registeredSimulations_get(...)
set = ModifiedBase_registeredSimulations_set(...)

Data and other attributes inherited from ModifiedBase:
__dict__ = <dictproxy object at 0x140fc58>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'modified': <built-in function ModifiedBase_modified_get>, 'registeredSimulations': <built-in function ModifiedBase_registeredSimulations_get>}
__swig_setmethods__ = {'modified': <built-in function ModifiedBase_modified_set>, 'registeredSimulations': <built-in function ModifiedBase_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'ModifiedBase' objects>
list of weak references to the object (if defined)

 
class ModifiedPtr(Modified)
    
Method resolution order:
ModifiedPtr
Modified
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from Modified:
__call__(*args)
__del__(self, destroy=<built-in function delete_Modified>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
clear(*args)
set(*args)
update(*args)
value(*args)

Data and other attributes inherited from Modified:
MOD_SELF = 1
MOD_SIMULATION = 2
__dict__ = <dictproxy object at 0x140fc58>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'Modified' objects>
list of weak references to the object (if defined)

 
class OrderPot(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_OrderPot>)
__deref__(*args)
__getattr__ lambda self, name
__init__(self, *args)
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
addRestraints(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
energyMaybeDerivs3(*args)
energyMaybeDerivs4(*args)
help(*args)
incrRefCount(*args)
info(*args)
instanceData(*args)
instanceName(*args)
numRestraints(*args)
pointer(*args)
potName(*args)
potType(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
restraints(*args)
rms(*args)
scale(*args)
setPotType(*args)
setScale(*args)
setShowAllRestraints(*args)
setThreshold(*args)
setVerbose(*args)
showAllRestraints(*args)
showViolations(*args)
simulation(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties defined here:
instanceData_
get = OrderPot_instanceData__get(...)
set = OrderPot_instanceData__set(...)
modified
get = OrderPot_modified_get(...)
set = OrderPot_modified_set(...)
registeredSimulations
get = OrderPot_registeredSimulations_get(...)
set = OrderPot_registeredSimulations_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x140fe50>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function OrderPot_instanceData__get>, 'modified': <built-in function OrderPot_modified_get>, 'registeredSimulations': <built-in function OrderPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function OrderPot_instanceData__set>, 'modified': <built-in function OrderPot_modified_set>, 'registeredSimulations': <built-in function OrderPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'OrderPot' objects>
list of weak references to the object (if defined)

 
class OrderPotPtr(OrderPot)
    
Method resolution order:
OrderPotPtr
OrderPot
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from OrderPot:
__del__(self, destroy=<built-in function delete_OrderPot>)
__deref__(*args)
__getattr__ lambda self, name
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
addRestraints(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
energyMaybeDerivs3(*args)
energyMaybeDerivs4(*args)
help(*args)
incrRefCount(*args)
info(*args)
instanceData(*args)
instanceName(*args)
numRestraints(*args)
pointer(*args)
potName(*args)
potType(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
restraints(*args)
rms(*args)
scale(*args)
setPotType(*args)
setScale(*args)
setShowAllRestraints(*args)
setThreshold(*args)
setVerbose(*args)
showAllRestraints(*args)
showViolations(*args)
simulation(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties inherited from OrderPot:
instanceData_
get = OrderPot_instanceData__get(...)
set = OrderPot_instanceData__set(...)
modified
get = OrderPot_modified_get(...)
set = OrderPot_modified_set(...)
registeredSimulations
get = OrderPot_registeredSimulations_get(...)
set = OrderPot_registeredSimulations_set(...)

Data and other attributes inherited from OrderPot:
__dict__ = <dictproxy object at 0x140ff68>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function OrderPot_instanceData__get>, 'modified': <built-in function OrderPot_modified_get>, 'registeredSimulations': <built-in function OrderPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function OrderPot_instanceData__set>, 'modified': <built-in function OrderPot_modified_set>, 'registeredSimulations': <built-in function OrderPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'OrderPot' objects>
list of weak references to the object (if defined)

 
class OrderPot_LetterClass(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_OrderPot_LetterClass>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
addRestraints(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
help(*args)
info(*args)
numRestraints(*args)
potType(*args)
restraints(*args)
rms(*args)
setPotType(*args)
setShowAllRestraints(*args)
setVerbose(*args)
showAllRestraints(*args)
showViolations(*args)
simulation(*args)
verbose(*args)
violations(*args)

Data and other attributes defined here:
HARMONIC = 0
SQUARE = 1
__dict__ = <dictproxy object at 0x140ff30>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'OrderPot_LetterClass' objects>
list of weak references to the object (if defined)

 
class OrderPot_LetterClassPtr(OrderPot_LetterClass)
    
Method resolution order:
OrderPot_LetterClassPtr
OrderPot_LetterClass
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from OrderPot_LetterClass:
__del__(self, destroy=<built-in function delete_OrderPot_LetterClass>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
addRestraints(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
help(*args)
info(*args)
numRestraints(*args)
potType(*args)
restraints(*args)
rms(*args)
setPotType(*args)
setShowAllRestraints(*args)
setVerbose(*args)
showAllRestraints(*args)
showViolations(*args)
simulation(*args)
verbose(*args)
violations(*args)

Data and other attributes inherited from OrderPot_LetterClass:
HARMONIC = 0
SQUARE = 1
__dict__ = <dictproxy object at 0x140fef8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'OrderPot_LetterClass' objects>
list of weak references to the object (if defined)

 
class OrderPot_Restraint(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_OrderPot_Restraint>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
aSelection(*args)
bSelection(*args)
calcVectors(*args)
calcd(*args)
comment(*args)
deriv(*args)
energy(*args)
minusErr(*args)
name(*args)
obs(*args)
ok(*args)
plusErr(*args)
setComment(*args)
setObs(*args)

Properties defined here:
u
get = OrderPot_Restraint_u_get(...)
set = OrderPot_Restraint_u_set(...)
vecNorm
get = OrderPot_Restraint_vecNorm_get(...)
set = OrderPot_Restraint_vecNorm_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x140ff68>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'u': <built-in function OrderPot_Restraint_u_get>, 'vecNorm': <built-in function OrderPot_Restraint_vecNorm_get>}
__swig_setmethods__ = {'u': <built-in function OrderPot_Restraint_u_set>, 'vecNorm': <built-in function OrderPot_Restraint_vecNorm_set>}
__weakref__ = <attribute '__weakref__' of 'OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
class OrderPot_RestraintPtr(OrderPot_Restraint)
    
Method resolution order:
OrderPot_RestraintPtr
OrderPot_Restraint
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from OrderPot_Restraint:
__del__(self, destroy=<built-in function delete_OrderPot_Restraint>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
aSelection(*args)
bSelection(*args)
calcVectors(*args)
calcd(*args)
comment(*args)
deriv(*args)
energy(*args)
minusErr(*args)
name(*args)
obs(*args)
ok(*args)
plusErr(*args)
setComment(*args)
setObs(*args)

Properties inherited from OrderPot_Restraint:
u
get = OrderPot_Restraint_u_get(...)
set = OrderPot_Restraint_u_set(...)
vecNorm
get = OrderPot_Restraint_vecNorm_get(...)
set = OrderPot_Restraint_vecNorm_set(...)

Data and other attributes inherited from OrderPot_Restraint:
__dict__ = <dictproxy object at 0x140fe50>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'u': <built-in function OrderPot_Restraint_u_get>, 'vecNorm': <built-in function OrderPot_Restraint_vecNorm_get>}
__swig_setmethods__ = {'u': <built-in function OrderPot_Restraint_u_set>, 'vecNorm': <built-in function OrderPot_Restraint_vecNorm_set>}
__weakref__ = <attribute '__weakref__' of 'OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
class rc_ptr_OrderPot_Restraint(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_rc_ptr_OrderPot_Restraint>)
__deref__(*args)
__getattr__ lambda self, name
__init__(self, *args)
__mul__(*args)
__repr__(self)
__setattr__ lambda self, name, value
aSelection(*args)
bSelection(*args)
calcVectors(*args)
calcd(*args)
comment(*args)
count(*args)
decr(*args)
deriv(*args)
energy(*args)
incr(*args)
minusErr(*args)
name(*args)
obs(*args)
ok(*args)
plusErr(*args)
ptr(*args)
reset(*args)
setComment(*args)
setObs(*args)

Properties defined here:
u
get = rc_ptr_OrderPot_Restraint_u_get(...)
set = rc_ptr_OrderPot_Restraint_u_set(...)
vecNorm
get = rc_ptr_OrderPot_Restraint_vecNorm_get(...)
set = rc_ptr_OrderPot_Restraint_vecNorm_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x140ff30>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'u': <built-in function rc_ptr_OrderPot_Restraint_u_get>, 'vecNorm': <built-in function rc_ptr_OrderPot_Restraint_vecNorm_get>}
__swig_setmethods__ = {'u': <built-in function rc_ptr_OrderPot_Restraint_u_set>, 'vecNorm': <built-in function rc_ptr_OrderPot_Restraint_vecNorm_set>}
__weakref__ = <attribute '__weakref__' of 'rc_ptr_OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
class rc_ptr_OrderPot_RestraintPtr(rc_ptr_OrderPot_Restraint)
    
Method resolution order:
rc_ptr_OrderPot_RestraintPtr
rc_ptr_OrderPot_Restraint
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from rc_ptr_OrderPot_Restraint:
__del__(self, destroy=<built-in function delete_rc_ptr_OrderPot_Restraint>)
__deref__(*args)
__getattr__ lambda self, name
__mul__(*args)
__repr__(self)
__setattr__ lambda self, name, value
aSelection(*args)
bSelection(*args)
calcVectors(*args)
calcd(*args)
comment(*args)
count(*args)
decr(*args)
deriv(*args)
energy(*args)
incr(*args)
minusErr(*args)
name(*args)
obs(*args)
ok(*args)
plusErr(*args)
ptr(*args)
reset(*args)
setComment(*args)
setObs(*args)

Properties inherited from rc_ptr_OrderPot_Restraint:
u
get = rc_ptr_OrderPot_Restraint_u_get(...)
set = rc_ptr_OrderPot_Restraint_u_set(...)
vecNorm
get = rc_ptr_OrderPot_Restraint_vecNorm_get(...)
set = rc_ptr_OrderPot_Restraint_vecNorm_set(...)

Data and other attributes inherited from rc_ptr_OrderPot_Restraint:
__dict__ = <dictproxy object at 0x140fef8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'u': <built-in function rc_ptr_OrderPot_Restraint_u_get>, 'vecNorm': <built-in function rc_ptr_OrderPot_Restraint_vecNorm_get>}
__swig_setmethods__ = {'u': <built-in function rc_ptr_OrderPot_Restraint_u_set>, 'vecNorm': <built-in function rc_ptr_OrderPot_Restraint_vecNorm_set>}
__weakref__ = <attribute '__weakref__' of 'rc_ptr_OrderPot_Restraint' objects>
list of weak references to the object (if defined)

 
Functions
       
help(...)