potCosAngleRatio
index
potCosAngleRatio.py


 
# Two potential terms involving ratios of cos(theta)
#
# this was developed to restrain rdc/csa Da values to be close to oneanother
#  (but not necessarily identical). These potentials have been reimplemented
#  the C++ module cosRatioPot for speed.
#
###################################################
#
# potential term #1:
#          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 = CosAngleRatioPot("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)
#
###################################################
#
# 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 = Cos2AngleRatioPot("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
       
pyPot.PyPot(__builtin__.object)
Cos2AngleRatioPot
CosAngleRatioPot

 
class Cos2AngleRatioPot(pyPot.PyPot)
   
 

 
 
Method resolution order:
Cos2AngleRatioPot
pyPot.PyPot
__builtin__.object

Methods defined here:
__init__(s, name, atomSel01, atomSela1, atomSelb1, atomSel02, atomSela2, atomSelb2, atomSel03, atomSela3, atomSelb3, atomSel04, atomSela4, atomSelb4, sim=0)

 
calcEnergy(s)

 
calcEnergyAndDerivs(s, derivs)

 

Methods inherited from pyPot.PyPot:
__del__(self, destroy=<built-in function delete_PyPot>)

 
__deref__(*args)

 
__getattr__ lambda self, name

 
__mul__(*args)

 
__oldinit__ = __init__(self, *args)

 
__repr__(self)

 
__setattr__ lambda self, name, value

 
decrRefCount(*args)

 
help(*args)

 
incrRefCount(*args)

 
instanceData(*args)

 
instanceName(*args)

 
numRestraints(*args)

 
pointer(*args)

 
potName(*args)

 
pythonPot(*args)

 
registerInstanceData(*args)

 
registerTo(*args)

 
resetPotName(*args)

 
rms(*args)

 
scale(*args)

 
setScale(*args)

 
setThreshold(*args)

 
threshold(*args)

 
unRegister(*args)

 
updateDelta(*args)

 
updateValues(*args)

 
violations(*args)

 

Properties inherited from pyPot.PyPot:
instanceData_

 
get = PyPot_instanceData__get(...)

 
set = PyPot_instanceData__set(...)

 
modified

 
get = PyPot_modified_get(...)

 
set = PyPot_modified_set(...)

 
registeredSimulations

 
get = PyPot_registeredSimulations_get(...)

 
set = PyPot_registeredSimulations_set(...)

 

Data and other attributes inherited from pyPot.PyPot:
__dict__ = <dictproxy object at 0x2254d70>

 
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function PyPot_instanceData__get>, 'modified': <built-in function PyPot_modified_get>, 'registeredSimulations': <built-in function PyPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function PyPot_instanceData__set>, 'modified': <built-in function PyPot_modified_set>, 'registeredSimulations': <built-in function PyPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'PyPot' objects>

 
list of weak references to the object (if defined)

 
class CosAngleRatioPot(pyPot.PyPot)
   
 

 
 
Method resolution order:
CosAngleRatioPot
pyPot.PyPot
__builtin__.object

Methods defined here:
__init__(s, name, atomSel01, atomSela1, atomSelb1, atomSel02, atomSela2, atomSelb2, sim=0)

 
calcEnergy(s)

 
calcEnergyAndDerivs(s, derivs)

 

Methods inherited from pyPot.PyPot:
__del__(self, destroy=<built-in function delete_PyPot>)

 
__deref__(*args)

 
__getattr__ lambda self, name

 
__mul__(*args)

 
__oldinit__ = __init__(self, *args)

 
__repr__(self)

 
__setattr__ lambda self, name, value

 
decrRefCount(*args)

 
help(*args)

 
incrRefCount(*args)

 
instanceData(*args)

 
instanceName(*args)

 
numRestraints(*args)

 
pointer(*args)

 
potName(*args)

 
pythonPot(*args)

 
registerInstanceData(*args)

 
registerTo(*args)

 
resetPotName(*args)

 
rms(*args)

 
scale(*args)

 
setScale(*args)

 
setThreshold(*args)

 
threshold(*args)

 
unRegister(*args)

 
updateDelta(*args)

 
updateValues(*args)

 
violations(*args)

 

Properties inherited from pyPot.PyPot:
instanceData_

 
get = PyPot_instanceData__get(...)

 
set = PyPot_instanceData__set(...)

 
modified

 
get = PyPot_modified_get(...)

 
set = PyPot_modified_set(...)

 
registeredSimulations

 
get = PyPot_registeredSimulations_get(...)

 
set = PyPot_registeredSimulations_set(...)

 

Data and other attributes inherited from pyPot.PyPot:
__dict__ = <dictproxy object at 0x2254d38>

 
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function PyPot_instanceData__get>, 'modified': <built-in function PyPot_modified_get>, 'registeredSimulations': <built-in function PyPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function PyPot_instanceData__set>, 'modified': <built-in function PyPot_modified_set>, 'registeredSimulations': <built-in function PyPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'PyPot' objects>

 
list of weak references to the object (if defined)

 
Functions
       
addVec(v1, v2)

 
dot(v1, v2)

 
norm(v)

 
sqrt(...)

 
sqrt(x)
 
Return the square root of x.
subVec(v1, v2)

 
subtract v2 from v1
unitVec(v)

 
vecScale(a, v)

 

 
Data
        __package__ = None