selNBPot
index
selNBPot.py

linear potential term between selected groups of atoms - used in 
empirical term to capture hydrophobic effect.
 
constructor: SelNBPot(instanceName,
                      groups,
                      interactionMat)
 
  instanceName is a user-specified identifier
  groups is a sequence of AtomSel specifying groups of atoms which interact
  when the get close enough.
  interactionMat is a cdsMatrix.SymMatrix_double matrix which
  specifies the sign and strength of the interaction between atoms in groups.
  The size of this matrix must be the same as the length of groups.
 
methods
  calcEnergy()                 - calc energy, returns the energy value.
  calcEnergyAndDerivs(derivs)  - calc energy, derivs, returns the energy value.
 
  info()                    - current info about the state of this instance
  distances()               - return a matrix of len(groups) containing 
                              distances for those groups within cutoffLong.
                              All other elements are set to -1.
 
 The following parameters can be set [defaults in square brackets]
 
  cutoffShort    -   short-range cutoff for interactions between groups.
                     Groups whose average distance is less than
                     cutoffShort contribute nothing to the energy [10].
  cutoffLong     -   long-range cutoff for interactions between groups.
                     Groups whose average distance is larger than
                     cutoffLong contribute nothing to the energy [0].
  dSwitch        -   size of switching region (in Angstroms)  on either 
                     side of the linear potential. See below [0.5].
  groups         -   list of AtomSel defining interacting groups.
  interactionMat -   matrix specifying sign and strength of interaction
                     between the corresponding groups.
  aveExp         -   exponential to use when calculating the average distance
                     between groups with more than one atom each [6].
  moveTol        -   distance atoms move before their neighbor list is
                     recalculated [0].
 
 the above quantities may be retrieved using the member function form
 quantity(), while they are set using the form setQuantity(value).
 
 
 The energy function is defined as the 
 
       V = scale * sum_ij V_ij
 
  where the sum is over all groups i and j. V_ij is nonzero if the
average distance between the two groups is between cutoffShort and
cutoffLong:
 
     V_ij = interactionMat[i,j] * Vp(d_ij)
 
The average distance is calculated as
 
    d_ij = [ sum_ki,kj | q_ki - q_kj |^(-aveExp) ] ^(-1/aveExp)
 
where q_ki and q_kj are atom positions in groups i and j,
respectively.
 
Vp(d) is a piecewise continuous linear potential term with continuous first
derivative:
 
        /                                                                     
        |  1                            d<cutoffShort                              
        |1-gamma*(d-cutoffShort)**2 +                                            
Vp(d) = |    delta*(d-cutoffShort)**3   cutoffShort<d<cutoffShort+d_sw              
        |(cutoffLong-d) /                                                   
        |  (cutoffLong-cutoffShort)     cutoffShort+d_sw<d<cutoffLong-d_sw    
        |gamma*(cutoffLong-d)**2 -                                            
        |  delta*(cutoffLong-d)**3      cutoffLong-d_sw<d<cutoffLong              
        |  0                            d>cutoffLong                              
        \                                                                     
 
where 
  gamma=2/d_sw/(cutoffLong-cutoffShort)
  delta=1/d_sw**2/(cutoffLong-cutoffShort)
 
 
 
 
 
 
 
 

 
Classes
       
__builtin__.object
CDSList_AtomSel
CDSList_AtomSelPtr
Modified
ModifiedPtr
ModifiedBase
ModifiedBasePtr
SelNBPot
SelNBPotPtr
SelNBPot_LetterClass
SelNBPot_LetterClassPtr

 
class CDSList_AtomSel(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_CDSList_AtomSel>)
__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 0x14e20f8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSList_AtomSel' objects>
list of weak references to the object (if defined)

 
class CDSList_AtomSelPtr(CDSList_AtomSel)
    
