softMax
index

Helper module to compute an approximate maximum (or minimum) coordinate value
in a chosen direction.
 
<string>

The soft max value is given by zsoftMax or zlogSumExp

zsoftMax = iziezi ⁄ γ ⁄ iezi ⁄ γ

The logSumExp expression is

zlogSumExp = γlogiezi ⁄ γ

where the sum is over all chosen atoms, and zi = pqi + ri, p is a unit vector in the direction given by the projection member, qi and ri are the position and radius of atom i, respectively.

[The actual exponential computation is relative to the maximum value - to avoid overflows.]


 
Thus, the soft max is an approximation to the bounds of a collection
of coordinates which is smooth as the identity of the involved atoms
changes. 
 
 
Constructor:
 
   SoftMax(sel,
           gamma=1,
           type="softMax")
        
 
    The first argument is a string or atomSel.AtomSel object
    describing the collection of atoms to describe. The type argument
    is either "softMax" or "logSumExp".
 
Methods:
 
   value()     - Return the soft max value.
 
   hardValue() - Return the hard (actual) maximum value.
 
   selection() - return the sel argument specified in the constructor.
 
   derivs(pref,   - compute a gradient with respect to coordinates given
          derivs)   a constant pref value, and a derivList.DerivList
                    object.
 
Accessors:
 
  gamma      - the softness parameter in the above equation: the larger 
               this value, the softer the function (and the worse the
               approximation is to the hardValue).
  radii      - a vector of radii size len(sel). All radii are 0 by
               default.
  projection - direction in which to compute the maximum - the z
               direction (0,0,1) by default.
  isMinimum  - If True, the minimum value in the given direction is
               computed - by appropriately setting gamma to a negative
               value.
  type       - Specify the soft max expression, "softMax" or "logSumExp".
  
 
 
  
 
 
 
# 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
SoftMax

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

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
derivs(self, *args, **kwargs) -> 'void'
gamma(self, *args, **kwargs) -> 'float_type const'
hardValue(self, *args, **kwargs) -> 'float_type'
isMinimum(self, *args, **kwargs) -> 'bool const'
projection(self, *args, **kwargs) -> 'Vec3 const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
radii(self, *args, **kwargs) -> 'CDSVector< float_type > const'
selection(self, *args, **kwargs) -> 'AtomSel'
setGamma(self, *args, **kwargs) -> 'void'
setIsMinimum(self, *args, **kwargs) -> 'void'
setProjection(self, *args, **kwargs) -> 'void'
setRadii(self, *args, **kwargs) -> 'void'
setType(self, *args, **kwargs) -> 'void'
type(self, *args, **kwargs) -> 'SoftMax::SoftMaxType const'
value(self, *args, **kwargs) -> 'float_type'

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

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:
LOGSUMEXP = 1
SOFTMAX = 0

 
Functions
       
pyXplorHelp(*args) -> 'String'