Path Integral Quantum Monte Carlo
|
A base class to be inherited by actions that are local in imaginary time. More...
#include <action.h>
Public Member Functions | |
LocalAction (const Path &, LookupTable &, PotentialBase *, PotentialBase *, WaveFunctionBase *, const TinyVector< double, 2 > &, const TinyVector< double, 2 > &, bool _local=true, string _name="Local", double _endFactor=1.0, int _period=1) | |
Setup the path data members and local action factors. | |
virtual | ~LocalAction () |
Empty base constructor. | |
double | potentialAction () |
Return the potential action for all time slices and all particles. More... | |
double | potentialAction (const beadLocator &) |
Return the potential action for a single bead indexed with beadIndex. More... | |
double | barePotentialAction (const beadLocator &) |
Return the bare potential action for a single bead indexed with beadIndex. More... | |
double | potentialActionCorrection (const beadLocator &) |
Return the potential action correction for a single bead. More... | |
double | potentialActionCorrection (const beadLocator &, const beadLocator &) |
Return the potential action correction for a path. More... | |
double | derivPotentialActionTau (int) |
The derivative of the potential action wrt tau on all links starting on slice. More... | |
double | derivPotentialActionLambda (int) |
The derivative of the potential action wrt lambda for all links starting on slice. More... | |
double | secondderivPotentialActionTau (int) |
The second derivative of the potential action wrt tau on all links starting on slice. More... | |
double | derivPotentialActionTau (int, double) |
The derivative of the potential action wrt tau on all links starting on slice within a cutoff radius. More... | |
double | derivPotentialActionLambda (int, double) |
The derivative of the potential action wrt lambda for all links starting on slice within a cutoff radius. More... | |
virtual dVec | gradPotentialAction (int slice) |
double | rDOTgradUterm1 (int) |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position. More... | |
double | rDOTgradUterm2 (int) |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position. More... | |
virtual double | deltaDOTgradUterm1 (int slice) |
virtual double | deltaDOTgradUterm2 (int slice) |
virtual double | virKinCorr (int slice) |
virtual TinyVector< double, 2 > | potential (int slice) |
virtual double | potential (int slice, double maxR) |
Public Member Functions inherited from ActionBase | |
ActionBase (const Path &, LookupTable &, PotentialBase *, PotentialBase *, WaveFunctionBase *, bool _local=true, string _name="Base", double _endFactor=1.0, int _period=1) | |
Setup the path data members and canonical re-weighting factors. | |
virtual | ~ActionBase () |
Empty base constructor. | |
string | getActionName () |
Returns the action name. | |
double | kineticAction () |
The full kinetic Action More... | |
double | kineticAction (const beadLocator &) |
The kinetic Action at a single slice More... | |
double | kineticAction (const beadLocator &, int wlLength) |
The kinetic Action for wlLength slices. More... | |
virtual double | potentialAction (const beadLocator &, const beadLocator &) |
Return the potential action for a path. More... | |
void | setShift (int _shift) |
The public method that sets the tau scaling factor. | |
int | getShift () |
Get the tau scaling factor. | |
double | rho0 (const dVec &, const dVec &, int) |
The free-particle density matrix. More... | |
double | rho0 (const beadLocator &, const beadLocator &, int) |
The free-particle density matrix for two beadLocators with imaginary time separation M. | |
double | rho0 (const dVec &, const int) |
The free-particle density matrix for a given spatial and temporal separation. More... | |
double | ensembleWeight (const int) |
The ensemble particle number weighting factor. More... | |
Protected Member Functions | |
double | V (const beadLocator &) |
Returns the total value of the potential energy, including both the external potential, and that due to interactions for a single bead. | |
double | V (const int, const double) |
Returns the total value of the potential energy, including both the external potential, and that due to interactions for all particles in a single time slice within a certain cuttoff radius of the center of a cylinder. More... | |
TinyVector< double, 2 > | V (const int) |
Returns the external and interaction potential energy, for all particles on a single time slice. More... | |
double | gradVSquared (const beadLocator &) |
Return the gradient of the full potential squared for a single bead. More... | |
double | gradVSquared (const int) |
Return the gradient of the full potential squared for all beads at a single time slice. More... | |
double | gradVSquared (const int, const double) |
Return the gradient of the full potential squared for all beads at a single time slice restricted inside some cut-off radius. More... | |
double | Vnn (const beadLocator &) |
Returns the total value of the potential energy, including both the external potential, and that due to interactions for a single bead with all interactions confined to a single time slice using a nearest neighbor grid lookup table. | |
double | Vnn (const int) |
Returns the total value of the potential energy, including both the external potential, and that due to interactions for all particles in a single time slice using a lookup table which only considers particles within a sphere of some cutoff radius. | |
double | bareUnn (const beadLocator &, const beadLocator &) |
double | gradVnnSquared (const beadLocator &) |
Return the gradient of the full potential squared for a single bead. More... | |
dVec | gradientV (const int) |
Return the gradient of the full potential for all beads at a single time slice. More... | |
dMat | tMatrix (const int) |
Returns the T-matrix needed to compute gradU. More... | |
double | RdotgradUterm1 (const int) |
double | RdotgradUterm2 (const int) |
double | deltadotgradUterm1 (const int) |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position minus the center of mass of the WL that it belongs to. More... | |
double | deltadotgradUterm2 (const int) |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position minus the center of mass of the WL that it belongs to. More... | |
double | virialKinCorrection (const int) |
Returns the value of the virial kinetic energy correction term. More... | |
dVec | gradU (const int) |
Returns the value of the gradient of the potential action for all beads at a given time slice. More... | |
Protected Member Functions inherited from ActionBase | |
double | tau () |
The local shifted value of tau. | |
void | updateSepHist (const dVec &) |
Update the separation histogram. More... | |
Protected Attributes | |
int | eo |
Is a slice even or odd? | |
TinyVector< double, 2 > | VFactor |
The even/odd slice potential factor. | |
TinyVector< double, 2 > | gradVFactor |
The even/odd slice correction factor. | |
Protected Attributes inherited from ActionBase | |
string | name |
The name of the action. | |
LookupTable & | lookup |
We need a non-constant reference for updates. | |
const Path & | path |
A reference to the paths. | |
WaveFunctionBase * | waveFunctionPtr |
A pointer to a trial wave function object. | |
double | endFactor |
Mutiplictive factor of the potential action on ends. | |
int | shift |
The scaling factor for tau. | |
bool | canonical |
Are we in the canonical ensemble? | |
int | numBeads0 |
The target number of beads. | |
bool | window |
int | windowWidth |
bool | gaussianEnsemble |
double | gaussianEnsembleSD |
beadLocator | bead2 |
beadLocator | bead3 |
dVec | sep |
dVec | sep2 |
double | dSep |
Additional Inherited Members | |
Data Fields inherited from ActionBase | |
const bool | local |
Is the action local in imaginary time? | |
const int | period |
PotentialBase * | externalPtr |
The external potential. | |
PotentialBase * | interactionPtr |
The interaction potential. | |
Array< int, 1 > | sepHist |
A histogram of separations. | |
Array< int, 1 > | cylSepHist |
A histogram of separations for a cylinder. | |
A base class to be inherited by actions that are local in imaginary time.
|
virtual |
Return the bare potential action for a single bead indexed with beadIndex.
This action corresponds to the primitive approximation and may be used when attempting updates that use single slice rejection.
Reimplemented from ActionBase.
Definition at line 352 of file action.cpp.
|
protected |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position minus the center of mass of the WL that it belongs to.
NOTE: This is the first term. These were split up because it is beneficial to be able to return them separately when computing the specific heat via the centroid virial estimator.
This includes both the external and interaction potentials.
Definition at line 1228 of file action.cpp.
|
protected |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position minus the center of mass of the WL that it belongs to.
NOTE: This is the second term
This includes both the external and interaction potentials.
Definition at line 1307 of file action.cpp.
|
virtual |
The derivative of the potential action wrt lambda for all links starting on slice.
It is essential to have these slice overloaded values as we need to be careful of the factor of 1/2 or i<j in the full potential action.
slice | the imaginary timeslice of the first link |
Reimplemented from ActionBase.
Definition at line 469 of file action.cpp.
|
virtual |
The derivative of the potential action wrt lambda for all links starting on slice within a cutoff radius.
It is essential to have these slice overloaded values as we need to be careful of the factor of 1/2 or i<j in the full potential action.
slice | the imaginary timeslice of the first link |
maxR | the cutoff radius |
Reimplemented from ActionBase.
Definition at line 515 of file action.cpp.
|
virtual |
The derivative of the potential action wrt tau on all links starting on slice.
It is essential to have these slice overloaded values as we need to be careful of the factor of 1/2 or i<j in the full potential action.
slice | the imaginary timeslice of the first link |
Reimplemented from ActionBase.
Definition at line 422 of file action.cpp.
|
virtual |
The derivative of the potential action wrt tau on all links starting on slice within a cutoff radius.
It is essential to have these slice overloaded values as we need to be careful of the factor of 1/2 or i<j in the full potential action.
slice | the imaginary timeslice of the first link |
maxR | the cutoff radius |
Reimplemented from ActionBase.
Definition at line 489 of file action.cpp.
|
protected |
Return the gradient of the full potential for all beads at a single time slice.
This includes both the external and interaction potentials.
Definition at line 978 of file action.cpp.
|
protected |
Returns the value of the gradient of the potential action for all beads at a given time slice.
This should be used for the pressure.
Definition at line 1458 of file action.cpp.
|
protected |
Return the gradient of the full potential squared for a single bead.
This includes both the external and interaction potentials using the nearest neighbor lookup table.
Definition at line 915 of file action.cpp.
|
protected |
Return the gradient of the full potential squared for a single bead.
This includes both the external and interaction potentials.
Definition at line 762 of file action.cpp.
|
protected |
Return the gradient of the full potential squared for all beads at a single time slice.
This includes both the external and interaction potentials.
Definition at line 821 of file action.cpp.
|
protected |
Return the gradient of the full potential squared for all beads at a single time slice restricted inside some cut-off radius.
This includes both the external and interaction potentials.
Definition at line 864 of file action.cpp.
|
virtual |
Return the potential action for all time slices and all particles.
Computes the total potential energy by summing over all particles and time slices. We must be very careful with the factor of 1/2 or the fact that the sum is over i<j for particles to avoid double counting.
!!NB!! It is important to use V and gradVSquared here, as this is used for debugging purposes with check move and must match up with the single bead calculation.
Reimplemented from ActionBase.
Definition at line 289 of file action.cpp.
|
virtual |
Return the potential action for a single bead indexed with beadIndex.
We have to use the beadIndex form of gradVSquared here to ensure that bead indexed action changes are equal to total potential action changes. We use a pre-processor directive to determine whether or not to use the nearest neighbor lookup table.
!!NB!! If we are using checkMove to debug moves you MUST always include the correction term.
beadIndex | the bead that we are computing the potential action for |
Reimplemented from ActionBase.
Definition at line 320 of file action.cpp.
|
virtual |
Return the potential action correction for a single bead.
Provided that the correction is small, we return its value.
Reimplemented from ActionBase.
Definition at line 372 of file action.cpp.
|
virtual |
Return the potential action correction for a path.
Given a starting and ending bead, compute the potential action correction for the path.
startBead | the starting bead |
endBead | the end bead on the path |
Reimplemented from ActionBase.
Definition at line 399 of file action.cpp.
|
virtual |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position.
Used for regular virial energy and thermodynamic pressure.
NOTE: This is the first term. These were split up because it is beneficial to be able to return them separately when computing the specific heat via the centroid virial estimator.
This includes both the external and interaction potentials.
Reimplemented from ActionBase.
Definition at line 1079 of file action.cpp.
|
virtual |
Return the sum over particles at a given time slice of the gradient of the action potential for a single bead dotted into the bead's position.
Used for regular virial energy and thermodynamic pressure.
NOTE: This is the second term
This includes both the external and interaction potentials.
Reimplemented from ActionBase.
Definition at line 1126 of file action.cpp.
|
virtual |
The second derivative of the potential action wrt tau on all links starting on slice.
It is essential to have these slice overloaded values as we need to be careful of the factor of 1/2 or i<j in the full potential action.
slice | the imaginary timeslice of the first link |
Reimplemented from ActionBase.
Definition at line 447 of file action.cpp.
|
protected |
Returns the T-matrix needed to compute gradU.
This is used for the virial energy estimator in the TI or GSF action. CURRENTLY ONLY RETURNS VALUES FOR INTERACTIONS, NOT EXTERNAL.
Definition at line 1015 of file action.cpp.
|
protected |
Returns the external and interaction potential energy, for all particles on a single time slice.
This is really only used for either debugging or during the calculation of the potential energy. As such, we update the separation histogram here.
Definition at line 573 of file action.cpp.
|
protected |
Returns the total value of the potential energy, including both the external potential, and that due to interactions for all particles in a single time slice within a certain cuttoff radius of the center of a cylinder.
This is really only used for either debugging or during the calculation of the potential energy. As such, we update the separation histogram here.
Definition at line 619 of file action.cpp.
|
protected |
Returns the value of the virial kinetic energy correction term.
Definition at line 1433 of file action.cpp.