selNBPot
index
/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/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 [0].
  cutoffLong     -   long-range cutoff for interactions between groups.
                     Groups whose average distance is larger than
                     cutoffLong contribute nothing to the energy [10].
  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)
 
 
 
 
 
 
 
 
 
 
# 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_AtomSel
Modified
ModifiedBase
SelNBPot
SelNBPot_LetterClass

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< AtomSel >'
__getslice__(self, *args, **kwargs) -> 'CDSList< AtomSel >'
__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_AtomSel(...)

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

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
aveExp(self, *args, **kwargs) -> 'float_type const'
aveType(self, *args, **kwargs) -> 'SelNBPot::SelNBAveType const'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
cutoffLong(self, *args, **kwargs) -> 'float_type const'
cutoffShort(self, *args, **kwargs) -> 'float_type const'
dSwitch(self, *args, **kwargs) -> 'float_type const'
distances(self, *args, **kwargs) -> 'SymMatrix< float_type > const &'
groups(self, *args, **kwargs) -> 'CDSList< AtomSel > const'
info(self, *args, **kwargs) -> 'String'
interactionMat(self, *args, **kwargs) -> 'SymMatrix< float_type > const'
moveTol(self, *args, **kwargs) -> 'float_type const'
numRestraints(self, *args, **kwargs) -> 'int'
pyXplorHelp(self, *args, **kwargs) -> 'String'
rms(self, *args, **kwargs) -> 'double'
setAveExp(self, *args, **kwargs) -> 'void'
setAveType(self, *args, **kwargs) -> 'void'
setCutoffLong(self, *args, **kwargs) -> 'void'
setCutoffShort(self, *args, **kwargs) -> 'void'
setDSwitch(self, *args, **kwargs) -> 'void'
setGroups(self, *args, **kwargs) -> 'void'
setInteractionMat(self, *args, **kwargs) -> 'void'
setMoveTol(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showViolations(self, *args, **kwargs) -> 'String'
updateNeighborList(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
neighbors

 
thisown

 
The membership flag

Data and other attributes defined here:
CENTER = 0
SUM = 1

 
realSelNBPot = class SelNBPot(builtins.object)
    realSelNBPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'SelNBPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'SelNBPot &'
__repr__ = _swig_repr(self)
aveExp(self, *args, **kwargs) -> 'float_type const'
aveType(self, *args, **kwargs) -> 'SelNBPot::SelNBAveType const'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
cutoffLong(self, *args, **kwargs) -> 'float_type const'
cutoffShort(self, *args, **kwargs) -> 'float_type const'
dSwitch(self, *args, **kwargs) -> 'float_type const'
decrRefCnt(self, *args, **kwargs) -> 'void'
distances(self, *args, **kwargs) -> 'SymMatrix< float_type > const &'
groups(self, *args, **kwargs) -> 'CDSList< AtomSel > const'
incrRefCnt(self, *args, **kwargs) -> 'void'
info(self, *args, **kwargs) -> 'String'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
interactionMat(self, *args, **kwargs) -> 'SymMatrix< float_type > const'
moveTol(self, *args, **kwargs) -> 'float_type const'
numRestraints(self, *args, **kwargs) -> 'int'
potName(self, *args, **kwargs) -> 'char const *'
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'
rms(self, *args, **kwargs) -> 'double'
scale(self, *args, **kwargs) -> 'float_type const'
setAveExp(self, *args, **kwargs) -> 'void'
setAveType(self, *args, **kwargs) -> 'void'
setCutoffLong(self, *args, **kwargs) -> 'void'
setCutoffShort(self, *args, **kwargs) -> 'void'
setDSwitch(self, *args, **kwargs) -> 'void'
setGroups(self, *args, **kwargs) -> 'void'
setInteractionMat(self, *args, **kwargs) -> 'void'
setMoveTol(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showViolations(self, *args, **kwargs) -> 'String'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateNeighborList(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

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

 
neighbors

 
registeredSimulations

 
thisown

 
The membership flag

 
Functions
       
SelNBPot(*args)
pyXplorHelp(*args) -> 'String'