shapePot
index
/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/shapePot.py

Shape Potential term
 
This term includes potential terms to constrain the shape tensor of a
atom selection. The shape tensor is defined as
 
            ( y_i^2+z_i^2  -x_i*y_i      -x_i*z_i     )
            (  -x_i*y_i    x_i^2+z_i^2   -y_i*z_i     )
            (  -x_i*z_i    -y_i*z_i     x_i^2+y_i^2   )
 
where (x_i,y_i,z_i) is the position of atom i relative to the center
of the atom selection. Thus, the shape tensor is analogous to the
inertia tensor: only it contains no mass information.
 
  There are separate potential terms which target the eigen values of
this tensor (which correspond to size), and the eigenvectors of the
tensor, which contain orientational information.
 
Constructor:
  ShapePot(name, sel, sim)   with arguments: 
    name - a name for this potential term
    sel  - (optional) an atomSel.AtomSel. Defaults to all atoms
    sim  - (optional) a simulation.Simulation Object. 
           Defaults to simulation.currentSimulation.
 
 
Methods:
  calcEnergy()                    - calcs energy
  calcEnergyAndDerivs(DerivList)  - calcs energy and derivative info
    note that these routines also update all other potential-specific data.
 
  ensWeigth(index) - return the ensemble weight associated with the
                     specified member.
  setEnsWeights(vals) - use the specified ensemble weights instead of those
                        in the underlying EnsembleSimulation.
Read-Write accessors:
  sizeScale         - scale factor for the size term
  orientScale       - scale factor for the orientation term
  targetSel         - atom selection for target. Used if targetType=='molecule'
  sizeTol           - error in size term. Used if sizePotType=='square'
  orientTol         - error (in degrees) in orient term. 
                      Used if orientPotType=='square'
  targetType        - specifies the target tensor
                        'molecule' : target specified by targetSel
                        'average'  : target is the ensemble average of
                                      the shape tensor.
                        'pairwise' : the pairwise difference of the shape
                                     tensor between each ensemble member is
                                     minimized.
  sizePotType       - potential type for size term: 'harmonic' or 'square'
  orientPotType     - potential type for orient term: 'harmonic' or 'square'
  degenerateTol     - if the difference between eigenvalues drops below this
                      number, eigenvalue/eigenvector pairs are sorted such 
                      that the eigenvector overlap with the target is 
                      maximized, instead of by eigenvalue.
  useSimEnsWeight - whether to use the ensemble wieghts set with setEnsWeights
                    or to use those of the underlying EnsembleSimulation.
 
 
Read-only accessors
  simulation()   - simulation used by this shape term. Is an EnsembleSimulation
  atomSel()      - atom selection defining the shape tensor.
 
  qCenter(index) - center of the atomSelection for ensemble given by index.
  qCenterTarget()- center position of the target selection.
  rotation(index)- rotation angle (in degrees) of shape tensor to target. 
                   The optional argument specifies the ensemble member 
                   (defaults to the current ensemble).
 
  getContrib(index,i)
                 - get EigenPair for ensemble member index, number i.
  getTarget(i)   - get EigenPair target shape tensor. EigenPair
                   objects contain two members:
                     value, vector
 
  info()         - return string synopsis of potential info.
  showValues()   - return pretty-printed eigenvalue info.
  showVectors()  - return pretty-printed eigenvector info.
 
 
The potential term is defined as
 
  E = sizeScale * ( V(ds_x,sizeTol) +
                    V(ds_y,sizeTol) +
                    V(ds_z,sizeTol) ) +
      orientScale * V(dTheta,orienTol)
 
where
  ds_i = eigenValue(i) - target_eigenValue(i)
  dTheta = overall rotation of shapeTensor, relative to target
 
and
  V(x,tol) = x^2             if potType=='harmonic'
             (abs(x)-tol)^2  if potType=='square'
 
 
 
# 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
EnsemblePot
ShapePot_LetterClass
Modified
ModifiedBase
ShapePot
ShapePot_EigenPair
VarEnsWeights
rc_EnsemblePot

 
class EnsemblePot(builtins.object)
    EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
simulation(self, *args) -> 'EnsembleSimulation const *'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

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

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

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

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

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
value

 
vector

 

 
class ShapePot_LetterClass(EnsemblePot)
    ShapePot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
