23 #if !defined(REMOVE_TRACEMANAGER) 26 using TraceManager = int;
75 for (
int d = 0; d <
DIM; d++)
80 for (
int ig = 0; ig <
W.
groups(); ++ig)
83 RealType oneover2tau = 0.5 / (tauovermass);
86 for (
int iat =
W.
first(ig); iat <
W.
last(ig); ++iat)
96 dr += sqrttau * dr_diff;
97 rr = tauovermass *
dot(dr_diff, dr_diff);
129 rr = tauovermass *
dot(dr_diff, dr_diff);
149 dr_diff =
dot(Dchol, dr_diff);
150 dr += sqrttau * dr_diff;
179 bool is_accepted =
false;
239 #if !defined(REMOVE_TRACEMANAGER) 245 if (NonLocalMoveAcceptedTemp > 0)
TraceManager * Traces
traces
const BranchEngineType * branchEngine
branch engine, stateless reference to the one in QMCDriver
PropertyContainer_t Properties
scalar properties of a walker
Base class for update methods for each step.
void rejectMove(int iat)
restore to the original state
WFBuffer_t DataSet
buffer for the data for particle-by-particle update
A set of walkers that are to be advanced by Metropolis Monte Carlo.
void copyFromBuffer(ParticleSet &P, WFBufferType &buf)
copy all the wavefunction components from buffer.
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
RealType getPhaseDiff() const
TrialWaveFunction & Psi
trial function
void acceptMove(ParticleSet &P, int iat, bool safe_to_delay=false)
update the state with the new data
DMCUpdatePbyPL2(MCWalkerConfiguration &w, TrialWaveFunction &psi, QMCHamiltonian &h, RandomBase< FullPrecRealType > &rg)
Constructor.
void saveProperty(IT first)
save the values of Hamiltonian elements to the Properties
bool phaseChanged(RealType psi0) const
Tensor< T, 3 > cholesky(const Tensor< T, 3 > &a)
Collection of Local Energy Operators.
void buffer_sample(int current_step)
int first(int igroup) const
return the first index of a group i
int current_step
current MC step
ParticleSet::ParticlePos deltaR
temporary storage for random displacement
RealType updateBuffer(ParticleSet &P, WFBufferType &buf, bool fromscratch=false)
update all the wavefunction components in buffer.
int Age
Age of this walker age is incremented when a walker is not moved after a sweep.
void computeL2DK(ParticleSet &P, int iel, TensorType &D, PosType &K)
compute D matrix and K vector for L2 potential propagator
IndexType nNodeCrossing
Total number of node crossings per block.
int groups() const
return the number of groups
TimerNameList_t< DMCTimers > DMCTimerNames
const PosType & getActivePos() const
double norm(const zVec &c)
WalkerProperties::Indexes WP
FullPrecRealType evaluateWithToperator(ParticleSet &P)
evaluate Local energy with Toperators updated.
QTBase::ValueType ValueType
RealType branchWeight(FullPrecRealType enew, FullPrecRealType eold) const
return the bare branch weight with a filtering using an energy window
~DMCUpdatePbyPL2() override
destructor
void saveWalker(Walker_t &awalker)
save this to awalker
void accept_rejectMove(Index_t iat, bool accepted, bool forward_mode=true)
accept or reject a proposed move Two operation modes: The using and updating distance tables via Part...
void advanceWalker(Walker_t &thisWalker, bool recompute) override
move a walker
void getScaledDriftL2(Tt tau, const TinyVector< TG, D > &qf, const Tensor< T, D > &Dmat, TinyVector< T, D > &Kvec, TinyVector< T, D > &drift)
evaluate a drift with a real force with rescaling for an L2 potential
int last(int igroup) const
return the last index of a group i
MakeReturn< UnaryNode< FnExp, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t exp(const Vector< T1, C1 > &l)
MCWalkerConfiguration & W
walker ensemble
void loadWalker(Walker_t &awalker, bool pbyp)
load a Walker_t to the current ParticleSet
void auxHevaluate(ParticleSet &P)
RealType getPhase() const
MakeReturn< UnaryNode< FnSqrt, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sqrt(const Vector< T1, C1 > &l)
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...
bool has_L2()
determine if L2 potential is present
Class to represent a many-body trial wave function.
RandomBase< FullPrecRealType > & RandomGen
random number generator
GradType evalGrad(ParticleSet &P, int iat)
Indexes
an enum denoting index of physical properties
FullPrecRealType Weight
Weight of the walker.
int makeNonLocalMoves(ParticleSet &P)
make non local moves
Tensor< typename BinaryReturn< T1, T2, OpMultiply >::Type_t, D > dot(const AntiSymTensor< T1, D > &lhs, const AntiSymTensor< T2, D > &rhs)
bool makeMoveAndCheck(Index_t iat, const SingleParticlePos &displ)
move the iat-th particle to active_pos_
QTFull::RealType FullPrecRealType
TimerManager< NewTimer > & getGlobalTimerManager()
IndexType nAccept
counter for number of moves accepted
IndexType nReject
counter for number of moves rejected
FullPrecRealType * getPropertyBase()
void getScaledDrift(Tt tau, const TinyVector< TG, D > &qf, TinyVector< T, D > &drift)
evaluate a drift with a real force
virtual void getDrift(RealType tau, const GradType &qf, PosType &drift) const =0
evaluate a drift with a real force
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
Declaration of a MCWalkerConfiguration.
A container class to represent a walker.
QMCHamiltonian & H
Hamiltonian.
ValueType calcRatioGrad(ParticleSet &P, int iat, GradType &grad_iat)
compute psi(R_new) / psi(R_current) ratio and ln(psi(R_new)) gradients It returns a complex value if...
RealType m_r2max
maximum displacement^2
void donePbyP(bool skipSK=false)
update structure factor and unmark active_ptcl_
void resetProperty(FullPrecRealType logpsi, FullPrecRealType sigN, FullPrecRealType ene)
reset the property of a walker
void computeL2D(ParticleSet &P, int iel, TensorType &D)
compute D matrix for L2 potential propagator
void completeUpdates()
complete all the delayed or asynchronous operations before leaving the p-by-p move region...
IndexType NonLocalMoveAccepted
Total numer of non-local moves accepted.
IndexType nAllRejected
Total number of the steps when all the particle moves are rejected.
const DriftModifierBase * DriftModifier
drift modifer, stateless reference to the one in QMCDriver
void makeGaussRandomWithEngine(ParticleAttrib< TinyVector< T, D >> &a, RG &rng)