Path Integral Quantum Monte Carlo
Public Member Functions
SzalewiczPotential Class Reference

Computes the value of the semi-empircal Szalewicz potential that is known to be accurate for He-4. More...

#include <potential.h>

+ Inheritance diagram for SzalewiczPotential:
+ Collaboration diagram for SzalewiczPotential:

Public Member Functions

 SzalewiczPotential (const Container *)
 Constructor. More...
 
 ~SzalewiczPotential ()
 Destructor.
 
double V (const dVec &)
 Return the Szalewicz potential for separation r using a lookup table.
 
dVec gradV (const dVec &)
 Return the gradient of Szalewicz potential for separation r using a lookup table.
 
double grad2V (const dVec &)
 Return the Laplacian of Szalewicz potential for separation r using a lookup table.
 
- 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 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...
 
- Public Member Functions inherited from TabulatedPotential
 TabulatedPotential ()
 Constructor.
 
virtual ~TabulatedPotential ()
 Destructor.
 

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.
 
- Protected Member Functions inherited from TabulatedPotential
void initLookupTable (const double, const double)
 Given a discretization factor and the system size, create and fill the lookup tables for the potential and its derivative.
 
virtual double newtonGregory (const Array< double, 1 > &, const TinyVector< double, 2 > &, const double)
 Use the Newton-Gregory forward difference method to do a 2-point lookup on the potential table. More...
 
virtual double direct (const Array< double, 1 > &, const TinyVector< double, 2 > &, const double)
 Use a direct lookup for the potential table. More...
 
- Protected Attributes inherited from TabulatedPotential
Array< double, 1 > lookupV
 A potential lookup table.
 
Array< double, 1 > lookupdVdr
 A lookup table for dVint/dr.
 
Array< double, 1 > lookupd2Vdr2
 A lookup table for d2Vint/dr2.
 
double dr
 The discretization for the lookup table.
 
int tableLength
 The number of elements in the lookup table.
 
TinyVector< double, 2 > extV
 Extremal value of V.
 
TinyVector< double, 2 > extdVdr
 Extremal value of dV/dr.
 
TinyVector< double, 2 > extd2Vdr2
 Extremal value of d2V/dr2.
 

Detailed Description

Computes the value of the semi-empircal Szalewicz potential that is known to be accurate for He-4.

Definition at line 774 of file potential.h.

Constructor & Destructor Documentation

◆ SzalewiczPotential()

SzalewiczPotential::SzalewiczPotential ( const Container _boxPtr)

Constructor.

Create the Szalewicz interaction potential. We use the standard 1979 values.

See also
PAPER REF.

Definition at line 1625 of file potential.cpp.

1626 {
1627  /* Define all variables for the Szalewicz potential */
1628  // FIXME Fix comments
1629  rm = 2.9262186279335958; // Angstrom (scipy.optimize.minimize())
1630  /* The extremal values are all zero here */
1631  extV = 0.0;
1632  extdVdr = 0.0;
1633  extd2Vdr2 = 0.0;
1634 
1635  /* We take the maximum possible separation */
1636  double L = _boxPtr->maxSep;
1637 
1638  // FIXME Get rid of this stuff or put it somwhere else
1639  /*
1640  double zz = L;
1641  double dr = 1.0e-5;
1642  double zmax = 1000.0;
1643  double tot = int((zmax-L)/dr);
1644  std::vector<double> outv2;
1645  for (int iii = 0; iii < tot; iii++) {
1646  double vv = valueV(zz);
1647  outv2.push_back(vv);
1648  zz += dr;
1649  }
1650 
1651 
1652  std::cout << L << std::endl;
1653  std::cout << outv2.size() << std::endl;
1654  std::ofstream output_file2("./SzalewiczTail2.txt");
1655  //std::ostream_iterator<double> output_iterator2(output_file2, "\n");
1656  //std::copy(outv2.begin(), outv2.end(), output_iterator2);
1657  write_container(outv2,output_file2);
1658  output_file2.close();
1659  exit(0);
1660  */
1661 
1662  /* Create the potential lookup tables */
1663  // initLookupTable(0.00005*rm,L);
1664  initLookupTable((1.0E-6)*rm,L);
1665 
1666  // FIXME fix the tail correction
1667  /* Now we compute the tail correction */
1668  /*
1669  L *= 1.8897261254578281; // Convert L to Bohr
1670  double t1 = 0.0;
1671 
1672  t1 -= exp(-a * L)*((pow(a,2)*Pn[0])+(a*(1+(a*L))*Pn[1])+((2+((a*L)*(2+(a*L))))*Pn[2]))/(pow(a,3));
1673  t1 += exp(-b*L)*L*((2*Qn[0])+(L*Qn[1]))/2;
1674 
1675  double t2 = 0.0;
1676  double eL = eta*L;
1677  for (int n = 3; n < 17; n++){
1678  t2 += exp(- eL) * pow(L,-n) * ((pow(eL,n)*(eL+1)) + (exp(eL)*eL*fn(eL,n)*factorials[n])) * Cn[n]/((n-1)*eta*factorials[n]);
1679  }
1680 
1681  tailV = -t1 - t2;
1682  tailV *= 315774.65;
1683  cout << tailV << endl;
1684  cout << t1*315774.65 << endl;
1685  cout << t2*315774.65 << endl;
1686 
1687  exit(0);
1688  */
1689 }
double maxSep
The maximum possible separation for 2 beads on the same timeslice.
Definition: container.h:37
PotentialBase()
Constructor.
Definition: potential.cpp:25
TabulatedPotential()
Constructor.
Definition: potential.cpp:149
TinyVector< double, 2 > extdVdr
Extremal value of dV/dr.
Definition: potential.h:94
TinyVector< double, 2 > extV
Extremal value of V.
Definition: potential.h:93
void initLookupTable(const double, const double)
Given a discretization factor and the system size, create and fill the lookup tables for the potentia...
Definition: potential.cpp:168
TinyVector< double, 2 > extd2Vdr2
Extremal value of d2V/dr2.
Definition: potential.h:95
+ Here is the call graph for this function:

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