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


 
Potential term restraining atomic positions relative to those in a
similar structure. This term is similar to the (nonstrict) NCS XPLOR
energy term, but there is no need that the equivalent pairs of atoms
have the same atom name, have the same residue name, or even be of the
same number. Additionally, an absolute fit is possible such that
coordinates overlay one another if one specified
setAbsoluteFit(True). 
 
 
Constructor:
 
  It is suggested that this potential term be created using the helper 
  function posSymmPotTools.create_PosSymmPot().
 
 
  PosSymmPot(instanceName,
             simulation    )  - creates a potential term with the given name. 
                                The second argument is optional, and defaults
                                to the current Simulation.
  
Methods:
 
  calcEnergy()                    - calculate and return energy 
  calcEnergyAndDerivs(DerivList)  - calcs energy and derivative info
  
  
  addEquivAtomSelPair(atomSel,
                      atomSel,
                      weights1,
                      weights2)    - specify a pair of atomSel.AtomSels, 
                                     the centroids of which will be restrained
                                     to have the same relative position. The
                                     optional weights arguments can be used to
                                     specify nonuniform weighting used when
                                     computing the centroids from the 
                                     constituent atomic positions.
  equivAtomSelPairs()              - return a list containing the current
                                     set of AtomSel pairs.
  removeEquivAtomSelPair(atomSel1,
                         atomSel2) - remove the specified pair.
 
  addEquivAtoms(string1,
                string2)           - specify sets of atoms whose positions 
                                     will be restrained to have the same
                                     relative position. This form must be 
                                     used for inhomogeneous ensembles.
  rms()                           - returns the best-fit RMSD between the two
                                    selection sets.
  violations()                    - returns 0 if upperBound > rms > lowerBound,
                                    1 otherwise.
 
  individualRMSDs()               - returns a list containg the distances
                                    between each equivalent pair after 
                                    best-fitting
 
  rotMat()                        - returns the rotation matrix which best-
                                    fits the second selection sets to
                                    the first when they are both
                                    translated to the origin.  
 
  centroid(whichOne)              - returns the centroid position of each
                                    selection set, specified by whichOne
                                    (either 0 or 1).
 
  translatedCoords(whichOne)      - returns a sequence of vec3.Vec3s
                                    which represent the positions of the 
                                    specified selection set (by whichOne - 
                                    either 0 or 1).
 
  calcVarTens(whichOne,i)         - return the appropriate VarTensor (a
                                    symmetric matrix, see below) for 
                                    equivalence set i. 
 
  deltaVariance()                 - return the matrix norm of the difference
                                    in variance tensor (see below).
 
  aveCoords(whichOne)             - (ensemble and selection set) averaged
                                    coordinates translated so they're
                                    centered at the origin and fit.
 
  fitCoords(whichOne,i,j,m)       - return centered, rotated atomic coords
                                    in selection set i, ensemble member j,
                                    selection set index m.
 
  getEnsWeight(whichOne,          - return the ensemble weight used for
               memberIndex)         the specified ensemble member.
 
  weight(whichOne,i,j,m)          - return the weight for the atomic position
                                    in selection set i, ensemble member j,
                                    selection set index m.
 
 Read-Write accessors:
  scale           - scale factor for the position/average position term.
  varScale        - scale factor for the delta variance term - only nonzero        
                    for EnsembleSimulations [default: 0].
  lowerBound      - see below. If lowerBound>0, equivalent pairs
                    will be forced apart [default: 0].
  upperBound      - see below. This specifies the rmsd amount the equivalent 
                    pairs are allowed to differ [default: 0].
  absoluteFit     - If True, do not perform rotation and translation before 
                    difference calculation, such that fit regions will lie on 
                    top of each other [default: False].
  planarFit       - If True, use alternate approach for determining
                    translatedCoords and rotMat where only translation
                    perpendicular to vector u is subtracted, and the rotation
                    matrix is only allowed to rotate about u [default: False].
  u               - The plane normal vector [default: Vec3(0,0,1)].
  
 
 the above quantities may be retrieved using the member function form
 quantity(), while they are set using the form setQuantity(value).
 
The potential term is defined as
 
  E = 0.5 * scale() * Ni * (dRMSD^2 +
                            dVarRoot)
 
with
 
          / rmsd - upperBound, if rmsd > upperBound
  dRMSD = | rmsd - lowerBound, if rmsd < lowerBound
          \ 0                , if rmsd < upperBound and rmsd > lowerBound
 
and
 
  rmsd^2 =  1/Ni sum_i |(q_1i-q_1c) - R(q_2i-q_2c)|^2
 
where q_1i and q_2i are the average position of the ith respective
equivalent pair, and the sum is over all pairs, and Ni is the number of
equivalent pairs. R is the rotation matrix which minimizes rmsd2.
 
q_1c and q_2c are the average positions of the equivalent pair
positions, e.g.
 
  q_1c = 1/N1 * sum_i q_1i.
 
For an ensembleSimulation.EnsembleSimulation, 
dVarRoot = varScale * sqrt(deltaVariance) is nonzero with a value, with 
 
deltaVariance = sum_i sum_{a,b} (VarTensor0_i(a,b) - VarTensor1_i(a,b))^2
 
where the i sum is over all equivalent sets and VarTensorNu_i is a variance 
tensor for equivalent set i which measures deviations from the ensemble mean 
position:
 
  VarTensorNu_i(a,b) = < deltaq_i(a) deltaq_i(b) >
 
where deltaq_i is the deviation of coordinate in equivalent set i from its 
ensemble mean, and the average is over all atoms in the equivalence set and
all ensemble members. Note that it is acceptible for there to be no atoms 
present for some ensemble members.
 
Note that this term scales as the number of equivalent pairs.
 
 
 Members - for low-level, internal use only.
 
  A                               - covariance matrix 
                                    sum_i ( deltaqb_0(i) * deltaqb_1^T(i) )
                                    where deltaqb_eta is the ensemble, 
                                    selection set averaged coordinates,       
                                    relative to the appropriate
                                    centroid for selection set i.
 
  ATAMhalf                        - the matrix (A^T * A)^{-1/2}
 
  vectors                         - eigenvectors of the matrix A^T * A
 
  values                          - associated eigenvalues of A^T * A
 
  gamma;                          - a arry containing. +/- 1 / sqrt(values)
                                    The sign is chosen such that the
                                    rotation matrix 
 
                                          R = A U Gamma U^T 
 
                                    does not possess an inversion
                                    (i.e. the determinant= +1)
 
 
 
# 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_Pair_Atom
CDSList_Pair_AtomSel
EnsemblePot
PosSymmPot_LetterClass
Modified
ModifiedBase
Pair_AtomSel
PosSymmPot
VarEnsWeights
rc_EnsemblePot

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

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

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 CDSList_Pair_AtomSel(builtins.object)
    CDSList_Pair_AtomSel(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< Pair< AtomSel,AtomSel > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< Pair< AtomSel,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_Pair_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 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 Pair_AtomSel(builtins.object)
    Pair_AtomSel(*args)
 

 
  Methods defined here:
__eq__(self, *args, **kwargs) -> 'bool'
Return self==value.
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
b

 
thisown

 
The membership flag

Data and other attributes defined here:
__hash__ = None

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

 
 
Method resolution order:
PosSymmPot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
absoluteFit(self, *args, **kwargs) -> 'bool const'
addEquivAtomSelPair(self, *args, **kwargs) -> 'void'
addEquivAtoms(self, *args, **kwargs) -> 'void'
aveCoords(self, *args, **kwargs) -> 'VecVec3'
calcVarTens(self, *args, **kwargs) -> 'SymmMat3'
calcVarTensTerm(self, *args, **kwargs) -> 'SymmMat3'
centroid(self, *args, **kwargs) -> 'Vec3 const'
deltaVariance(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
equivAtomSelPairs(self, *args, **kwargs) -> 'CDSList< Pair< AtomSel,AtomSel > >'
fitCoords(self, *args, **kwargs) -> 'Vec3'
getEnsWeight(self, *args, **kwargs) -> 'float_type'
individualRMSDs(self, *args, **kwargs) -> 'CDSList< float_type >'
lowerBound(self, *args, **kwargs) -> 'float_type const'
numEquivPairs(self, *args, **kwargs) -> 'int'
numRestraints(self, *args, **kwargs) -> 'int'
planarFit(self, *args, **kwargs) -> 'bool const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
removeEquivAtomSelPair(self, *args, **kwargs) -> 'void'
rms(self, *args, **kwargs) -> 'float_type'
rotMat(self, *args, **kwargs) -> 'Mat3'
setAbsoluteFit(self, *args, **kwargs) -> 'void'
setLowerBound(self, *args, **kwargs) -> 'void'
setPlanarFit(self, *args, **kwargs) -> 'void'
setU(self, *args, **kwargs) -> 'void'
setUpperBound(self, *args, **kwargs) -> 'void'
setVarScale(self, *args, **kwargs) -> 'void'
u(self, *args, **kwargs) -> 'Vec3 const'
updateValues(self, *args, **kwargs) -> 'void'
upperBound(self, *args, **kwargs) -> 'float_type const'
varScale(self, *args, **kwargs) -> 'float_type const'
violations(self, *args, **kwargs) -> 'float_type'
weight(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
A

 
ATAMhalf

 
gamma

 
posVarRoot

 
thisown

 
The membership flag
values

 
vectors

 

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'
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'

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

 
realPosSymmPot = class PosSymmPot(builtins.object)
    realPosSymmPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'PosSymmPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'PosSymmPot &'
__repr__ = _swig_repr(self)
absoluteFit(self, *args, **kwargs) -> 'bool const'
addEnsWeights(self, *args, **kwargs) -> 'void'
addEquivAtomSelPair(self, *args, **kwargs) -> 'void'
addEquivAtoms(self, *args, **kwargs) -> 'void'
aveCoords(self, *args, **kwargs) -> 'VecVec3'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcVarTens(self, *args, **kwargs) -> 'SymmMat3'
calcVarTensTerm(self, *args, **kwargs) -> 'SymmMat3'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
centroid(self, *args, **kwargs) -> 'Vec3 const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
decrRefCnt(self, *args, **kwargs) -> 'void'
deltaVariance(self, *args, **kwargs) -> 'float_type'
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'
equivAtomSelPairs(self, *args, **kwargs) -> 'CDSList< Pair< AtomSel,AtomSel > >'
fitCoords(self, *args, **kwargs) -> 'Vec3'
getEnsWeight(self, *args, **kwargs) -> 'float_type'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
incrRefCnt(self, *args, **kwargs) -> 'void'
individualRMSDs(self, *args, **kwargs) -> 'CDSList< float_type >'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
lowerBound(self, *args, **kwargs) -> 'float_type const'
numEquivPairs(self, *args, **kwargs) -> 'int'
numRestraints(self, *args, **kwargs) -> 'int'
planarFit(self, *args, **kwargs) -> 'bool const'
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'
removeEquivAtomSelPair(self, *args, **kwargs) -> 'void'
resetInstanceName(self, *args, **kwargs) -> 'void'
resetPotName(self, *args, **kwargs) -> 'void'
rms(self, *args, **kwargs) -> 'float_type'
rotMat(self, *args, **kwargs) -> 'Mat3'
scale(self, *args, **kwargs) -> 'float_type const'
setAbsoluteFit(self, *args, **kwargs) -> 'void'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setLowerBound(self, *args, **kwargs) -> 'void'
setPlanarFit(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setU(self, *args, **kwargs) -> 'void'
setUpperBound(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
setVarScale(self, *args, **kwargs) -> 'void'
simulation(self, *args) -> 'EnsembleSimulation const *'
threshold(self, *args, **kwargs) -> 'float_type const'
u(self, *args, **kwargs) -> 'Vec3 const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
upperBound(self, *args, **kwargs) -> 'float_type const'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'
varScale(self, *args, **kwargs) -> 'float_type const'
violations(self, *args, **kwargs) -> 'float_type'
weight(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
A

 
ATAMhalf

 
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
posVarRoot

 
registeredSimulations

 
thisown

 
The membership flag
values

 
vectors

 

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