Path Integral Quantum Monte Carlo
 All Classes Files Functions Variables Typedefs Enumerations Defines
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
ActionBase Class Reference

Holds a base class that all action classes will be derived from. More...

#include <action.h>

+ Inheritance diagram for ActionBase:

List of all members.

Public Member Functions

 ActionBase (const Path &, LookupTable &, PotentialBase *, PotentialBase *, WaveFunctionBase *, bool _local=true, string _name="Base", double _endFactor=1.0)
 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.
double kineticAction (const beadLocator &)
 The kinetic Action at a single slice.
double kineticAction (const beadLocator &, int wlLength)
 The kinetic Action for wlLength slices.
virtual double potentialAction ()
 The effective potential inter-ACTION for various pass conditions.
virtual double potentialAction (const beadLocator &, const beadLocator &)
 Return the potential action for a path.
virtual double potentialAction (const beadLocator &)
virtual double barePotentialAction (const beadLocator &)
virtual double potentialActionCorrection (const beadLocator &)
virtual double potentialActionCorrection (const beadLocator &, const beadLocator &)
virtual double derivPotentialActionTau (int)
virtual double derivPotentialActionLambda (int)
virtual double secondderivPotentialActionTau (int)
virtual double derivPotentialActionTau (int, double)
virtual double derivPotentialActionLambda (int, double)
virtual dVec gradPotentialAction (int)
virtual double rDOTgradUterm1 (int)
virtual double rDOTgradUterm2 (int)
virtual double deltaDOTgradUterm1 (int)
virtual double deltaDOTgradUterm2 (int)
virtual double virKinCorr (int)
virtual double potential (int)
virtual double potential (int, double)
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.
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.
double ensembleWeight (const int)
 The ensemble particle number weighting factor.

Public Attributes

const bool local
 Is the action local in imaginary time?
PotentialBaseexternalPtr
 The external potential.
PotentialBaseinteractionPtr
 The interaction potential.
Array< int, 1 > sepHist
 A histogram of separations.
Array< int, 1 > cylSepHist
 A histogram of separations for a cylinder.

Protected Member Functions

double tau ()
 The local shifted value of tau.
void updateSepHist (const dVec &)
 Update the separation histogram.

Protected Attributes

string name
 The name of the action.
LookupTablelookup
 We need a non-constant reference for updates.
const Pathpath
 A reference to the paths.
WaveFunctionBasewaveFunctionPtr
 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

Detailed Description

Holds a base class that all action classes will be derived from.

Implements the details of the action, including the potential and kinetic pieces. Two types of actions, local and non-local derive from this base class and the actually used actions then derive from these.

Definition at line 29 of file action.h.


Member Function Documentation

double ActionBase::ensembleWeight ( const int  deltaNumBeads)

The ensemble particle number weighting factor.

The ensemble weighting factor.

For the grand canonical ensemble we return 1, for the canonical ensemble we return exp(-[(nb'-nb_0)^2 - (nb-nb_0)^2]/dN^2) where nb = number of beads

Definition at line 121 of file action.cpp.

int ActionBase::getShift ( ) [inline]

Get the tau scaling factor.

Definition at line 92 of file action.h.

The full kinetic Action.

Return the total kinetic action.

The total kinetic action evaluated for all particles and all time slices.

Definition at line 204 of file action.cpp.

double ActionBase::kineticAction ( const beadLocator beadIndex)

The kinetic Action at a single slice.

Return the kinetic action for a single bead.

The kinetic action involves two contributions as each bead is linked to two other ones at the next and previous time slice.

Definition at line 158 of file action.cpp.

double ActionBase::kineticAction ( const beadLocator beadIndex,
int  wlLength 
)

The kinetic Action for wlLength slices.

Return the kinetic action for wlLength time slices starting at the bead given by beadIndex.

The total kinetic action for a string of connected beads all on the same worldline.

Definition at line 179 of file action.cpp.

virtual double ActionBase::potentialAction ( ) [inline, virtual]

The effective potential inter-ACTION for various pass conditions.

Reimplemented in NonLocalAction, and LocalAction.

Definition at line 48 of file action.h.

double ActionBase::potentialAction ( const beadLocator startBead,
const beadLocator endBead 
) [virtual]

Return the potential action for a path.

Given a starting and ending bead, compute the potential action for the path.

NOTE: if startBead == endBead this returns potentialAction(startBead) I'm not sure if this is the desired behavior yet.

Parameters:
startBeadthe starting bead
endBeadthe end bead on the path
Returns:
the total potential action for a given path

Definition at line 236 of file action.cpp.

double ActionBase::rho0 ( const dVec r1,
const dVec r2,
int  M 
)

The free-particle density matrix.

The free-particle density matrix for two particles with imaginary time separation M.

Definition at line 82 of file action.cpp.

double ActionBase::rho0 ( const dVec vel,
const int  M 
)

The free-particle density matrix for a given spatial and temporal separation.

Parameters:
velThe spatial separtion R - R'
MThe imaginary time separation
Returns:
The free density matrix

Definition at line 109 of file action.cpp.

void ActionBase::setShift ( int  _shift) [inline]

The public method that sets the tau scaling factor.

Definition at line 89 of file action.h.

double ActionBase::tau ( ) [inline, protected]

The local shifted value of tau.

Definition at line 130 of file action.h.

void ActionBase::updateSepHist ( const dVec _sep) [inline, protected]

Update the separation histogram.

We multiply by the periodic array, as we will only measure separations along spatial dimensions with periodic boundary conditions.

Definition at line 70 of file action.cpp.


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