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


 
Class to generate a pairwise distance distribution and the associated
gradients with respect to atomic coordinates.
 
Constructor:
  PairDist(rVals,     
           atomSel1,
           atomSel2,
           weights1,
           weights2,
           probWidth=0.5,
           probType="quartic",
           calcGradient=False)
 
   rVals -  an array containing a uniform grid of distance values
   atomSel1, atomSel2 -  atomSel.AtomSel objects containing the atoms
                         whose positions are sed to generate the distance
                         distribution.
   weights1, weights2 - arrays specifying weights for atoms in atomSel1 and
                        and atomSel2, repsectively.
   probWidth          - the width of the probability distribution contribution
                        from a single pair of atoms.
   probType           - a string describing the type of probability
                        distribution. Currently, only "quartic" is accepted.
   calcGradient       - specifies whether the gradient is calculated.
 
Members:
 
Accessors:
 
  weights1()
  weights2()   - return weights specified in the constructor.
 
  probWidth    - probWidth, as specified in the constructor.
  probType     - as specified in the constructor.
  calcGradient - a specified in the constructor.
  calcWeightDerivs - calculate derivative of Pr with respect to weights1
                     and weights2, If True, the values are stored in the
                     members d_dw1 and d_dw2, respectively. These are two-
                     dimensional arrays with the first dimension denoting
                     the atom specified in the respective atomSel, and
                     the second specifying bin number.
  normalize    - by default, the probability distribution is normalized by
                 the product of the sums of the two weights arrays. Set
                 normalize to False to disable this normalization.
 
Methods:
 
 updateValues() - force a recalculation of the P(r) (and gradient, if the
                  current value of calcGradient is True).
  
 Pr() - return an array containing the pairwise distance distribution the
        distance at the center of each bin corresponding to the associated
        value of rVals.
 
  Computed as <rst>
 
    :math:`Pr(r) = 1/N \sum_{i,j} w_i w_j Pr_{i,j} ( |q_i-q_j| - r )`
 
  </rst>
  where the sum is over two sets of atoms with positions q_i and q_j, and
  associated weights w_i and w_j.
 
                    /   N_P (r^2 - r_c^2)^2 , for r<r_c
     Pr_{i,j}(r) = | 
                    \    0                  , for r>=r_c
 
  where r_c is the probWidth member, and N_P = 105/ (32 * \pi * r_c^7)
 
  <rst>
  The value :math:`N = 1/\delta r/\sum_iw_i/\sum_jw_j`, where :math:`\delta r`
  is the grid spacing of rVals, unless normalize=False, in which case
  :math:`N=1/\delta r`.
  </rst>
 
 getGradient(binNum) - return a list of (index,Vec3) pairs specifying all of
                       the gradient contributions to binNum of the distance
                       distribution.
 
 
 
 
 
# 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_IntVec3Pair
CDSVector_Vector_float
CDSVector_float_type
PairDist

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

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

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

 
  Methods defined here:
__add__(self, *args) -> 'CDSVector< CDSVector< double > >'
__getitem__(self, *args, **kwargs)
__getslice__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__iadd__(self, *args) -> 'CDSVector< CDSVector< double > >'
__imul__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__isub__(self, *args) -> 'CDSVector< CDSVector< double > >'
__itruediv__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__len__(self, *args, **kwargs) -> 'int'
__mul__(self, *args) -> 'CDSVector< CDSVector< double > >'
__neg__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__pow__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__radd__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__repr__ = _swig_repr(self)
__rmul__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__rsub__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__rtruediv__(self, *args, **kwargs) -> 'CDSVector< CDSVector< double > >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args) -> 'CDSVector< CDSVector< double > >'
__truediv__(self, *args) -> 'CDSVector< CDSVector< double > >'
fromList(s, l)
get(self, *args, **kwargs) -> 'CDSVector< double >'
help(self, *args, **kwargs) -> 'String'
resize(self, *args, **kwargs) -> 'void'
scale(self, *args, **kwargs) -> 'void'
set(self, *args, **kwargs) -> 'void'

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

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

 
  Methods defined here:
__add__(self, *args) -> 'CDSVector< double >'
__getitem__(self, *args, **kwargs)
__getslice__(self, *args, **kwargs) -> 'CDSVector< double >'
__iadd__(self, *args) -> 'CDSVector< double >'
__imul__(self, *args, **kwargs) -> 'CDSVector< double >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__isub__(self, *args) -> 'CDSVector< double >'
__itruediv__(self, *args, **kwargs) -> 'CDSVector< double >'
__len__(self, *args, **kwargs) -> 'int'
__mul__(self, *args) -> 'CDSVector< double >'
__neg__(self, *args, **kwargs) -> 'CDSVector< double >'
__pow__(self, *args, **kwargs) -> 'CDSVector< double >'
__radd__(self, *args, **kwargs) -> 'CDSVector< double >'
__repr__ = _swig_repr(self)
__rmul__(self, *args, **kwargs) -> 'CDSVector< double >'
__rsub__(self, *args, **kwargs) -> 'CDSVector< double >'
__rtruediv__(self, *args, **kwargs) -> 'CDSVector< double >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args) -> 'CDSVector< double >'
__truediv__(self, *args) -> 'CDSVector< double >'
fromList(s, l)
get(self, *args, **kwargs) -> 'double'
help(self, *args, **kwargs) -> 'String'
resize(self, *args, **kwargs) -> 'void'
scale(self, *args, **kwargs) -> 'void'
set(self, *args, **kwargs) -> 'void'

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

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

 
  Methods defined here:
Pr(self, *args, **kwargs) -> 'CDSVector< float_type >'
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
calcGradient(self, *args, **kwargs) -> 'bool const'
calcWeightDerivs(self, *args, **kwargs) -> 'bool const'
getGradient(self, *args, **kwargs) -> 'CDSList< Pair< int,Vec3 > >'
normalize(self, *args, **kwargs) -> 'bool const'
probType(self, *args, **kwargs) -> 'String const'
probWidth(self, *args, **kwargs) -> 'float_type const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
setCalcGradient(self, *args, **kwargs) -> 'void'
setCalcWeightDerivs(self, *args, **kwargs) -> 'void'
setNormalize(self, *args, **kwargs) -> 'void'
setProbType(self, *args, **kwargs) -> 'void'
setProbWidth(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
weights1(self)
weights2(self)

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
atomSel2

 
d_dw1

 
d_dw2

 
gradient

 
pairDist

 
rVals

 
thisown

 
The membership flag
weight1

 
weight2

 

 
Functions
       
cat(*args) -> 'CDSVector< CDSVector< double > >'
cat3(*args) -> 'CDSVector< CDSVector< double > >'
cat4(*args) -> 'CDSVector< CDSVector< double > >'
max(*args) -> 'CDSVector< double >'
min(*args) -> 'CDSVector< double >'
pyXplorHelp(*args) -> 'String'
sum(*args) -> 'CDSVector< double >'