20 #ifndef QMCPLUSPLUS_QMCUPDATE_BASE_H 21 #define QMCPLUSPLUS_QMCUPDATE_BASE_H 34 class WalkerLogManager;
47 #ifdef MIXED_PRECISION 146 void startRun(
int blocks,
bool record);
170 else if (awalker.
Age > 0)
185 virtual bool put(xmlNodePtr cur);
200 std::vector<PosType>& dR,
201 std::vector<int>& iats,
202 std::vector<int>& rs,
203 std::vector<RealType>& ratios)
229 it -= (last - first);
231 it += (last - first);
240 logGb += 0.5 *
dot(displ[iat], displ[iat]) * mass_over_tau;
TraceManager * Traces
traces
const BranchEngineType * branchEngine
branch engine, stateless reference to the one in QMCDriver
ParticleSet::ParticlePos drift
temporary storage for drift
WalkerLogCollector * wlog_collector
std::string debug_checks_str_
RealType m_tauovermass
tau/mass
Base class for update methods for each step.
A set of walkers that are to be advanced by Metropolis Monte Carlo.
MCWalkerConfiguration::iterator WalkerIter_t
helper functions for EinsplineSetBuilder
void getLogs(std::vector< RealType > &lvals)
void accumulate(MCWalkerConfiguration &W)
accumulate the measurements
void setSpinMass(RealType m)
TrialWaveFunction & Psi
trial function
RealType spinMass
spin mass
size_t getTotalNum() const
ParticleSet::ParticleScalar deltaS
temporart storage for spin displacement
virtual bool put(xmlNodePtr cur)
process options
constexpr std::complex< float > cone
Collection of Local Energy Operators.
ParticleAttrib< QTFull::ValueType > ParticleLaplacian
Declaration of NonLocalTOperator.
this class implements drift modification
MCWalkerConfiguration::Walker_t Walker_t
Crowd-level resource for walker log collection.
Timer accumulates time and call counts.
RealType m_sqrttau
Time-step factor .
int current_step
current MC step
ParticleSet::ParticlePos deltaR
temporary storage for random displacement
int Age
Age of this walker age is incremented when a walker is not moved after a sweep.
DriverDebugChecks debug_checks_
determine additional checks for debugging purpose
void startBlock(int steps)
prepare to start a block
IndexType nNodeCrossing
Total number of node crossings per block.
void resetRun(BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, const DriftModifierBase *driftmodifer)
reset the QMCUpdateBase parameters
Specialized paritlce class for atomistic simulations.
WalkerList_t::iterator iterator
FIX: a type alias of iterator for an object should not be for just one of many objects it holds...
Manages the state of QMC sections and handles population control for DMCs.
class to handle a set of parameters
EstimatorManagerBase * Estimators
estimator
virtual void initWalkers(WalkerIter_t it, WalkerIter_t it_end)
initialize Walker for walker update
std::vector< RealType > SqrtTauOverMass
sqrt(tau/Mass) per particle
virtual void advanceWalker(Walker_t &thisWalker, bool recompute)=0
move a walker
RealType logBackwardGF(const ParticleSet::ParticlePos &displ)
TrialWaveFunction & Guide
guide function
void stopBlock(bool collectall=true)
stop a block
ParticleSet::ParticleLaplacian dL
MCWalkerConfiguration & W
walker ensemble
void setDefaults()
set default parameters
std::vector< RealType > MassInvP
1/Mass per particle
void getLogs(std::vector< RealType > &logs)
static void checkLogAndGL(ParticleSet &pset, TrialWaveFunction &twf, const std::string_view location)
check logpsi and grad and lap against values computed from scratch
Manager class of scalar estimators.
virtual RealType advanceWalkerForEE(Walker_t &w1, std::vector< PosType > &dR, std::vector< int > &iats, std::vector< int > &rs, std::vector< RealType > &ratios)
OHMMS_INDEXTYPE IndexType
define other types
RealType getNodeCorrection(const ParticleSet::ParticleGradient &g, ParticleSet::ParticlePos &gscaled)
evaluate the ratio of scaled velocity and velocity
QMCUpdateBase(MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg)
Constructor.
int RMC_checkIndex(int N, int NMax)
WalkerConfigurations::Walker_t Walker_t
Class to manage a set of ScalarEstimators.
Declaration of a TrialWaveFunction.
int nSubSteps
number of steps per measurement
IndexType MaxAge
MaxAge>0 indicates branch is done.
void RMC_checkWalkerBounds(WalkerIter_t &it, WalkerIter_t first, WalkerIter_t last)
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
virtual ~QMCUpdateBase()
destructor
QMCUpdateBase & operator=(const QMCUpdateBase &)
Copy operator (disabled).
void setMultiplicity(Walker_t &awalker) const
Class to represent a many-body trial wave function.
RealType csoffset
normalization offset for cs type runs.
RandomBase< FullPrecRealType > & RandomGen
random number generator
ParticleAttrib< SingleParticlePos > ParticlePos
virtual void initWalkersForPbyP(WalkerIter_t it, WalkerIter_t it_end)
initialize Walker buffers for PbyP update
FullPrecRealType Weight
Weight of the walker.
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
ParticleAttrib< QTFull::GradType > ParticleGradient
NewTimer & initWalkers_timer_
declare a handler of DMC branching
IndexType nAccept
counter for number of moves accepted
RealType m_oneover2tau
Time-step factor .
IndexType nReject
counter for number of moves rejected
virtual void advanceWalkers(WalkerIter_t it, WalkerIter_t it_end, bool recompute)
advance walkers executed at each step
void accumulate(WalkerIter_t it, WalkerIter_t it_end)
ParticleSet::ParticleLaplacian L
storage for differential laplacians for PbyP update
ParticleSet::ParticleGradient dG
ParticleSet::ParticleGradient G
storage for differential gradients for PbyP update
FullPrecRealType Multiplicity
Number of copies for branching When Multiplicity = 0, this walker will be destroyed.
std::vector< RealType > MassInvS
1/Mass per species
void setMultiplicity(WalkerIter_t it, WalkerIter_t it_end)
set the multiplicity of the walkers to branch
IndexType NumPtcl
number of particles
QTBase::TensorType TensorType
ParticleAttrib< Scalar_t > ParticleScalar
Declaration of a MCWalkerConfiguration.
A container class to represent a walker.
QMCHamiltonian & H
Hamiltonian.
SimpleFixedNodeBranch BranchEngineType
ParameterSet myParams
parameters
RealType m_r2max
maximum displacement^2
RealType acceptRatio() const
void startRun(int blocks, bool record)
start a run
IndexType NonLocalMoveAccepted
Total numer of non-local moves accepted.
Declaration of QMCHamiltonian.
IndexType nAllRejected
Total number of the steps when all the particle moves are rejected.
void resetRun2(BranchEngineType *brancher, EstimatorManagerBase *est, TraceManager *traces, WalkerLogCollector *wlog_collector_, const DriftModifierBase *driftmodifer)
bool UpdatePbyP
update particle-by-particle
const DriftModifierBase * DriftModifier
drift modifer, stateless reference to the one in QMCDriver