Python: module pairDist
 
pairDist
index


 
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/set weights. If normalize==True, setWeights1/2 will
                 normalize input weights.
  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  <string>

Pr(r) = 1 ⁄ Ni, jwiwjPri, j(|qi − qj| − r)

where the sum is over two sets of atoms with positions qi and qj, and associated weights wi and wj.


 
                    /   N_P (r^2 - r_c^2)^2 , for r<r_c
     Pr_{i,j}(r) = | 
                    \    0                  , for r>=r_c
 
   <string>

where rc is the probWidth member value, and NP = 105 ⁄ (32πr7c)

The value N = 1 ⁄ (Δriwijwj), where Δr is the grid spacing of rVals, unless normalize=False, in which case N = 1 ⁄ Δr.


 
 getGradient(binNum) - return a list of (index,Vec3) pairs specifying all of
                       the gradient contributions to binNum of the distance
                       distribution.
 
 removeAtoms1(sel) - remove the atoms from the PairDist - specified by an 
 removeAtoms2(sel)   atomSel.AtomSel argument, along the the associated 
                     weight(s).
 
 
 
# 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
CDSVectorBase_Vector_float_long
CDSVector_Vector_float_0_long_int
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 CDSVectorBase_Vector_float_long(builtins.object)
    CDSVectorBase_Vector_float_long(*args)
 

 
  Methods defined here:
__call__(self, *args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
Call self as a function.
__iadd__(self, *args) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__isub__(self, *args) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
__repr__ = _swig_repr(self)
copy(self, *args) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
count(self, *args, **kwargs) -> 'int'
data(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
loadRawArray(self, *args, **kwargs) -> 'void'
pointer(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > *'
remove(self, *args, **kwargs) -> 'void'
resize(self, *args, **kwargs) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
set(self, *args, **kwargs) -> 'void'
setAlloc(self, *args, **kwargs) -> 'void'
size(self, *args, **kwargs) -> 'long'
splitRep(self, *args, **kwargs) -> 'void'

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

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

 
CDSVector_Vector_float = class CDSVector_Vector_float_0_long_int(CDSVectorBase_Vector_float_long)
    CDSVector_Vector_float(*args)
 

 
 
Method resolution order:
CDSVector_Vector_float_0_long_int
CDSVectorBase_Vector_float_long
builtins.object

Methods defined here:
__add__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__call__(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
Call self as a function.
__getitem__(self, *args, **kwargs)
__getslice__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__iadd__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__imul__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__isub__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__itruediv__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__len__(self, *args, **kwargs) -> 'long'
__mul__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__neg__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__pow__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__radd__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__repr__ = _swig_repr(self)
__rmul__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__rsub__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__rtruediv__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__truediv__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
append(self, *args, **kwargs) -> 'void'
fromList(s, l)
get(self, *args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int >'
help(self, *args, **kwargs) -> 'String'
offset(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'

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

Data descriptors defined here:
thisown

 
The membership flag

Methods inherited from CDSVectorBase_Vector_float_long:
copy(self, *args) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
count(self, *args, **kwargs) -> 'int'
data(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
loadRawArray(self, *args, **kwargs) -> 'void'
pointer(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > *'
remove(self, *args, **kwargs) -> 'void'
resize(self, *args, **kwargs) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
set(self, *args, **kwargs) -> 'void'
setAlloc(self, *args, **kwargs) -> 'void'
size(self, *args, **kwargs) -> 'long'
splitRep(self, *args, **kwargs) -> 'void'

Data descriptors inherited from CDSVectorBase_Vector_float_long:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class CDSVector_Vector_float_0_long_int(CDSVectorBase_Vector_float_long)
    CDSVector_Vector_float_0_long_int(*args)
 

 
 
Method resolution order:
CDSVector_Vector_float_0_long_int
CDSVectorBase_Vector_float_long
builtins.object

Methods defined here:
__add__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__call__(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
Call self as a function.
__getitem__(self, *args, **kwargs)
__getslice__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__iadd__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__imul__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__isub__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__itruediv__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__len__(self, *args, **kwargs) -> 'long'
__mul__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__neg__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__pow__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__radd__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__repr__ = _swig_repr(self)
__rmul__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__rsub__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__rtruediv__(self, *args, **kwargs) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__setitem__(self, *args, **kwargs) -> 'void'
__str__(self, *args, **kwargs) -> 'String'
Return str(self).
__sub__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
__truediv__(self, *args) -> 'CDSVector< Vector_float,0,CDS::DefaultAlloc,long,int >'
append(self, *args, **kwargs) -> 'void'
fromList(s, l)
get(self, *args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int >'
help(self, *args, **kwargs) -> 'String'
offset(self, *args, **kwargs) -> 'int'
scale(self, *args, **kwargs) -> 'void'

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

Data descriptors defined here:
thisown

 
The membership flag

Methods inherited from CDSVectorBase_Vector_float_long:
copy(self, *args) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
count(self, *args, **kwargs) -> 'int'
data(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > const &'
loadRawArray(self, *args, **kwargs) -> 'void'
pointer(self, *args) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int > *'
remove(self, *args, **kwargs) -> 'void'
resize(self, *args, **kwargs) -> 'CDSVectorBase< CDSVector< double,0,CDS::DefaultAlloc,long,int >,CDS::DefaultAlloc,long > &'
set(self, *args, **kwargs) -> 'void'
setAlloc(self, *args, **kwargs) -> 'void'
size(self, *args, **kwargs) -> 'long'
splitRep(self, *args, **kwargs) -> 'void'

Data descriptors inherited from CDSVectorBase_Vector_float_long:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
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'
removeAtoms1(self, *args, **kwargs) -> 'void'
removeAtoms2(self, *args, **kwargs) -> 'void'
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'
setWeights1(self, *args, **kwargs) -> 'void'
setWeights2(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
weights1(self, *args, **kwargs) -> 'CDSVector< float_type >'
weights2(self, *args, **kwargs) -> 'CDSVector< float_type >'

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

 
Functions
       
cat(*args, **kwargs) -> 'CDSVector< CDSVector< double,0,CDS::DefaultAlloc,long,int >,0,CDS::DefaultAlloc,long,int >'
cat3(*args, **kwargs) -> 'CDSVector< CDSVector< double,0,CDS::DefaultAlloc,long,int >,0,CDS::DefaultAlloc,long,int >'
cat4(*args, **kwargs) -> 'CDSVector< CDSVector< double,0,CDS::DefaultAlloc,long,int >,0,CDS::DefaultAlloc,long,int >'
max(*args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int >'
min(*args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int >'
pyXplorHelp(*args) -> 'String'
sum(*args, **kwargs) -> 'CDSVector< double,0,CDS::DefaultAlloc,long,int >'

 
Data
        __CDSVector_hh__ = 1