Path Integral Quantum Monte Carlo
|
Compute the one body density matrix n(r) which can be used to find the momentum distribution function and structure factor. More...
#include <estimator.h>
Public Member Functions | |
OneBodyDensityMatrixEstimator (Path &, ActionBase *, const MTRand &, double, int _frequency=20, string _label="obdm") | |
Constructor. More... | |
~OneBodyDensityMatrixEstimator () | |
Destructor. | |
void | sample () |
Sample the OBDM. More... | |
void | outputFooter () |
For the one body density matrix estimator, we would like to output the acceptance information for the accumulate trial move. | |
string | getName () const |
Get the name of the estimator. | |
Public Member Functions inherited from EstimatorBase | |
EstimatorBase (const Path &_path, ActionBase *_actionPtr, const MTRand &_random, double _maxR, int _frequency=1, string _label="") | |
Constructor. More... | |
virtual | ~EstimatorBase () |
Destructor. | |
void | reset () |
Reset numAccumulated and the estimator to 0. | |
void | restart (const uint32, const uint32) |
Restart the measurment process from a previous state. | |
virtual void | output () |
Output the estimator value to disk. More... | |
virtual void | outputFlat () |
Output a flat estimator value to disk. More... | |
bool | baseSample () |
Determine the basic sampling condition. More... | |
uint32 | getTotNumAccumulated () const |
Get the total number of accumulated measurments. | |
uint32 | getNumAccumulated () const |
Get the number of accumulated measurements since the last reset. | |
uint32 | getNumSampled () const |
Get the number of samples since the last reset. | |
void | prepare () |
Prepare the estimator for i/o. More... | |
void | addEndLine () |
Add a carriage return to estimator files. | |
void | appendLabel (string append) |
Append to default label. More... | |
string | getLabel () const |
Get the estimator label. | |
Static Public Attributes | |
static const string | name |
Additional Inherited Members | |
Protected Member Functions inherited from EstimatorBase | |
void | initialize (int) |
Initialize estimator. More... | |
void | initialize (vector< string >) |
Initialize estimator. More... | |
Protected Attributes inherited from EstimatorBase | |
const Path & | path |
A constant reference to the paths. | |
ActionBase * | actionPtr |
A pointer to the action. | |
MTRand | random |
double | maxR |
fstream * | outFilePtr |
The output fie. | |
map< string, int > | estIndex |
Map estimator labels to indices. | |
Array< double, 1 > | estimator |
The estimator array. | |
Array< double, 1 > | norm |
The normalization factor for each estimator. | |
int | numEst |
The number of individual quantities measured. | |
int | frequency |
The frequency at which we accumulate. | |
int | startSlice |
Where imaginary time averages begin. | |
int | endSlice |
Where imaginary time averages end. | |
int | endDiagSlice |
Where imaginary time averages end for diagonal estimiators. | |
vector< double > | sliceFactor |
Used to properly incorporate end affects. | |
string | label |
The label used for the output file. | |
uint32 | numSampled |
The number of times we have sampled. | |
uint32 | numAccumulated |
The number of accumulated values. | |
uint32 | totNumAccumulated |
The total number of accumulated values. | |
int | numBeads0 |
The target number of beads for the canonical ensemble. | |
bool | diagonal |
Is this a diagonal estimator? | |
bool | endLine |
Should we output a carriage return? | |
bool | canonical |
Are we in the canonical ensemble? | |
string | header |
The data file header. | |
Compute the one body density matrix n(r) which can be used to find the momentum distribution function and structure factor.
We use a reference to the global random number generator, and thus this estimator can effect final results. We also need a non-constant local reference to the Path which is used for temporary updates.
Definition at line 644 of file estimator.h.
OneBodyDensityMatrixEstimator::OneBodyDensityMatrixEstimator | ( | Path & | _path, |
ActionBase * | _actionPtr, | ||
const MTRand & | _random, | ||
double | _maxR, | ||
int | _frequency = 20 , |
||
string | _label = "obdm" |
||
) |
Constructor.
The one body density matrix estimator is initialized. We measure NOBDMSEP positions, out to the maximum separation in the sample (which may depend on the type of simulation cell).
Definition at line 2256 of file estimator.cpp.
|
virtual |
Sample the OBDM.
We overload the sample method for the one body density matrix as we only want to measure when the gap is not too large, otherwise we will be dominated by tiny close probabilities.
!!NB!! We only measure the OBDM when the tail is on an even time slice
Reimplemented from EstimatorBase.
Definition at line 2296 of file estimator.cpp.