Path Integral Quantum Monte Carlo
Public Member Functions
DeltaPotential Class Reference

Computes the potential energy for delta function interaction potential, approximated here as the limit of a Cauchy distribution. More...

#include <potential.h>

+ Inheritance diagram for DeltaPotential:
+ Collaboration diagram for DeltaPotential:

Public Member Functions

 DeltaPotential (double, double)
 Constructor. More...
 
 ~DeltaPotential ()
 Destructor.
 
double V (const dVec &r)
 Return the delta function potential with strength g approximated as the limit of a Gaussian distribution. More...
 
dVec gradV (const dVec &r)
 Return the gradient of the delta function potential with strength g approximated as the limit of a Gaussian distribution. More...
 
- Public Member Functions inherited from PotentialBase
 PotentialBase ()
 Constructor.
 
virtual ~PotentialBase ()
 Destructor.
 
virtual double V (const dVec &, const dVec &)
 The effective potential for the pair product approximation.
 
virtual double grad2V (const dVec &)
 Grad^2 of the potential.
 
virtual double dVdlambda (const dVec &, const dVec &)
 The derivative of the effective potential with respect to lambda and tau.
 
virtual double dVdtau (const dVec &, const dVec &)
 
virtual Array< dVec, 1 > initialConfig (const Container *, MTRand &, const int)
 Default Initial configuration of particles. More...
 
void output (const double)
 A debug method that output's the potential to a supplied separation. More...
 
virtual Array< double, 1 > getExcLen ()
 Array to hold data elements. More...
 

Additional Inherited Members

- Data Fields inherited from PotentialBase
double tailV
 Tail correction factor.
 
- Protected Member Functions inherited from PotentialBase
double deltaSeparation (double sep1, double sep2) const
 Return the minimum image difference for 1D separations.
 

Detailed Description

Computes the potential energy for delta function interaction potential, approximated here as the limit of a Cauchy distribution.

NB: Need to add an explanation to compare with the previous version of the Gaussian.

Definition at line 239 of file potential.h.

Constructor & Destructor Documentation

◆ DeltaPotential()

DeltaPotential::DeltaPotential ( double  _sigma,
double  _g 
)

Constructor.

Setup the delta function strength and normalization constant.

Parameters
_sigmaThe width of the Gaussian
_gThe integrated strength of the Gaussian in 1D

Definition at line 387 of file potential.cpp.

387  : PotentialBase()
388 {
389  /* Define the parameters of the delta function potential. */
390  norm = _g/sqrt(2.0*_sigma*_sigma*M_PI);
391  inv2sigma2 = 1.0/(2.0*_sigma*_sigma);
392 }
PotentialBase()
Constructor.
Definition: potential.cpp:25

Member Function Documentation

◆ gradV()

dVec DeltaPotential::gradV ( const dVec r)
inlinevirtual

Return the gradient of the delta function potential with strength g approximated as the limit of a Gaussian distribution.

Tested and working in Mathematica.

Reimplemented from PotentialBase.

Definition at line 258 of file potential.h.

258  {
259  return (-2.0*r*norm*inv2sigma2*exp(-dot(r,r)*inv2sigma2));
260  }

◆ V()

double DeltaPotential::V ( const dVec r)
inlinevirtual

Return the delta function potential with strength g approximated as the limit of a Gaussian distribution.

Tested and working in Mathematica.

Reimplemented from PotentialBase.

Definition at line 249 of file potential.h.

249  {
250  return (norm*exp(-dot(r,r)*inv2sigma2));
251  }

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