22 #ifndef QMCPLUSPLUS_SIMPLE_FIXEDNODE_BRANCHER_H 23 #define QMCPLUSPLUS_SIMPLE_FIXEDNODE_BRANCHER_H 39 class WalkerControlBase;
40 class EstimatorManagerBase;
195 template<
typename PAR_ENUM>
196 struct VParams :
public std::array<FullPrecRealType, static_cast<size_t>(PAR_ENUM::VPARAM_MAX)>
198 using Base = std::array<FullPrecRealType, static_cast<size_t>(PAR_ENUM::VPARAM_MAX)>;
263 #if defined(QMC_COMPLEX) 266 return std::cos(psi0) < std::numeric_limits<RealType>::epsilon();
330 RealType driftaction = -0.5 * (logGf + logGb);
338 RealType energyaction = taueff_ * (enew + eold);
339 return driftaction + energyaction;
344 RealType driftaction = -0.5 * (logGf + logGb);
346 RealType energyaction = taueff_ * (enew + eold);
348 return driftaction + energyaction;
359 return taueff_ * (enew + eold);
403 return std::exp(taueff * 0.5 * (s1 + s0));
426 void flush(
int counter);
438 bool put(xmlNodePtr cur);
444 void write(
const std::string& fname,
bool overwrite =
true);
446 void read(
const std::string& fname);
452 void start(
const std::string& froot,
bool append =
false);
void collect(int iter, MCWalkerConfiguration &w)
update RMC counters and running averages.
HamiltonianRef::FullPrecRealType FullPrecRealType
std::bitset< B_MODE_MAX > BranchModeType
booleans to set the branch modes
accumulator_set< RealType > R2Center
a simple accumulator for reptation's center slice
A set of walkers that are to be advanced by Metropolis Monte Carlo.
helper functions for EinsplineSetBuilder
void reset()
reset the internal parameters
void checkParameters(MCWalkerConfiguration &w)
determine trial and reference energies
controlling parameters of full precision real type
BranchModeType BranchMode
FullPrecRealType ScaleSum
Used for the average scaling.
RealType branchWeightBare(RealType enew, RealType eold) const
return the bare branch weight
std::string branching_cutoff_scheme
scheme of branching cutoff
SimpleBranchVectorParameter
enum for vParam
bool phaseChanged(RealType psi0) const
accumulator_set< RealType > R2Proposed
a simple accumulator for energy
EstimatorManagerBase * getEstimatorManager()
get the EstimatorManager
void branch(int iter, MCWalkerConfiguration &w)
perform branching
counter for tracking object state
RealType DMCLinkAction(RealType enew, RealType eold) const
RealType branchWeight(RealType enew, RealType eold, RealType scnew, RealType scold) const
return the branch weight according to JCP1993 Umrigar et al.
void start(const std::string &froot, bool append=false)
start a run
RealType symLinkActionBare(RealType logGf, RealType logGb, RealType enew, RealType eold) const
void advanceQMCCounter()
increment QMCCounter
1 for dmc, 0 for anything else
xmlNodePtr myNode
save xml element
RealType symLinkAction(RealType logGf, RealType logGb, RealType enew, RealType eold) const
SimpleFixedNodeBranch(RealType tau, int nideal)
Constructor.
maximum number of walkers per node
void write(const std::string &fname, bool overwrite=true)
write the state
accumulator_set< FullPrecRealType > EnergyHist
a simple accumulator for energy
RealType LogJacobRef
LogJacob.
void setBranchCutoff(FullPrecRealType variance, FullPrecRealType targetSigma, FullPrecRealType maxSigma, int Nelec=0)
set branch cutoff, max, filter
void flush(int counter)
restart averaging
ParameterSet m_param
set of parameters
FullPrecRealType & operator[](PAR_ENUM sbvp)
FullPrecRealType logN
Feed*log(N)
std::unique_ptr< WalkerControlBase > BackupWalkerController
Backup WalkerController for mixed DMC.
Manages the state of QMC sections and handles population control for DMCs.
1 to use taueff accordning to JCP 93, 0 to use tau
frequency of the trial energy updates, default 1
MakeReturn< UnaryNode< FnCos, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t cos(const Vector< T1, C1 > &l)
class to handle a set of parameters
RealType branchWeight(FullPrecRealType enew, FullPrecRealType eold) const
return the bare branch weight with a filtering using an energy window
int initWalkerController(MCWalkerConfiguration &mcwc, bool fixW, bool killwalker)
initialize the WalkerController
1 for rmc, 0 for anything else
1 to kill walkers when a node crossing is detected
1 for the standard dmc, 0 for the comb method
RealType branchWeight(RealType enew, RealType eold, RealType scnew, RealType scold, RealType p) const
return the branch weight according to JCP1993 Umrigar et al.
std::ostream & operator<<(std::ostream &out, const AntiSymTensor< T, D > &rhs)
minimum number of walkers per node
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
Define a accumulator whose average is evaluated for a moving block of a fixed steps.
RealType getTauEff() const
Manager class of scalar estimators.
warmup steps, valid when BranchMode[D_DMCSTAGE] == 0
void registerParameters()
create map between the parameter name and variables
void read(const std::string &fname)
std::string RootName
root name
RealType getEtrial() const
Class to manage a set of ScalarEstimators.
std::vector< RealType > LogNorm
LogNorm.
RealType branchWeightTau(RealType enew, RealType eold, RealType scnew, RealType scold, RealType taueff)
return the branch weight according to JCP1993 Umrigar et al.
std::array< FullPrecRealType, static_cast< size_t >(SBVP ::VPARAM_MAX)> Base
std::vector< std::string > sParam
string parameters
void initReptile(MCWalkerConfiguration &w)
initialize reptile stats
bool put(xmlNodePtr cur)
Parse the xml file for parameters.
interval between branch, see population control
QTFull::RealType FullPrecRealType
const FullPrecRealType & operator[](PAR_ENUM sbvp) const
std::unique_ptr< EstimatorManagerBase > MyEstimator
std::unique_ptr< WalkerControlBase > WalkerController
WalkerController.
accumulator_set< RealType > R2Accepted
a simple accumulator for energy
void setEstimatorManager(std::unique_ptr< EstimatorManagerBase > est)
set the EstimatorManager
int resetRun(xmlNodePtr cur)
reset the internal parameters
target total number of walkers per mpi group
Declaration of a MCWalkerConfiguration.
A container class to represent a walker.
int ToDoSteps
number of remaning steps for a specific tasks
Define and declare accumulator_set.
void finalize(MCWalkerConfiguration &w)
finalize the simulation
accumulator_set< FullPrecRealType > VarianceHist
a simple accumulator for variance
std::string debug_disable_branching_
disable branching for debugging