35 std::unique_ptr<Resource>
makeClone()
const override 37 return std::make_unique<NonLocalECPotentialMultiWalkerResource>(*this);
63 ComputeForces(computeForces),
66 ElecNeighborIons(els),
67 IonNeighborElecs(ions),
81 for (
size_t ig = 0; ig < els.
groups(); ig++)
90 #if !defined(REMOVE_TRACEMANAGER) 157 std::optional<ListenerOption<Real>> l_opt(std::in_place, listeners, listeners_ions);
168 std::optional<ListenerOption<Real>> l_opt(std::in_place, listeners, listeners_ions);
181 #if !defined(REMOVE_TRACEMANAGER) 190 for (
int ipp = 0; ipp <
PPset.size(); ipp++)
198 for (
int iat = 0; iat <
NumIons; iat++)
206 for (
int ig = 0; ig < P.
groups(); ++ig)
209 for (
int jel = P.
first(ig); jel < P.
last(ig); ++jel)
211 const auto& dist = myTable.getDistRow(jel);
212 const auto& displ = myTable.getDisplRow(jel);
214 for (
int iat = 0; iat <
NumIons; iat++)
215 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
217 Real pairpot =
PP[iat]->evaluateOneWithForces(P, iat,
Psi, jel, dist[iat], -displ[iat],
forces_[iat]);
221 NeighborIons.push_back(iat);
229 for (
int ig = 0; ig < P.
groups(); ++ig)
232 for (
int jel = P.
first(ig); jel < P.
last(ig); ++jel)
234 const auto& dist = myTable.getDistRow(jel);
235 const auto& displ = myTable.getDisplRow(jel);
237 for (
int iat = 0; iat <
NumIons; iat++)
238 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
240 Real pairpot =
PP[iat]->evaluateOne(P, iat,
Psi, jel, dist[iat], -displ[iat],
use_DLA);
245 NeighborIons.push_back(iat);
250 Ve_samp(jel) += 0.5 * pairpot;
251 Vi_samp(iat) += 0.5 * pairpot;
258 #if !defined(TRACE_CHECK) 264 Real Vsum = Vesum + Visum;
267 app_log() <<
"accumtest: NonLocalECPotential::evaluate()" << std::endl;
268 app_log() <<
"accumtest: tot:" << Vnow << std::endl;
269 app_log() <<
"accumtest: sum:" << Vsum << std::endl;
274 app_log() <<
"sharetest: NonLocalECPotential::evaluate()" << std::endl;
275 app_log() <<
"sharetest: e share:" << Vesum << std::endl;
276 app_log() <<
"sharetest: i share:" << Visum << std::endl;
292 const size_t nw = o_list.size();
294 if (O_leader.ComputeForces)
295 APP_ABORT(
"NonLocalECPotential::mw_evaluateImpl(): Forces not imlpemented\n");
297 for (
size_t iw = 0; iw < nw; iw++)
306 for (
int ipp = 0; ipp < O.PPset.size(); ipp++)
311 const auto& myTable = P.getDistTableAB(O.myTableIndex);
313 for (
int iat = 0; iat < O.NumIons; iat++)
314 O.IonNeighborElecs.getNeighborList(iat).clear();
315 for (
int jel = 0; jel < P.getTotalNum(); jel++)
316 O.ElecNeighborIons.getNeighborList(jel).clear();
318 for (
int ig = 0; ig < P.groups(); ++ig)
320 auto& joblist = O.nlpp_jobs[ig];
323 for (
int jel = P.first(ig); jel < P.last(ig); ++jel)
325 const auto& dist = myTable.getDistRow(jel);
326 const auto& displ = myTable.getDisplRow(jel);
327 std::vector<int>& NeighborIons = O.ElecNeighborIons.getNeighborList(jel);
328 for (
int iat = 0; iat < O.NumIons; iat++)
329 if (O.PP[iat] !=
nullptr && dist[iat] < O.PP[iat]->getRmax())
331 NeighborIons.push_back(iat);
332 O.IonNeighborElecs.getNeighborList(iat).push_back(jel);
333 joblist.emplace_back(iat, jel, dist[iat], -displ[iat]);
343 auto& ve_samples = O_leader.mw_res_handle_.getResource().ve_samples;
344 auto& vi_samples = O_leader.mw_res_handle_.getResource().vi_samples;
345 ve_samples.resize(nw, pset_leader.getTotalNum());
346 vi_samples.resize(nw, O_leader.IonConfig.getTotalNum());
350 auto pp_component = std::find_if(O_leader.PPset.begin(), O_leader.PPset.end(), [](
auto& ptr) {
return bool(ptr); });
351 assert(pp_component != std::end(O_leader.PPset));
358 assert(&O_leader.Psi == &wf_list.
getLeader());
359 for (
size_t iw = 0; iw < nw; iw++)
363 std::vector<Real> pairpots(nw);
365 ecp_potential_list.reserve(nw);
366 ecp_component_list.reserve(nw);
367 pset_list.reserve(nw);
368 psi_list.reserve(nw);
369 batch_list.reserve(nw);
371 for (
int ig = 0; ig < pset_leader.groups(); ++ig)
376 size_t max_num_jobs = 0;
377 for (
size_t iw = 0; iw < nw; iw++)
380 max_num_jobs = std::max(max_num_jobs, O.
nlpp_jobs[ig].size());
383 for (
size_t jobid = 0; jobid < max_num_jobs; jobid++)
385 ecp_potential_list.clear();
386 ecp_component_list.clear();
390 for (
size_t iw = 0; iw < nw; iw++)
393 if (jobid < O.nlpp_jobs[ig].size())
395 const auto& job = O.
nlpp_jobs[ig][jobid];
396 ecp_potential_list.push_back(O);
397 ecp_component_list.push_back(*O.PP[job.ion_id]);
398 pset_list.push_back(p_list[iw]);
399 psi_list.push_back(wf_list[iw]);
400 batch_list.push_back(job);
405 O_leader.mw_res_handle_.getResource().collection, O_leader.use_DLA);
410 for (
size_t j = 0; j < ecp_potential_list.size(); j++)
412 ecp_potential_list[j].get().value_ += pairpots[j];
414 ecp_component_list[j].contributeTxy(batch_list[j].
get().electron_id, ecp_potential_list[j].
get().
tmove_xy_);
418 auto& ve_samples = O_leader.mw_res_handle_.getResource().ve_samples;
419 auto& vi_samples = O_leader.mw_res_handle_.getResource().vi_samples;
422 ve_samples(iw, batch_list[j].
get().electron_id) += pairpots[j];
423 vi_samples(iw, batch_list[j].
get().ion_id) += pairpots[j];
426 #ifdef DEBUG_NLPP_BATCHED 428 ecp_component_list[j].evaluateOne(pset_list[j], batch_list[j].
get().ion_id, psi_list[j],
429 batch_list[j].
get().electron_id, batch_list[j].
get().ion_elec_dist,
430 batch_list[j].
get().ion_elec_displ, O_leader.use_DLA);
431 if (
std::abs(check_value - pairpots[j]) > 1
e-5)
432 std::cout <<
"check " << check_value <<
" wrong " << pairpots[j] <<
" diff " 433 <<
std::abs(check_value - pairpots[j]) << std::endl;
443 auto& ve_samples = O_leader.mw_res_handle_.getResource().ve_samples;
444 auto& vi_samples = O_leader.mw_res_handle_.getResource().vi_samples;
445 int num_electrons = pset_leader.getTotalNum();
446 for (
int iw = 0; iw < nw; ++iw)
448 Vector<Real> ve_sample(ve_samples.begin(iw), num_electrons);
449 Vector<Real> vi_sample(vi_samples.begin(iw), O_leader.NumIons);
451 listener.
report(iw, O_leader.getName(), ve_sample);
453 listener.
report(iw, O_leader.getName(), vi_sample);
479 for (
int ipp = 0; ipp <
PPset.size(); ipp++)
486 for (
int iat = 0; iat <
NumIons; iat++)
491 for (
int ig = 0; ig < P.
groups(); ++ig)
494 for (
int jel = P.
first(ig); jel < P.
last(ig); ++jel)
496 const auto& dist = myTable.getDistRow(jel);
497 const auto& displ = myTable.getDisplRow(jel);
499 for (
int iat = 0; iat <
NumIons; iat++)
500 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
503 PP[iat]->evaluateOneWithForces(P, ions, iat,
Psi, jel, dist[iat], -displ[iat],
forces_[iat],
PulayTerm);
506 NeighborIons.push_back(iat);
543 const auto& dist = myTable.getDistRow(ref_elec);
544 const auto& displ = myTable.getDisplRow(ref_elec);
545 for (
int atom_index = 0; atom_index < NeighborIons.size(); atom_index++)
547 const int iat = NeighborIons[atom_index];
548 PP[iat]->evaluateOne(P, iat,
Psi, ref_elec, dist[iat], -displ[iat],
use_DLA);
555 std::vector<ValueMatrix>&
B)
557 bool keepGrid =
true;
558 for (
int ipp = 0; ipp <
PPset.size(); ipp++)
566 for (
int iat = 0; iat <
NumIons; iat++)
571 for (
int ig = 0; ig < P.
groups(); ++ig)
573 for (
int jel = P.
first(ig); jel < P.
last(ig); ++jel)
575 const auto& dist = myTable.getDistRow(jel);
576 const auto& displ = myTable.getDisplRow(jel);
578 for (
int iat = 0; iat <
NumIons; iat++)
579 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
581 PP[iat]->evaluateOneBodyOpMatrixContribution(P, iat, psi, jel, dist[iat], -displ[iat],
B);
582 NeighborIons.push_back(iat);
592 const int iat_source,
593 std::vector<std::vector<ValueMatrix>>& Bforce)
595 bool keepGrid =
true;
596 for (
int ipp = 0; ipp <
PPset.size(); ipp++)
604 for (
int iat = 0; iat <
NumIons; iat++)
609 for (
int ig = 0; ig < P.
groups(); ++ig)
611 for (
int jel = P.
first(ig); jel < P.
last(ig); ++jel)
613 const auto& dist = myTable.getDistRow(jel);
614 const auto& displ = myTable.getDisplRow(jel);
616 for (
int iat = 0; iat <
NumIons; iat++)
617 if (
PP[iat] !=
nullptr && dist[iat] <
PP[iat]->getRmax())
619 PP[iat]->evaluateOneBodyOpMatrixdRContribution(P, source, iat, iat_source, psi, jel, dist[iat], -displ[iat],
621 NeighborIons.push_back(iat);
629 int NonLocalMoveAccepted = 0;
630 auto& RandomGen(*
myRNG);
637 const int iat = oneTMove->
PID;
644 NonLocalMoveAccepted++;
652 for (
int ig = 0; ig < P.
groups(); ++ig)
655 for (
int iat = P.
first(ig); iat < P.
last(ig); ++iat)
665 NonLocalMoveAccepted++;
677 for (
int ig = 0; ig < P.
groups(); ++ig)
680 for (
int iat = P.
first(ig); iat < P.
last(ig); ++iat)
699 NonLocalMoveAccepted++;
706 if (NonLocalMoveAccepted > 0)
713 return NonLocalMoveAccepted;
719 for (
int iat = 0; iat <
NumIons; iat++)
721 if (
PP[iat] ==
nullptr)
723 Real old_distance = 0.0;
724 Real new_distance = 0.0;
729 if (old_distance <
PP[iat]->getRmax() && new_distance >=
PP[iat]->getRmax())
733 auto iter_at = std::find(NeighborIons.begin(), NeighborIons.end(), iat);
734 auto iter_el = std::find(NeighborElecs.begin(), NeighborElecs.end(), iel);
735 *iter_at = NeighborIons.back();
736 *iter_el = NeighborElecs.back();
737 NeighborIons.pop_back();
738 NeighborElecs.pop_back();
742 if (old_distance >=
PP[iat]->getRmax() && new_distance <
PP[iat]->getRmax())
746 NeighborElecs.push_back(iel);
747 NeighborIons.push_back(iat);
750 if (moved || (old_distance <
PP[iat]->getRmax() && new_distance <
PP[iat]->getRmax()))
753 for (
int jel = 0; jel < NeighborElecs.size(); ++jel)
761 for (
int iat = 0; iat <
PP.size(); iat++)
763 PP[iat] = ppot.get();
764 PPset[groupID] = std::move(ppot);
769 auto new_res = std::make_unique<NonLocalECPotentialMultiWalkerResource>();
770 for (
int ig = 0; ig <
PPset.size(); ++ig)
773 PPset[ig]->getVP()->createResource(new_res->collection);
777 auto resource_index = collection.
addResource(std::move(new_res));
796 std::unique_ptr<NonLocalECPotential> myclone =
798 for (
int ig = 0; ig <
PPset.size(); ++ig)
800 myclone->addComponent(ig, std::make_unique<NonLocalECPComponent>(*
PPset[ig], qp));
812 for (
int iat = 0; iat <
n_nuc_; iat++)
816 std::ostringstream obsName1, obsName2;
818 <<
"_" << iat <<
"_" << x;
819 plist.
add(obsName1.str());
829 using namespace std::string_literals;
834 std::vector<int> ndim(2);
837 h5list.push_back({{
"FNL"s}});
838 auto& h5o1 = h5list.back();
849 for (
int iat = 0; iat <
n_nuc_; iat++)
853 plist[index++] =
forces_[iat][x];
867 for (
int iat = 0; iat <
n_nuc_; iat++)
871 plist[index++] =
forces_[iat][x];
Array< TraceReal, 1 > * Vi_sample
void resize(size_type n, Type_t val=Type_t())
Resize the container.
void twoBodyQuantumDomain(const ParticleSet &P)
set quantum domain for two-body operator
void groupByElectron(size_t num_elec, const std::vector< NonLocalData > &txy)
sort all the Txy elements by electron
bool streaming_particles_
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
ResourceCollection collection
size_t addResource(std::unique_ptr< Resource > &&res, bool noprint=false)
virtual void registerObservables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->va...
void takebackResource(ResourceHandle< RS > &res_handle)
Return_t evaluateWithToperator(ParticleSet &P) override
Evaluate the local energy contribution of this component with Toperators updated if requested...
helper functions for EinsplineSetBuilder
bool streaming_array(const std::string &name)
const DistRow & getDistRow(int iel) const
return a row of distances for a given target particle
ParticleSet::ParticlePos forces_
std::vector< NonLocalData > tmove_xy_
MakeReturn< UnaryNode< FnFabs, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t abs(const Vector< T1, C1 > &l)
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
size_t getTotalNum() const
void acceptMove(ParticleSet &P, int iat, bool safe_to_delay=false)
update the state with the new data
static void mw_prepareGroup(const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, int ig)
batched version of prepareGroup
void acquireResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
acquire a shared resource from a collection
void releaseResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
return a shared resource to a collection
An object of this type is a listener expecting a callback to the report function with a vector of val...
void evaluateOneBodyOpMatrixForceDeriv(ParticleSet &P, ParticleSet &source, const TWFFastDerivWrapper &psi, const int iat, std::vector< std::vector< ValueMatrix >> &Bforce) override
Evaluate "dB/dR" matrices for observable.
ParticleSet & IonConfig
reference to the center ion
int first(int igroup) const
return the first index of a group i
Vectorized record engine for scalar properties.
std::vector< NonLocalECPComponent * > PP
the set of local-potentials (one for each ion)
int myTableIndex
index of distance table for the ion-el pair
~NonLocalECPotential() override
NonLocalTOperator nonLocalOps
non local operator
bool ComputeForces
true if we should compute forces
Attaches a unit to a Vector for IO.
TWFFastDerivWrapper is a wrapper class for TrialWavefunction that provides separate and low level acc...
void registerObservables(std::vector< ObservableHelper > &h5list, hdf_archive &file) const override
add to observable descriptor for hdf5 The default implementation is to register a scalar for this->va...
TraceRequest request_
whether traces are being collected
ParticleIndex GroupID
Species ID.
ResourceHandle< NonLocalECPotentialMultiWalkerResource > mw_res_handle_
mult walker shared resource
std::unique_ptr< Resource > makeClone() const override
int getTotalNum() const
return the number of species
const DistanceTableAB & getDistTableAB(int table_ID) const
get a distance table by table_ID and dyanmic_cast to DistanceTableAB
int groups() const
return the number of groups
int addTable(const ParticleSet &psrc, DTModes modes=DTModes::ALL_OFF)
add a distance table
Array< TraceReal, 1 > * Ve_sample
single particle trace samples
std::string name_
name of this object
Specialized paritlce class for atomistic simulations.
void evaluateOneBodyOpMatrix(ParticleSet &P, const TWFFastDerivWrapper &psi, std::vector< ValueMatrix > &B) override
Evaluate "B" matrix for observable.
int makeNonLocalMovesPbyP(ParticleSet &P)
make non local moves with particle-by-particle moves
void createResource(ResourceCollection &collection) const override
initialize a shared resource and hand it to a collection
Matrix< Real > ve_samples
a crowds worth of per particle nonlocal ecp potential values
static void mw_evaluateImpl(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, bool Tmove, std::optional< ListenerOption< Real >> listeners, bool keepGrid=false)
the actual implementation for batched walkers, used by mw_evaluate, mw_evaluateWithToperator mw_evalu...
QTBase::ValueType ValueType
ParticleSet & Peln
reference to the electrons
const DistRow & getTempDists() const
return the temporary distances when a move is proposed
void computeOneElectronTxy(ParticleSet &P, const int ref_elec)
compute the T move transition probability for a given electron member variable nonLocalOps.Txy is updated
int add(const std::string &aname)
AB type of DistanceTable containing storage.
void mw_evaluate(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const override
Evaluate the contribution of this component of multiple walkers.
static void mw_evaluateOne(const RefVectorWithLeader< NonLocalECPComponent > &ecp_component_list, const RefVectorWithLeader< ParticleSet > &p_list, const RefVectorWithLeader< TrialWaveFunction > &psi_list, const RefVector< const NLPPJob< RealType >> &joblist, std::vector< RealType > &pairpots, ResourceCollection &collection, bool use_DLA)
Evaluate the nonlocal pp contribution via randomized quadrature grid to total energy from ion "iat" a...
CASTTYPE & getCastedElement(size_t i) const
int groupsize(int igroup) const
return the size of a group
void addComponent(int groupID, std::unique_ptr< NonLocalECPComponent > &&pp)
RandomBase< FullPrecRealType > * myRNG
random number generator
NonLocalECPotentialMultiWalkerResource()
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
void checkoutParticleQuantities(TraceManager &tm) override
int last(int igroup) const
return the last index of a group i
void setEnergyDomain(EnergyDomains edomain)
Set the Energy Domain.
void evaluateImpl(ParticleSet &P, bool Tmove, bool keepGrid=false)
the actual implementation, used by evaluate and evaluateWithToperator
NeighborLists IonNeighborElecs
neighborlist of ions
void addValue(PropertySetType &plist)
named values to the property list
Matrix< Real > vi_samples
QMCTraits::TensorType generateRandomRotationMatrix(RandomBase< QMCTraits::FullPrecRealType > &rng)
Create a random 3D rotation matrix using a random generator.
SpeciesSet & getSpeciesSet()
retrun the SpeciesSet of this particle set
Array< TraceReal, D > * checkout_real(const std::string &name, int n1=1, int n2=0, int n3=0, int n4=0)
NonLocalECPotential(ParticleSet &ions, ParticleSet &els, TrialWaveFunction &psi, bool computeForces, bool enable_DLA)
constructor
FullPrecRealType Return_t
type of return value of evaluate
std::vector< std::reference_wrapper< T > > RefVector
CASTTYPE & getCastedLeader() const
bool use_DLA
true, determinant localization approximation(DLA) is enabled
Return_t evaluateWithIonDerivs(ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase...
virtual void setParticlePropertyList(PropertySetType &plist, int offset)
Evaluate the semi local potentials.
NeighborLists ElecNeighborIons
neighborlist of electrons
Class to represent a many-body trial wave function.
void addObservables(PropertySetType &plist, BufferType &collectables) override
named values to the property list Default implementaton uses addValue(plist_)
Return_t value_
current value
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
void markAffectedElecs(const DistanceTableAB &myTable, int iel)
mark all the electrons affected by Tmoves and update ElecNeighborIons and IonNeighborElecs ...
std::vector< std::vector< NLPPJob< Real > > > nlpp_jobs
NLPP job list of ion-electron pairs by spin group.
void mw_evaluateWithToperator(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list) const override
Evaluate the contribution of this component of multiple walkers.
std::vector< bool > elecTMAffected
ture if an electron is affected by other electrons moved by T-moves
void contribute_array(const std::string &name, bool default_quantity=false)
int NumIons
number of ions
const NonLocalData * selectMove(RealType prob, const std::vector< NonLocalData > &txy)
select the move for a given probability
Return_t evaluateWithIonDerivsDeterministic(ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms) override
Evaluate contribution to local energy and derivatives w.r.t ionic coordinates from OperatorBase...
bool makeMoveAndCheck(Index_t iat, const SingleParticlePos &displ)
move the iat-th particle to active_pos_
std::vector< int > & getNeighborList(int source)
get the neighbor list of the source particle
virtual void setObservables(PropertySetType &plist)
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Return_t evaluateDeterministic(ParticleSet &P) override
Evaluate the local energy contribution of this component, deterministically based on current state...
ResourceHandle< RS > lendResource()
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
void contributeParticleQuantities() override
double B(double x, int k, int i, const std::vector< double > &t)
std::vector< std::unique_ptr< NonLocalECPComponent > > PPset
unique NonLocalECPComponent to remove
ParticleSet::ParticlePos PulayTerm
Pulay force vector.
void prepareGroup(ParticleSet &P, int ig)
Prepare internal data for updating WFC correspond to a particle group Particle groups usually corresp...
void acceptMove(Index_t iat)
accept the move and update the particle attribute by the proposed move in regular mode ...
void evalIonDerivsImpl(ParticleSet &P, ParticleSet &ions, TrialWaveFunction &psi, ParticleSet::ParticlePos &hf_terms, ParticleSet::ParticlePos &pulay_terms, bool keepGrid=false)
void mw_evaluatePerParticleWithToperator(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< Real >> &listeners, const std::vector< ListenerVector< Real >> &listeners_ions) const override
void setParticlePropertyList(PropertySetType &plist, int offset) override
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...
void donePbyP(bool skipSK=false)
update structure factor and unmark active_ptcl_
Convenience container for common optional element to mw_eval.._impl.
TrialWaveFunction & Psi
target TrialWaveFunction
std::bitset< 8 > update_mode_
set the current update mode
void completeUpdates()
complete all the delayed or asynchronous operations before leaving the p-by-p move region...
int getGroupID(int iat) const
return the group id of a given particle in the particle set.
void deleteParticleQuantities() override
void mw_evaluatePerParticle(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< Real >> &listeners, const std::vector< ListenerVector< Real >> &listeners_ions) const override