ShapePot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
atomSel(self, *args, **kwargs) -> 'AtomSel'
degenerateTol(self, *args, **kwargs) -> 'float_type const'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
getContrib(self, *args, **kwargs) -> 'ShapePot_EigenPair'
getTarget(self, *args, **kwargs) -> 'ShapePot_EigenPair'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
orientPotType(self, *args, **kwargs) -> 'ShapePot::ShapePotType'
orientScale(self, *args, **kwargs) -> 'float_type const'
orientTol(self, *args, **kwargs) -> 'float_type const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
qCenter(self, *args, **kwargs) -> 'Vec3'
qCenterTarget(self, *args, **kwargs) -> 'Vec3'
rms(self, *args, **kwargs) -> 'float_type'
rotation(self, *args, **kwargs) -> 'double'
setDegenerateTol(self, *args, **kwargs) -> 'void'
setOrientPotType(self, *args, **kwargs) -> 'void'
setOrientScale(self, *args, **kwargs) -> 'void'
setOrientTol(self, *args, **kwargs) -> 'void'
setSizePotType(self, *args, **kwargs) -> 'void'
setSizeScale(self, *args, **kwargs) -> 'void'
setSizeTol(self, *args, **kwargs) -> 'void'
setTargetSel(self, *args, **kwargs) -> 'void'
setTargetType(self, *args, **kwargs) -> 'void'
showValues(self, *args, **kwargs) -> 'String'
showVectors(self, *args, **kwargs) -> 'String'
simulation(self, *args, **kwargs) -> 'EnsembleSimulation *'
sizePotType(self, *args, **kwargs) -> 'ShapePot::ShapePotType'
sizeScale(self, *args, **kwargs) -> 'float_type const'
sizeTol(self, *args, **kwargs) -> 'float_type const'
targetSel(self, *args, **kwargs) -> 'AtomSel const'
targetType(self, *args, **kwargs) -> 'ShapePot::ShapeTargetType'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
contrib

 
cosTheta

 
qc

 
qc_target

 
theta

 
thisown

 
The membership flag
valuesVectors

 

Data and other attributes defined here:
AverageTarget = 1
FixedTarget = 3
HARMONIC = 0
MoleculeTarget = 2
PairwiseTarget = 0
SQUARE = 1

Methods inherited from EnsemblePot:
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

Data descriptors inherited from EnsemblePot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class VarEnsWeights(builtins.object)
    VarEnsWeights(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
mult

 
thisown

 
The membership flag

 
class rc_EnsemblePot(builtins.object)
    rc_EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

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

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

 
realShapePot = class ShapePot(builtins.object)
    realShapePot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'ShapePot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'ShapePot &'
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
atomSel(self, *args, **kwargs) -> 'AtomSel'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
decrRefCnt(self, *args, **kwargs) -> 'void'
degenerateTol(self, *args, **kwargs) -> 'float_type const'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getContrib(self, *args, **kwargs) -> 'ShapePot_EigenPair'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
getTarget(self, *args, **kwargs) -> 'ShapePot_EigenPair'
incrRefCnt(self, *args, **kwargs) -> 'void'
info(self, *args, **kwargs) -> 'String'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
numRestraints(self, *args, **kwargs) -> 'int'
orientPotType(self, *args, **kwargs) -> 'ShapePot::ShapePotType'
orientScale(self, *args, **kwargs) -> 'float_type const'
orientTol(self, *args, **kwargs) -> 'float_type const'
potName(self, *args, **kwargs) -> 'char const *'
pyXplorHelp(self, *args, **kwargs) -> 'String'
qCenter(self, *args, **kwargs) -> 'Vec3'
qCenterTarget(self, *args, **kwargs) -> 'Vec3'
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) -> 'float_type'
rotation(self, *args, **kwargs) -> 'double'
scale(self, *args, **kwargs) -> 'float_type const'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setDegenerateTol(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setOrientPotType(self, *args, **kwargs) -> 'void'
setOrientScale(self, *args, **kwargs) -> 'void'
setOrientTol(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setSizePotType(self, *args, **kwargs) -> 'void'
setSizeScale(self, *args, **kwargs) -> 'void'
setSizeTol(self, *args, **kwargs) -> 'void'
setTargetSel(self, *args, **kwargs) -> 'void'
setTargetType(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
showValues(self, *args, **kwargs) -> 'String'
showVectors(self, *args, **kwargs) -> 'String'
simulation(self, *args, **kwargs) -> 'EnsembleSimulation *'
sizePotType(self, *args, **kwargs) -> 'ShapePot::ShapePotType'
sizeScale(self, *args, **kwargs) -> 'float_type const'
sizeTol(self, *args, **kwargs) -> 'float_type const'
targetSel(self, *args, **kwargs) -> 'AtomSel const'
targetType(self, *args, **kwargs) -> 'ShapePot::ShapeTargetType'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
cosTheta

 
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
qc

 
qc_target

 
registeredSimulations

 
theta

 
thisown

 
The membership flag
valuesVectors

 

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