63 std::string action =
"SLA";
64 std::string usedrift =
"no";
65 m_param.
add(usedrift,
"useScaledDrift");
66 m_param.
add(action,
"Action");
73 bool driftoption = (usedrift ==
"yes" || usedrift ==
"Yes" || usedrift ==
"True" || usedrift ==
"true");
79 app_log() <<
" Using Umrigar scaled drift\n";
85 app_log() <<
" Using non-scaled drift\n";
92 app_log() <<
" Using DMC link-action\n";
97 app_log() <<
" Using Symmetrized Link-Action\n";
108 IndexType backward = (1 + direction) / 2;
132 RealType Action_forward = -0.5 * logGf;
146 fromdeltaR = curhead.
R -
W.
R -
drift;
172 new_headProp[
Action[2]] = 0.5 *
Tau * eloc;
195 RealType oldtail_logpsi = lastbead.Properties(WP::LOGPSI);
196 RealType newtail_logpsi = nextlastbead.Properties(WP::LOGPSI);
199 RealType oldtail_e = lastbead.Properties(WP::LOCALENERGY);
201 RealType newtail_e = nextlastbead.Properties(WP::LOCALENERGY);
232 acceptProb =
std::exp(logGb - logGf + 2.0 * (logpsi - curhead.
Properties(WP::LOGPSI)));
244 overwriteWalker.Properties(WP::LOCALENERGY) = eloc;
250 overwriteWalker.resetProperty(logpsi,
Psi.
getPhase(), eloc);
253 overwriteWalker.Age = 0;
272 for (; it != it_end; ++it)
282 (*it)->resetProperty(logpsi,
Psi.
getPhase(), ene, 0.0, 0.0, nodecorr);
288 for (
int n = 0;
n < initsteps;
n++)
316 IndexType backward = (1 + direction) / 2;
371 fromdeltaR = curhead.
R -
W.
R -
drift;
419 RealType oldtail_logpsi = lastbead.Properties(WP::LOGPSI);
420 RealType newtail_logpsi = nextlastbead.Properties(WP::LOGPSI);
423 RealType oldtail_e = lastbead.Properties(WP::LOCALENERGY);
425 RealType newtail_e = nextlastbead.Properties(WP::LOCALENERGY);
445 (curhead.
Properties(WP::LOGPSI) + lastbead.Properties(WP::LOGPSI) - logpsi -
446 nextlastbead.Properties(WP::LOGPSI));
477 dS = dS_head - dS_tail;
485 r2accept = r2proposed;
490 app_log() <<
"\tForce Acceptance...\n";
494 overwriteWalker.Properties(WP::LOCALENERGY) = eloc;
502 overwriteWalker.resetProperty(logpsi,
Psi.
getPhase(), eloc);
503 overwriteWalker.Properties(WP::R2ACCEPTED) = r2accept;
504 overwriteWalker.Properties(WP::R2PROPOSED) = r2proposed;
509 overwriteWalker.Age = 0;
517 curhead.
Properties(WP::R2PROPOSED) = r2proposed;
518 lastbead.Properties(WP::R2ACCEPTED) = 0;
RealType evaluateLog(ParticleSet &P)
evalaute the log (internally gradients and laplacian) of the trial wavefunction.
const BranchEngineType * branchEngine
branch engine, stateless reference to the one in QMCDriver
ParticleSet::ParticlePos drift
temporary storage for drift
RealType m_tauovermass
tau/mass
PropertyContainer_t Properties
scalar properties of a walker
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 accumulate(MCWalkerConfiguration &W)
accumulate the measurements
PropertyContainer_t Properties
properties of the current walker
QTBase::RealType RealType
RealType getPhaseDiff() const
TrialWaveFunction & Psi
trial function
typename p_traits::ParticlePos ParticlePos
array of particles
void saveProperty(IT first)
save the values of Hamiltonian elements to the Properties
bool phaseChanged(RealType psi0) const
virtual bool put(xmlNodePtr cur)
process options
RealType DMCLinkAction(RealType enew, RealType eold) const
Collection of Local Energy Operators.
void assignDrift(T s, const ParticleAttrib< TinyVector< TG, D >> &ga, ParticleAttrib< TinyVector< T, D >> &da)
void accumulate(WalkerIter_t it, WalkerIter_t it_end)
RealType m_sqrttau
Time-step factor .
void update(bool skipSK=false)
update the internal data
RealType symLinkAction(RealType logGf, RealType logGb, RealType enew, RealType eold) const
ParticleSet::ParticlePos deltaR
temporary storage for random displacement
ParticleLaplacian L
laplacians of the particles
int Age
Age of this walker age is incremented when a walker is not moved after a sweep.
T Dot(const ParticleAttrib< TinyVector< T, D >> &pa, const ParticleAttrib< TinyVector< T, D >> &pb)
bool put(std::istream &is) override
read from std::istream
std::vector< IndexType > TransProb
RMCUpdateAllWithDrift(MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg, std::vector< int > act, std::vector< int > tp)
Constructor.
omp_int_t omp_get_thread_num()
class to handle a set of parameters
T setScaledDriftPbyPandNodeCorr(T tau, const ParticleAttrib< TinyVector< T1, D >> &qf, ParticleAttrib< TinyVector< T, D >> &drift)
scale drift
std::vector< IndexType > Action
WalkerProperties::Indexes WP
EstimatorManagerBase * Estimators
estimator
~RMCUpdateAllWithDrift() override
ParticleGradient G
gradients of the particles
void saveWalker(Walker_t &awalker)
save this to awalker
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
MCWalkerConfiguration & W
walker ensemble
std::vector< RealType > MassInvP
1/Mass per particle
OHMMS_INDEXTYPE IndexType
define other types
void advanceWalker(Walker_t &thisWalker, bool recompute) override
move a walker
void loadWalker(Walker_t &awalker, bool pbyp)
load a Walker_t to the current ParticleSet
void auxHevaluate(ParticleSet &P)
RealType getPhase() const
void add(PDT &aparam, const std::string &aname_in, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new parameter corresponding to an xmlNode <parameter>
IndexType MaxAge
MaxAge>0 indicates branch is done.
void rejectedMove(ParticleSet &P, Walker_t &ThisWalker)
Looks like a hack see DMCBatched.cpp and DMC.cpp weight is used like temporary flag from DMC...
Class to represent a many-body trial wave function.
RandomBase< FullPrecRealType > & RandomGen
random number generator
Indexes
an enum denoting index of physical properties
Declaraton of ParticleAttrib<T>
FullPrecRealType evaluate(ParticleSet &P)
evaluate Local Energy
void initWalkers(WalkerIter_t it, WalkerIter_t it_end) override
initialize Walker for walker update
bool makeMoveAllParticlesWithDrift(const Walker_t &awalker, const ParticlePos &drift, const ParticlePos &deltaR, RealType dt)
move all the particles including the drift
QTFull::RealType FullPrecRealType
void saveAction(Walker_t &walker, IndexType d, RealType val, IndexType nPsi=0)
std::vector< int > Action
IndexType nAccept
counter for number of moves accepted
bool put(xmlNodePtr cur) override
process options
RealType m_oneover2tau
Time-step factor .
IndexType nReject
counter for number of moves rejected
void saveTransProb(Walker_t &walker, IndexType d, RealType val, IndexType nPsi=0)
FullPrecRealType *restrict getPropertyBase()
return the address of the values of Hamiltonian terms
A container class to represent a walker.
QMCHamiltonian & H
Hamiltonian.
void setScaledDrift(T tau, const ParticleAttrib< TinyVector< TG, D >> &qf, ParticleAttrib< TinyVector< T, D >> &drift)
da = scaled(tau)*ga
void advanceWalkers(WalkerIter_t it, WalkerIter_t it_end, bool measure) override
advance walkers executed at each step
ParticlePos R
The configuration vector (3N-dimensional vector to store the positions of all the particles for a sin...
RealType getTransProb(Walker_t &walker, IndexType d, RealType nPsi=0)
void makeGaussRandomWithEngine(ParticleAttrib< TinyVector< T, D >> &a, RG &rng)