Path Integral Quantum Monte Carlo
Public Member Functions
HardRodPotential Class Reference

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

#include <potential.h>

+ Inheritance diagram for HardRodPotential:
+ Collaboration diagram for HardRodPotential:

Public Member Functions

 HardRodPotential (double)
 Constructor. More...
 
 ~HardRodPotential ()
 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 rods in 1D.


Definition at line 1102 of file potential.h.

Constructor & Destructor Documentation

◆ HardRodPotential()

HardRodPotential::HardRodPotential ( double  _a)

Constructor.

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

Definition at line 2367 of file potential.cpp.

2367  :
2368  PotentialBase(),
2369  a(_a) {
2370 
2371 }
PotentialBase()
Constructor.
Definition: potential.cpp:25

Member Function Documentation

◆ dVdlambda()

double HardRodPotential::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-17.

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

Reimplemented from PotentialBase.

Definition at line 2426 of file potential.cpp.

2427 {
2428 
2429  double r1 = sqrt(dot(sep1,sep1));
2430  double r2 = sqrt(dot(sep2,sep2));
2431  double d1 = deltaSeparation(r1,a);
2432  double d2 = deltaSeparation(r2,a);
2433 
2434  double t1 = d1*d2;
2435  double t2 = t1/(2.0*constants()->lambda()*constants()->lambda()*constants()->tau());
2436 
2437  return ((0.5*t1/(exp(t2)-1.0))/(constants()->lambda()*constants()->lambda()*constants()->tau()));
2438 }
double lambda() const
Get lambda = hbar^2/(2mk_B)
Definition: constants.h:46
double tau() const
Get imaginary time step.
Definition: constants.h:44
double deltaSeparation(double sep1, double sep2) const
Return the minimum image difference for 1D separations.
Definition: potential.cpp:119
ConstantParameters * constants()
Global public access to the constants.
Definition: constants.h:201
+ Here is the call graph for this function:

◆ dVdtau()

double HardRodPotential::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-17.

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

Reimplemented from PotentialBase.

Definition at line 2451 of file potential.cpp.

2452 {
2453 
2454  double r1 = sqrt(dot(sep1,sep1));
2455  double r2 = sqrt(dot(sep2,sep2));
2456  double d1 = deltaSeparation(r1,a);
2457  double d2 = deltaSeparation(r2,a);
2458 
2459  double t1 = d1*d2;
2460  double t2 = t1/(2.0*constants()->lambda()*constants()->tau());
2461 
2462  return ((0.5*t1/(exp(t2)-1.0))/(constants()->lambda()*constants()->tau()*constants()->tau()));
2463 }
+ Here is the call graph for this function:

◆ V()

double HardRodPotential::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-17.

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

Reimplemented from PotentialBase.

Definition at line 2391 of file potential.cpp.

2392 {
2393  double r1 = sqrt(dot(sep1,sep1));
2394  double r2 = sqrt(dot(sep2,sep2));
2395 
2396  /* We need to enforce the distinguishable particle constraint at short
2397  * imaginary times */
2398  /* if ( (sep1[0]*sep2[0] < 0.0) || (r1 <= a ) || (r2 <= a) ) */
2399  /* return LBIG; */
2400 
2401  if ( (r1 <= a ) || (r2 <= a) )
2402  return LBIG;
2403 
2404  double d1 = deltaSeparation(r1,a);
2405  double d2 = deltaSeparation(r2,a);
2406 
2407  double t1 = -d1*d2/(2.0*constants()->lambda()*constants()->tau());
2408 
2409  /* communicate()->file("debug")->stream() << sep1[0] << "\t" << sep2[0] << "\t" */
2410  /* << -log(1.0-exp(t1)) << endl; */
2411 
2412  return (-log(1.0 - exp(t1)));
2413 }
#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: