21 #ifndef QMCPLUSPLUS_QMCDRIVER_H 22 #define QMCPLUSPLUS_QMCDRIVER_H 62 class MCWalkerConfiguration;
63 class HDFWalkerOutput;
65 class WalkerLogManager;
111 const std::string& QMC_driver_type,
112 bool enable_profiling =
false);
134 void setStatus(
const std::string& aname,
const std::string& h5name,
bool append)
override;
147 void process(xmlNodePtr cur)
override;
152 void putWalkers(std::vector<xmlNodePtr>& wset)
override;
204 for (
int i = 0; i <
Rng.size(); ++i)
205 RngRefs.push_back(*
Rng[i]);
332 std::unique_ptr<HDFWalkerOutput>
wOut;
335 std::vector<TrialWaveFunction*>
Psi1;
338 std::vector<QMCHamiltonian*>
H1;
373 bool finalize(
int block,
bool dumpwalkers =
true);
NewTimer & checkpoint_timer_
std::string getRotationName(std::string RootName)
std::string h5FileRoot
the root of h5File
int MaxCPUSecs
maximum cpu in secs
A set of walkers that are to be advanced by Metropolis Monte Carlo.
Base class for any object which needs to know about a MPI communicator.
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
QMCDriver(const ProjectData &project_data, MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, Communicate *comm, const std::string &QMC_driver_type, bool enable_profiling=false)
Constructor.
std::string getLastRotationName(std::string RootName)
std::vector< TrialWaveFunction * > Psi1
a list of TrialWaveFunctions for multiple method
void recordBlock(int block) override
record the state of the block
bool DumpConfig
flag to turn off dumping configurations
std::string RootName
root of all the output files
void setValue(const std::string &aname, PDT x)
RealType m_oneover2tau
Time-step factor .
RealType nSamplesPerThread
samples per thread
xmlNodePtr qmcNode
pointer to qmc node in xml file
void putWalkerLogs(xmlNodePtr wlxml) override
int addObservable(const std::string &aname)
Collection of Local Energy Operators.
this class implements drift modification
ParticleSet::ParticlePos drift
temporary storage for drift
IndexType CurrentStep
current step
Timer accumulates time and call counts.
std::vector< std::unique_ptr< T > > UPtrVector
RandomBase< FullPrecRealType > & getRng(int i) override
return the i-th random generator
abstract base class for QMC engines
bool AppendRun
flag to append or restart the run
RealType SpinMass
spin mass for spinor calcs
IndexType nReject
counter for number of moves /rejected
IndexType nTargetWalkers
the number of walkers
std::unique_ptr< TraceManager > Traces
Traces manager.
unsigned long getDriverMode() override
void setBranchEngine(std::unique_ptr< BranchEngineType > &&be) override
set the BranchEngineType
RealType getObservable(int i)
int Period4ConfigDump
period of recording walker positions and IDs for forward walking afterwards
ParameterSet m_param
store any parameter that has to be read from a file
IndexType nSubSteps
number of steps between a step: VMCs do not evaluate energies
Creates a common base class pointer for QMCDriver and QMCDriverNew to share.
Wrapping information on parallelism.
IndexType nSteps
maximum number of steps
std::unique_ptr< HDFWalkerOutput > wOut
record engine for walkers
void setUpdateMode(bool pbyp) override
set the update mode
bool finalize(int block, bool dumpwalkers=true)
finalize a qmc section
const std::string & get_root_name() const override
const std::string QMCType
type of QMC driver
int kDelay
the number to delay updates by
class to handle a set of parameters
std::bitset< QMC_MODE_MAX > qmc_driver_mode
bits to classify QMCDriver
Declaration of WaveFunctionPool.
std::unique_ptr< BranchEngineType > branchEngine
branch engine
void putTraces(xmlNodePtr txml) override
bool putQMCInfo(xmlNodePtr cur)
Parses the xml input file for parameter definitions for a single qmc simulation.
void setValue(const std::string &aname_in, PDT aval)
QMCTraits::FullPrecRealType FullPrecRealType
QMCHamiltonian & H
Hamiltonian.
void setStatus(const std::string &aname, const std::string &h5name, bool append) override
Set the status of the QMCDriver.
DriftModifierBase * DriftModifier
drift modifer
MCWalkerConfiguration & W
walker ensemble
RefVector< RandomBase< FullPrecRealType > > getRngRefs() const
return the random generators
Manager class of scalar estimators.
OHMMS_INDEXTYPE IndexType
define other types
std::unique_ptr< BranchEngineType > getBranchEngine() override
return BranchEngineType*
WalkerConfigurations::Walker_t Walker_t
bool allow_walker_logs
whether to allow traces
Class to manage a set of ScalarEstimators.
xmlNodePtr walker_logs_xml
traces xml
Declaration of a TrialWaveFunction.
void add_H_and_Psi(QMCHamiltonian *h, TrialWaveFunction *psi) override
add QMCHamiltonian/TrialWaveFunction pair for multiple
bool IsQMCDriver
true, if it is a real QMC engine
void requestTraces(bool traces) override
std::vector< std::reference_wrapper< T > > RefVector
std::string getEngineName() override
Class to represent a many-body trial wave function.
std::vector< QMCHamiltonian * > H1
a list of QMCHamiltonians for multiple method
IndexType nTargetSamples
the number of saved samples
EstimatorManagerBase * Estimators
Observables manager.
int Period4CheckPoint
period of dumping walker configurations and everything else for restart
RealType nTargetPopulation
target population
ParticleAttrib< SingleParticlePos > ParticlePos
TrialWaveFunction & Psi
trial function
std::vector< xmlNodePtr > mcwalkerNodePtr
a list of mcwalkerset element
IndexType nAccept
counter for number of moves accepted
declare a handler of DMC branching
const ProjectData & project_data_
top-level project data information
IndexType nStepsBetweenSamples
alternate method of setting QMC run parameters
IndexType nBlocks
maximum number of blocks
ScopedProfiler driver_scope_profiler_
profile the driver lifetime
QTFull::RealType FullPrecRealType
int Period4WalkerDump
period of recording walker configurations
int Period4CheckProperties
period of dumping walker positions and IDs for Forward Walking
RealType m_sqrttau
Time-step factor .
void addWalkers(int nwalkers)
Add walkers to the end of the ensemble of walkers.
void setWalkerOffsets()
set global offsets of the walkers
IndexType nWarmupSteps
number of warmup steps
UPtrVector< RandomBase< FullPrecRealType > > Rng
Random number generators.
int addObservable(const char *aname)
std::unique_ptr< WalkerLogManager > wlog_manager_
Traces manager.
IndexType nBlocksBetweenRecompute
the number of blocks between recomptePsi
xmlNodePtr traces_xml
traces xml
int current() const
return current step
PooledData< RealType > Buffer_t
RealType getObservable(int i) const
int MyCounter
the number of times this QMCDriver is executed
ParticleSet::ParticlePos deltaR
temporary storage for random displacement
void requestWalkerLogs(bool allow_walker_logs_) override
A container class to represent a walker.
void putWalkers(std::vector< xmlNodePtr > &wset) override
Read walker configurations from *.config.h5 files.
void process(xmlNodePtr cur) override
initialize with xmlNode
Define a serialized buffer to store anonymous data.
bool allow_traces
whether to allow traces
Declaration of QMCHamiltonian.
xmlNodePtr getQMCNode()
return a xmlnode with update
bool ResetRandom
randomize it