Path Integral Quantum Monte Carlo
|
The main driver class for the entire path integral monte carlo program. More...
#include <pimc.h>
Public Member Functions | |
PathIntegralMonteCarlo (boost::ptr_vector< Path > &, MTRand &, boost::ptr_vector< move_vector > &, boost::ptr_vector< estimator_vector > &, const bool, uint32 binSize=100) | |
Constructor. More... | |
~PathIntegralMonteCarlo () | |
Destructor. | |
void | equilStepDiagonal () |
Diagonal Equilibration. More... | |
bool | equilStepRelaxmu () |
Relax the chemical potential to find a target number of particles. More... | |
bool | equilStepRelaxC0 () |
Relax the worm constant C0 until we have found the desired diagonal fraction. More... | |
void | equilStep (const uint32, const bool, const bool) |
Equilibration. More... | |
void | step () |
PIMC step. More... | |
void | finalOutput () |
Output simulation statistics to disk. More... | |
void | saveState (const int finalSave=0) |
Save the state of the simulation to disk, including all path, worm, move and estimator data. | |
void | outputPDB () |
Output the worldline configuration to disk using PDB , suitable for plotting using vmd. More... | |
void | printWormState () |
string | printHistogram () |
Output a histogram to the terminal. More... | |
Data Fields | |
int | numStoredBins |
Number of stored estimators. | |
int | numDiagonal |
Number of consecutive diagonal configs. | |
int | numConfig |
Number of configurations;. | |
int | numCoMAttempted |
Number of Center of Mass moves. | |
int | prevNumCoMAttempted |
Number of Center of Mass moves attempted. | |
int | numCoMAccepted |
Number of equil CoM moves accepted. | |
int | numDisplaceAttempted |
Number of equil Displace moves. | |
int | numDisplaceAccepted |
Number of equil Displace moves accepted. | |
int | numMuAttempted |
Number of moves between mu adjustments. | |
int | numNAttempted |
The number of particle measurements. | |
int | numStepsAttempted |
Number of steps for relaxing C0. | |
The main driver class for the entire path integral monte carlo program.
Holds the path, action, move and estimator objects along with methods which actually perform the monte carlo sampling procedure.
PathIntegralMonteCarlo::PathIntegralMonteCarlo | ( | boost::ptr_vector< Path > & | _pathPtrVec, |
MTRand & | _random, | ||
boost::ptr_vector< move_vector > & | _movePtrVec, | ||
boost::ptr_vector< estimator_vector > & | _estimatorPtrVec, | ||
const bool | _startWithState, | ||
uint32 | _binSize = 100 |
||
) |
Constructor.
Here we initialize all data structures, moves and estimators that will be required with peforming a path integral quantum monte carlo simulation. The initialization depends on whether or not we are restarting, or starting from a user supplied state.
Definition at line 27 of file pimc.cpp.
void PathIntegralMonteCarlo::equilStep | ( | const uint32 | iStep, |
const bool | relaxC0, | ||
const bool | relaxmu | ||
) |
Equilibration.
The equilibration method, where we perform fully diagonal moves 20% of the time, finding an optimal, COM step, then if it is desired, we attempt to find an optimal value of μ and C0.
Definition at line 561 of file pimc.cpp.
void PathIntegralMonteCarlo::equilStepDiagonal | ( | ) |
Diagonal Equilibration.
The diagonal-only portion of the equilibration.
Definition at line 198 of file pimc.cpp.
bool PathIntegralMonteCarlo::equilStepRelaxC0 | ( | ) |
Relax the worm constant C0 until we have found the desired diagonal fraction.
This portion of the equilibration attempts to find the appropriate value of the worm constant C0 until we have arrived at a desired diagonal fraction fixed to be 75% here.
Definition at line 412 of file pimc.cpp.
bool PathIntegralMonteCarlo::equilStepRelaxmu | ( | ) |
Relax the chemical potential to find a target number of particles.
This portion of the equilibration attempts to find the appropriate chemical potential to converge onto a target number of particles.
Definition at line 292 of file pimc.cpp.
void PathIntegralMonteCarlo::finalOutput | ( | ) |
Output simulation statistics to disk.
We perform this once at the very end of the simulation. It saves the details of accetance probabilities as well as estimators to a file.
Definition at line 752 of file pimc.cpp.
void PathIntegralMonteCarlo::outputPDB | ( | ) |
Output the worldline configuration to disk using PDB , suitable for plotting using vmd.
We must post-process the final pdb file and split it up due to connectivity changes.
Definition at line 1161 of file pimc.cpp.
string PathIntegralMonteCarlo::printHistogram | ( | ) |
void PathIntegralMonteCarlo::step | ( | ) |
PIMC step.
This method performs the metropolis sampling, which is actually a complicated multi-step operation which consists of various types of moves.
They can in general occur at different frequencies. We also measure all estimators.
Definition at line 688 of file pimc.cpp.