Path Integral Quantum Monte Carlo
Public Member Functions
HardSpherePotential Class Reference

Computes the effective potential from the exact two-body density matrix for hard spheres in 3D. More...

#include <potential.h>

+ Inheritance diagram for HardSpherePotential:
+ Collaboration diagram for HardSpherePotential:

Public Member Functions

 HardSpherePotential (double)
 Constructor. More...
 
 ~HardSpherePotential ()
 Destructor.
 
virtual double V (const dVec &r)
 The classical potential.
 
double V (const dVec &, const dVec &)
 The effective potential. More...
 
double dVdlambda (const dVec &, const dVec &)
 The derivative of the effective potential with respect to lambda. More...
 
double dVdtau (const dVec &, const dVec &)
 The derivative of the effective potential with respect to tau. More...
 
- Public Member Functions inherited from PotentialBase
 PotentialBase ()
 Constructor.
 
virtual ~PotentialBase ()
 Destructor.
 
virtual dVec gradV (const dVec &)
 The gradient of the potential.
 
virtual double grad2V (const dVec &)
 Grad^2 of the potential.
 
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 effective potential from the exact two-body density matrix for hard spheres in 3D.


See also
: S. Pilati, K. Sakkos, J. Boronat, J. Casulleras, and S. Giorgini, Phys Rev A 74, 043621 (2006).

Definition at line 1032 of file potential.h.

Constructor & Destructor Documentation

◆ HardSpherePotential()

HardSpherePotential::HardSpherePotential ( double  _a)

Constructor.

Parameters
_aThe radius of the hard sphere (also the scattering length)

Definition at line 2053 of file potential.cpp.

2053  :
2054  PotentialBase(),
2055  a(_a) {
2056 
2057 }
PotentialBase()
Constructor.
Definition: potential.cpp:25

Member Function Documentation

◆ dVdlambda()

double HardSpherePotential::dVdlambda ( const dVec sep1,
const dVec sep2 
)
virtual

The derivative of the effective potential with respect to lambda.

Computes the non-local two-body effective pair potential.

Tested and working with Mathematica on 2013-06-12.

Parameters
sep1the first separation
sep2the second separation
Returns
the derivative of the effective potential with respect to lambda

Reimplemented from PotentialBase.

Definition at line 2108 of file potential.cpp.

2109 {
2110 
2111  double r1 = sqrt(dot(sep1,sep1));
2112  double r2 = sqrt(dot(sep2,sep2));
2113 
2114  double cosTheta = dot(sep1,sep2)/(r1*r2);
2115 
2116  double t1 = -(r1*r2 + a*a - a*(r1 + r2)) * (1.0 + cosTheta);
2117  t1 /= (4.0*constants()->lambda()*constants()->tau());
2118 
2119  double t2 = (a*(r1+r2) - a*a)/(r1*r2);
2120  double t3 = 1.0 - t2*exp(t1);
2121 
2122  double t4 = (1.0/t3)*(t2*exp(t1))*(t1/constants()->lambda());
2123 
2124  return -t4;
2125 }
double lambda() const
Get lambda = hbar^2/(2mk_B)
Definition: constants.h:46
double tau() const
Get imaginary time step.
Definition: constants.h:44
ConstantParameters * constants()
Global public access to the constants.
Definition: constants.h:201
+ Here is the call graph for this function:

◆ dVdtau()

double HardSpherePotential::dVdtau ( const dVec sep1,
const dVec sep2 
)
virtual

The derivative of the effective potential with respect to tau.

Computes the non-local two-body effective pair potential.

Tested and working with Mathematica on 2013-06-12.

Parameters
sep1the first separation
sep2the second separation
lambda\lambda = \hbar^2/2m
tauthe imaginary timestep tau
Returns
the derivative of the effective potential with respect to tau

Reimplemented from PotentialBase.

Definition at line 2140 of file potential.cpp.

2141 {
2142 
2143  double r1 = sqrt(dot(sep1,sep1));
2144  double r2 = sqrt(dot(sep2,sep2));
2145 
2146  double cosTheta = dot(sep1,sep2)/(r1*r2);
2147 
2148  double t1 = -(r1*r2 + a*a - a*(r1 + r2)) * (1.0 + cosTheta);
2149  t1 /= (4.0*constants()->lambda()*constants()->tau());
2150 
2151  double t2 = (a*(r1+r2) - a*a)/(r1*r2);
2152  double t3 = 1.0 - t2*exp(t1);
2153 
2154  double t4 = (1.0/t3)*(t2*exp(t1))*(t1/constants()->tau());
2155 
2156  return -t4;
2157 }
+ Here is the call graph for this function:

◆ V()

double HardSpherePotential::V ( const dVec sep1,
const dVec sep2 
)
virtual

The effective potential.

Computes the non-local two-body effective pair potential.

Tested and working with Mathematica on 2013-06-12.

Parameters
sep1The first separation
sep2The second separation
Returns
the two-body effective pair potential

Reimplemented from PotentialBase.

Definition at line 2077 of file potential.cpp.

2078 {
2079 
2080  double r1 = sqrt(dot(sep1,sep1));
2081  double r2 = sqrt(dot(sep2,sep2));
2082 
2083  if ((r1 <= a ) || (r2 <= a))
2084  return LBIG;
2085 
2086  double cosTheta = dot(sep1,sep2)/(r1*r2);
2087 
2088  double t1 = -(r1*r2 + a*a - a*(r1 + r2)) * (1.0 + cosTheta);
2089  t1 /= (4.0*constants()->lambda()*constants()->tau());
2090 
2091  double t2 = (a*(r1+r2) - a*a)/(r1*r2);
2092  double t3 = 1.0 - t2*exp(t1);
2093 
2094  return -log(t3);
2095 }
#define LBIG
The log of a big number.
Definition: common.h:97
+ Here is the call graph for this function:

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