cosRatioPot
index
cosRatioPot.py

potential terms to restrain values of Da
 
NOTE: these are not fully tested!
 
These were developed to restrain the orientational varTensor.VarTensor Da values to be close to oneanother (but not
necessarily identical). 
 
CosRatioPot
          1/2 * scale * (cos(theta1) - ratio*cos(theta2))^2
 
 where theta1 is one bond angle, theta2 is a second bond angle, and
 scale and ratio are constants.
 
 use:
  from potCosAngleRatio import CosAngleRatioPot
 
  term = CosRatioPot("name",             
                     AtomSel("atom 01"),
                     AtomSel("atom a1"),
                     AtomSel("atom b1"),
                     AtomSel("atom 02"),
                     AtomSel("atom a2"),
                     AtomSel("atom b2"),
                     [simulation])
 
 theta1 is given by the angle a1 - 01 - b1
 theta2 is given by the angle a2 - 02 - b2
  [simulation is an optional simulation parameter - usually not needed.]
 
 to set the scale factor:
   term.scale = 100
 
 to set the constant ratio:
   term.ratio = 0.2
 
 remember to add this to the terms to be evaluated:
   simulation.addPot(term)
 
##################################################
 
 
Cos2RatioPot
 potential term #2:
       1/2 * scale * (cos(theta1)*cos(theta4) - cos(theta2)*cos(theta3))^2
 
 where theta1, theta2, theta3, and theta4 are bond angles, and
 scale is a constant. Note that the minimum of this potential occurs when
 
    cos(theta1)/cos(theta2) = cos(theta3)/cos(theta4)
 
 use:
  from potCosAngleRatio import CosAngleRatioPot
 
  term = Cos2RatioPot("name",             
                      AtomSel("atom 01"),
                      AtomSel("atom a1"),
                      AtomSel("atom b1"),
                      AtomSel("atom 02"),
                      AtomSel("atom a2"),
                      AtomSel("atom b2"),
                      AtomSel("atom 03"),
                      AtomSel("atom a3"),
                      AtomSel("atom b3"),
                      AtomSel("atom 04"),
                      AtomSel("atom a4"),
                      AtomSel("atom b4"),
                      [simulation])
 
 theta1 is given by the angle a1 - 01 - b1
 theta2 is given by the angle a2 - 02 - b2
  [simulation is an optional simulation parameter - usually not needed.]
 
 to set the scale factor:
   term.scale = 100
 
 to set the constant ratio:
   term.ratio = 0.2
 
 

 
Classes
       
__builtin__.object
Cos2RatioPot
Cos2RatioPotPtr
Cos2RatioPot_LetterClass
Cos2RatioPot_LetterClassPtr
CosRatioPot
CosRatioPotPtr
CosRatioPot_LetterClass
CosRatioPot_LetterClassPtr
Modified
ModifiedPtr
ModifiedBase
ModifiedBasePtr

 
class Cos2RatioPot(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_Cos2RatioPot>)
__deref__(*args)
__getattr__ lambda self, name
__init__(self, *args)
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atom03(*args)
atom04(*args)
atoma1(*args)
atoma2(*args)
atoma3(*args)
atoma4(*args)
atomb1(*args)
atomb2(*args)
atomb3(*args)
atomb4(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cos1(*args)
cos2(*args)
cos3(*args)
cos4(*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)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAtom01(*args)
setAtom02(*args)
setAtom03(*args)
setAtom04(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtoma3(*args)
setAtoma4(*args)
setAtomb1(*args)
setAtomb2(*args)
setAtomb3(*args)
setAtomb4(*args)
setScale(*args)
setThreshold(*args)
simulation(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
violations(*args)

Properties defined here:
instanceData_
get = Cos2RatioPot_instanceData__get(...)
set = Cos2RatioPot_instanceData__set(...)
modified
get = Cos2RatioPot_modified_get(...)
set = Cos2RatioPot_modified_set(...)
registeredSimulations
get = Cos2RatioPot_registeredSimulations_get(...)
set = Cos2RatioPot_registeredSimulations_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x1360248>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function Cos2RatioPot_instanceData__get>, 'modified': <built-in function Cos2RatioPot_modified_get>, 'registeredSimulations': <built-in function Cos2RatioPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function Cos2RatioPot_instanceData__set>, 'modified': <built-in function Cos2RatioPot_modified_set>, 'registeredSimulations': <built-in function Cos2RatioPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'Cos2RatioPot' objects>
list of weak references to the object (if defined)

 
class Cos2RatioPotPtr(Cos2RatioPot)
    
Method resolution order:
Cos2RatioPotPtr
Cos2RatioPot
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from Cos2RatioPot:
__del__(self, destroy=<built-in function delete_Cos2RatioPot>)
__deref__(*args)
__getattr__ lambda self, name
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atom03(*args)
atom04(*args)
atoma1(*args)
atoma2(*args)
atoma3(*args)
atoma4(*args)
atomb1(*args)
atomb2(*args)
atomb3(*args)
atomb4(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cos1(*args)
cos2(*args)
cos3(*args)
cos4(*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)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAtom01(*args)
setAtom02(*args)
setAtom03(*args)
setAtom04(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtoma3(*args)
setAtoma4(*args)
setAtomb1(*args)
setAtomb2(*args)
setAtomb3(*args)
setAtomb4(*args)
setScale(*args)
setThreshold(*args)
simulation(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
violations(*args)

Properties inherited from Cos2RatioPot:
instanceData_
get = Cos2RatioPot_instanceData__get(...)
set = Cos2RatioPot_instanceData__set(...)
modified
get = Cos2RatioPot_modified_get(...)
set = Cos2RatioPot_modified_set(...)
registeredSimulations
get = Cos2RatioPot_registeredSimulations_get(...)
set = Cos2RatioPot_registeredSimulations_set(...)

Data and other attributes inherited from Cos2RatioPot:
__dict__ = <dictproxy object at 0x13603d0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function Cos2RatioPot_instanceData__get>, 'modified': <built-in function Cos2RatioPot_modified_get>, 'registeredSimulations': <built-in function Cos2RatioPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function Cos2RatioPot_instanceData__set>, 'modified': <built-in function Cos2RatioPot_modified_set>, 'registeredSimulations': <built-in function Cos2RatioPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'Cos2RatioPot' objects>
list of weak references to the object (if defined)

 
class Cos2RatioPot_LetterClass(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_Cos2RatioPot_LetterClass>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atom03(*args)
atom04(*args)
atoma1(*args)
atoma2(*args)
atoma3(*args)
atoma4(*args)
atomb1(*args)
atomb2(*args)
atomb3(*args)
atomb4(*args)
cos1(*args)
cos2(*args)
cos3(*args)
cos4(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
help(*args)
info(*args)
numRestraints(*args)
rms(*args)
setAtom01(*args)
setAtom02(*args)
setAtom03(*args)
setAtom04(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtoma3(*args)
setAtoma4(*args)
setAtomb1(*args)
setAtomb2(*args)
setAtomb3(*args)
setAtomb4(*args)
violations(*args)

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

 
class Cos2RatioPot_LetterClassPtr(Cos2RatioPot_LetterClass)
    
Method resolution order:
Cos2RatioPot_LetterClassPtr
Cos2RatioPot_LetterClass
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from Cos2RatioPot_LetterClass:
__del__(self, destroy=<built-in function delete_Cos2RatioPot_LetterClass>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atom03(*args)
atom04(*args)
atoma1(*args)
atoma2(*args)
atoma3(*args)
atoma4(*args)
atomb1(*args)
atomb2(*args)
atomb3(*args)
atomb4(*args)
cos1(*args)
cos2(*args)
cos3(*args)
cos4(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
help(*args)
info(*args)
numRestraints(*args)
rms(*args)
setAtom01(*args)
setAtom02(*args)
setAtom03(*args)
setAtom04(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtoma3(*args)
setAtoma4(*args)
setAtomb1(*args)
setAtomb2(*args)
setAtomb3(*args)
setAtomb4(*args)
violations(*args)

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

 
class CosRatioPot(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_CosRatioPot>)
__deref__(*args)
__getattr__ lambda self, name
__init__(self, *args)
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atoma1(*args)
atoma2(*args)
atomb1(*args)
atomb2(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cos1(*args)
cos2(*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)
ratio(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAtom01(*args)
setAtom02(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtomb1(*args)
setAtomb2(*args)
setRatio(*args)
setScale(*args)
setTargetType(*args)
setThreshold(*args)
simulation(*args)
targetType(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
violations(*args)

Properties defined here:
instanceData_
get = CosRatioPot_instanceData__get(...)
set = CosRatioPot_instanceData__set(...)
modified
get = CosRatioPot_modified_get(...)
set = CosRatioPot_modified_set(...)
registeredSimulations
get = CosRatioPot_registeredSimulations_get(...)
set = CosRatioPot_registeredSimulations_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x1360248>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function CosRatioPot_instanceData__get>, 'modified': <built-in function CosRatioPot_modified_get>, 'registeredSimulations': <built-in function CosRatioPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function CosRatioPot_instanceData__set>, 'modified': <built-in function CosRatioPot_modified_set>, 'registeredSimulations': <built-in function CosRatioPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'CosRatioPot' objects>
list of weak references to the object (if defined)

 
class CosRatioPotPtr(CosRatioPot)
    
Method resolution order:
CosRatioPotPtr
CosRatioPot
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CosRatioPot:
__del__(self, destroy=<built-in function delete_CosRatioPot>)
__deref__(*args)
__getattr__ lambda self, name
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atoma1(*args)
atoma2(*args)
atomb1(*args)
atomb2(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cos1(*args)
cos2(*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)
ratio(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAtom01(*args)
setAtom02(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtomb1(*args)
setAtomb2(*args)
setRatio(*args)
setScale(*args)
setTargetType(*args)
setThreshold(*args)
simulation(*args)
targetType(*args)
threshold(*args)
unRegister(*args)
updateValues(*args)
violations(*args)

Properties inherited from CosRatioPot:
instanceData_
get = CosRatioPot_instanceData__get(...)
set = CosRatioPot_instanceData__set(...)
modified
get = CosRatioPot_modified_get(...)
set = CosRatioPot_modified_set(...)
registeredSimulations
get = CosRatioPot_registeredSimulations_get(...)
set = CosRatioPot_registeredSimulations_set(...)

Data and other attributes inherited from CosRatioPot:
__dict__ = <dictproxy object at 0x1360088>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function CosRatioPot_instanceData__get>, 'modified': <built-in function CosRatioPot_modified_get>, 'registeredSimulations': <built-in function CosRatioPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function CosRatioPot_instanceData__set>, 'modified': <built-in function CosRatioPot_modified_set>, 'registeredSimulations': <built-in function CosRatioPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'CosRatioPot' objects>
list of weak references to the object (if defined)

 
class CosRatioPot_LetterClass(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_CosRatioPot_LetterClass>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atoma1(*args)
atoma2(*args)
atomb1(*args)
atomb2(*args)
cos1(*args)
cos2(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
help(*args)
info(*args)
numRestraints(*args)
ratio(*args)
rms(*args)
setAtom01(*args)
setAtom02(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtomb1(*args)
setAtomb2(*args)
setRatio(*args)
setTargetType(*args)
targetType(*args)
violations(*args)

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

 
class CosRatioPot_LetterClassPtr(CosRatioPot_LetterClass)
    
Method resolution order:
CosRatioPot_LetterClassPtr
CosRatioPot_LetterClass
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CosRatioPot_LetterClass:
__del__(self, destroy=<built-in function delete_CosRatioPot_LetterClass>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
atom01(*args)
atom02(*args)
atoma1(*args)
atoma2(*args)
atomb1(*args)
atomb2(*args)
cos1(*args)
cos2(*args)
energyMaybeDerivs0(*args)
energyMaybeDerivs1(*args)
energyMaybeDerivs2(*args)
help(*args)
info(*args)
numRestraints(*args)
ratio(*args)
rms(*args)
setAtom01(*args)
setAtom02(*args)
setAtoma1(*args)
setAtoma2(*args)
setAtomb1(*args)
setAtomb2(*args)
setRatio(*args)
setTargetType(*args)
targetType(*args)
violations(*args)

Data and other attributes inherited from CosRatioPot_LetterClass:
AVERAGE = 0
FIXED = 1
__dict__ = <dictproxy object at 0x1360248>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CosRatioPot_LetterClass' 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 0x1360440>
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 0x1360088>
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 0x13603d0>
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 0x13603d0>
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)

 
Functions
       
help(...)