Method resolution order:
CDSList_AtomSelPtr
CDSList_AtomSel
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from CDSList_AtomSel:
__del__(self, destroy=<built-in function delete_CDSList_AtomSel>)
__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_AtomSel:
__dict__ = <dictproxy object at 0x14e20c0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {}
__swig_setmethods__ = {}
__weakref__ = <attribute '__weakref__' of 'CDSList_AtomSel' 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 0x14e21a0>
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 0x14e20c0>
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 0x14e2210>
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 0x14e2210>
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 SelNBPot(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_SelNBPot>)
__deref__(*args)
__getattr__ lambda self, name
__init__(self, *args)
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
aveExp(*args)
aveType(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cutoffLong(*args)
cutoffShort(*args)
dSwitch(*args)
distances(*args)
groups(*args)
help(*args)
incrRefCount(*args)
info(*args)
instanceData(*args)
instanceName(*args)
interactionMat(*args)
moveTol(*args)
numRestraints(*args)
pointer(*args)
potName(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAveExp(*args)
setAveType(*args)
setCutoffLong(*args)
setCutoffShort(*args)
setDSwitch(*args)
setGroups(*args)
setInteractionMat(*args)
setMoveTol(*args)
setScale(*args)
setThreshold(*args)
setVerbose(*args)
showViolations(*args)
threshold(*args)
unRegister(*args)
updateNeighborList(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties defined here:
instanceData_
get = SelNBPot_instanceData__get(...)
set = SelNBPot_instanceData__set(...)
modified
get = SelNBPot_modified_get(...)
set = SelNBPot_modified_set(...)
neighbors
get = SelNBPot_neighbors_get(...)
set = SelNBPot_neighbors_set(...)
registeredSimulations
get = SelNBPot_registeredSimulations_get(...)
set = SelNBPot_registeredSimulations_set(...)

Data and other attributes defined here:
__dict__ = <dictproxy object at 0x14e21a0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function SelNBPot_instanceData__get>, 'modified': <built-in function SelNBPot_modified_get>, 'neighbors': <built-in function SelNBPot_neighbors_get>, 'registeredSimulations': <built-in function SelNBPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function SelNBPot_instanceData__set>, 'modified': <built-in function SelNBPot_modified_set>, 'neighbors': <built-in function SelNBPot_neighbors_set>, 'registeredSimulations': <built-in function SelNBPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'SelNBPot' objects>
list of weak references to the object (if defined)

 
class SelNBPotPtr(SelNBPot)
    
Method resolution order:
SelNBPotPtr
SelNBPot
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from SelNBPot:
__del__(self, destroy=<built-in function delete_SelNBPot>)
__deref__(*args)
__getattr__ lambda self, name
__mul__(*args)
__oldinit__ = __init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
aveExp(*args)
aveType(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cutoffLong(*args)
cutoffShort(*args)
dSwitch(*args)
distances(*args)
groups(*args)
help(*args)
incrRefCount(*args)
info(*args)
instanceData(*args)
instanceName(*args)
interactionMat(*args)
moveTol(*args)
numRestraints(*args)
pointer(*args)
potName(*args)
registerInstanceData(*args)
registerTo(*args)
resetPotName(*args)
rms(*args)
scale(*args)
setAveExp(*args)
setAveType(*args)
setCutoffLong(*args)
setCutoffShort(*args)
setDSwitch(*args)
setGroups(*args)
setInteractionMat(*args)
setMoveTol(*args)
setScale(*args)
setThreshold(*args)
setVerbose(*args)
showViolations(*args)
threshold(*args)
unRegister(*args)
updateNeighborList(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties inherited from SelNBPot:
instanceData_
get = SelNBPot_instanceData__get(...)
set = SelNBPot_instanceData__set(...)
modified
get = SelNBPot_modified_get(...)
set = SelNBPot_modified_set(...)
neighbors
get = SelNBPot_neighbors_get(...)
set = SelNBPot_neighbors_set(...)
registeredSimulations
get = SelNBPot_registeredSimulations_get(...)
set = SelNBPot_registeredSimulations_set(...)

Data and other attributes inherited from SelNBPot:
__dict__ = <dictproxy object at 0x14e21d8>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'instanceData_': <built-in function SelNBPot_instanceData__get>, 'modified': <built-in function SelNBPot_modified_get>, 'neighbors': <built-in function SelNBPot_neighbors_get>, 'registeredSimulations': <built-in function SelNBPot_registeredSimulations_get>}
__swig_setmethods__ = {'instanceData_': <built-in function SelNBPot_instanceData__set>, 'modified': <built-in function SelNBPot_modified_set>, 'neighbors': <built-in function SelNBPot_neighbors_set>, 'registeredSimulations': <built-in function SelNBPot_registeredSimulations_set>}
__weakref__ = <attribute '__weakref__' of 'SelNBPot' objects>
list of weak references to the object (if defined)

 
class SelNBPot_LetterClass(__builtin__.object)
     Methods defined here:
__del__(self, destroy=<built-in function delete_SelNBPot_LetterClass>)
__getattr__ lambda self, name
__init__(self, *args)
__repr__(self)
__setattr__ lambda self, name, value
aveExp(*args)
aveType(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cutoffLong(*args)
cutoffShort(*args)
dSwitch(*args)
distances(*args)
groups(*args)
help(*args)
info(*args)
interactionMat(*args)
moveTol(*args)
numRestraints(*args)
rms(*args)
setAveExp(*args)
setAveType(*args)
setCutoffLong(*args)
setCutoffShort(*args)
setDSwitch(*args)
setGroups(*args)
setInteractionMat(*args)
setMoveTol(*args)
setThreshold(*args)
setVerbose(*args)
showViolations(*args)
threshold(*args)
updateNeighborList(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties defined here:
neighbors
get = SelNBPot_LetterClass_neighbors_get(...)
set = SelNBPot_LetterClass_neighbors_set(...)

Data and other attributes defined here:
CENTER = 0
SUM = 1
__dict__ = <dictproxy object at 0x14e20c0>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'neighbors': <built-in function SelNBPot_LetterClass_neighbors_get>}
__swig_setmethods__ = {'neighbors': <built-in function SelNBPot_LetterClass_neighbors_set>}
__weakref__ = <attribute '__weakref__' of 'SelNBPot_LetterClass' objects>
list of weak references to the object (if defined)

 
class SelNBPot_LetterClassPtr(SelNBPot_LetterClass)
    
Method resolution order:
SelNBPot_LetterClassPtr
SelNBPot_LetterClass
__builtin__.object

Methods defined here:
__init__(self, this)

Methods inherited from SelNBPot_LetterClass:
__del__(self, destroy=<built-in function delete_SelNBPot_LetterClass>)
__getattr__ lambda self, name
__repr__(self)
__setattr__ lambda self, name, value
aveExp(*args)
aveType(*args)
calcEnergy(*args)
calcEnergyAndDerivs(*args)
cutoffLong(*args)
cutoffShort(*args)
dSwitch(*args)
distances(*args)
groups(*args)
help(*args)
info(*args)
interactionMat(*args)
moveTol(*args)
numRestraints(*args)
rms(*args)
setAveExp(*args)
setAveType(*args)
setCutoffLong(*args)
setCutoffShort(*args)
setDSwitch(*args)
setGroups(*args)
setInteractionMat(*args)
setMoveTol(*args)
setThreshold(*args)
setVerbose(*args)
showViolations(*args)
threshold(*args)
updateNeighborList(*args)
updateValues(*args)
verbose(*args)
violations(*args)

Properties inherited from SelNBPot_LetterClass:
neighbors
get = SelNBPot_LetterClass_neighbors_get(...)
set = SelNBPot_LetterClass_neighbors_set(...)

Data and other attributes inherited from SelNBPot_LetterClass:
CENTER = 0
SUM = 1
__dict__ = <dictproxy object at 0x14e2280>
dictionary for instance variables (if defined)
__swig_getmethods__ = {'neighbors': <built-in function SelNBPot_LetterClass_neighbors_get>}
__swig_setmethods__ = {'neighbors': <built-in function SelNBPot_LetterClass_neighbors_set>}
__weakref__ = <attribute '__weakref__' of 'SelNBPot_LetterClass' objects>
list of weak references to the object (if defined)

 
Functions
       
help(...)