MADNESS  0.10.1
Public Member Functions | Private Attributes | List of all members
MolecularVolumeExponentialSwitch Class Reference

Switches between positive values Vint and Vext with special log derivative. More...

#include <molecularmask.h>

Inheritance diagram for MolecularVolumeExponentialSwitch:
Inheritance graph
[legend]
Collaboration diagram for MolecularVolumeExponentialSwitch:
Collaboration graph
[legend]

Public Member Functions

 MolecularVolumeExponentialSwitch (double sigma, double Vint, double Vext, const std::vector< double > atomic_radii, const std::vector< madness::coord_3d > atomic_coords)
 
virtual double operator() (const madness::coord_3d &r) const
 
std::vector< madness::Vector< double, 3 > > special_points () const
 Override this to return list of special points to be refined more deeply. More...
 
- Public Member Functions inherited from madness::FunctionFunctorInterface< double, 3 >
 FunctionFunctorInterface ()
 
virtual ~FunctionFunctorInterface ()
 
virtual coeffT coeff (const keyT &) const
 
virtual void operator() (const Vector< double *, 1 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 2 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 3 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 4 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 5 > &xvals, double *fvals, int npts) const
 
virtual void operator() (const Vector< double *, 6 > &xvals, double *fvals, int npts) const
 
virtual double operator() (const Vector< double, NDIM > &x) const=0
 You should implement this to return f(x) More...
 
virtual bool provides_coeff () const
 does this functor directly provide sum coefficients? or only function values? More...
 
virtual bool screened (const Vector< double, NDIM > &c1, const Vector< double, NDIM > &c2) const
 Can we screen this function based on the bounding box information? More...
 
void set_length_scale (double lo)
 adapt the special level to resolve the smallest length scale More...
 
virtual Level special_level ()
 Override this change level refinement for special points (default is 6) More...
 
virtual bool supports_vectorized () const
 Does the interface support a vectorized operator()? More...
 
virtual coeffT values (const keyT &key, const Tensor< double > &tensor) const
 

Private Attributes

const MolecularVolumeComplementMask cmask
 
const double fac
 
const double Vext
 
const double Vint
 

Additional Inherited Members

- Public Types inherited from madness::FunctionFunctorInterface< double, 3 >
typedef GenTensor< double > coeffT
 
typedef Key< NDIMkeyT
 
typedef double value_type
 
- Public Attributes inherited from madness::FunctionFunctorInterface< double, 3 >
Level special_level_
 

Detailed Description

Switches between positive values Vint and Vext with special log derivative.

Switches between positive values Vint on the interior and Vext on the interior. It has value

\[ V_(r,\sigma) = \exp \left( \log V_{int} C(r,\sigma) + \log V_{ext} (1 - C(r,\sigma) \right) = V_{ext} \exp \left( \log \frac{V_{int}}{V_{ext}} C(r,\sigma) \right) = V_{int} \exp \left( \log \frac{V_{ext}}{V_{int}} \overline{C}(r,\sigma) \right) \]

where $ C(r,\sigma) $ is the regular volume mask provided by MolecularVolumeMask, and $ \overline{C} $ is its complement. Its log-derivative is precisely located in the surface with value

\[ \nabla \log V = \frac{\nabla V}{V} = \log \frac{V_{int}}{V_{ext}} \nabla C \]

with $ \nabla C $ already being computed by MolecularVolumeMaskGrad. The advantage of this is that if $ \| V_{ext} - V_{int} \| $ is big, the log derivative of the regular volume mask ( $ C $) is displaced from the surface (perhaps by multiple values of $ \sigma $). This leads to slow convergence w.r.t $ \sigma $ and potential inaccuracies depending how the numerical representation is computed. The surface charge in dielectric problems is controlled by $ \nabla \log \epsilon $ and hence the dielectric should employ this form of the switch.

Constructor & Destructor Documentation

◆ MolecularVolumeExponentialSwitch()

MolecularVolumeExponentialSwitch::MolecularVolumeExponentialSwitch ( double  sigma,
double  Vint,
double  Vext,
const std::vector< double >  atomic_radii,
const std::vector< madness::coord_3d atomic_coords 
)
inline

References Vext, and Vint.

Member Function Documentation

◆ operator()()

virtual double MolecularVolumeExponentialSwitch::operator() ( const madness::coord_3d r) const
inlinevirtual

References c, cmask, fac, Vext, and Vint.

◆ special_points()

std::vector< madness::Vector<double,3> > MolecularVolumeExponentialSwitch::special_points ( ) const
inlinevirtual

Override this to return list of special points to be refined more deeply.

Reimplemented from madness::FunctionFunctorInterface< double, 3 >.

References cmask, and MolecularVolumeComplementMask::special_points().

Member Data Documentation

◆ cmask

const MolecularVolumeComplementMask MolecularVolumeExponentialSwitch::cmask
private

Referenced by operator()(), and special_points().

◆ fac

const double MolecularVolumeExponentialSwitch::fac
private

Referenced by operator()().

◆ Vext

const double MolecularVolumeExponentialSwitch::Vext
private

◆ Vint

const double MolecularVolumeExponentialSwitch::Vint
private

The documentation for this class was generated from the following file: