12 #ifndef QMCPLUSPLUS_SO_ECPOTENTIAL_H 13 #define QMCPLUSPLUS_SO_ECPOTENTIAL_H 25 class TestSOECPotential;
38 std::string
getClassName()
const override {
return "SOECPotential"; }
59 bool put(xmlNodePtr cur)
override {
return true; }
61 bool get(std::ostream& os)
const override 69 void addComponent(
int groupID, std::unique_ptr<SOECPComponent>&& pp);
84 std::vector<SOECPComponent*>
pp_;
85 std::vector<std::unique_ptr<SOECPComponent>>
ppset_;
92 bool keep_grid =
false);
void evaluateImpl(ParticleSet &elec, bool keep_grid=false)
std::vector< std::unique_ptr< SOECPComponent > > ppset_
const std::string & getName() const
return the name
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
helper functions for EinsplineSetBuilder
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.
QTBase::RealType RealType
ResourceHandle manages the temporary resource referenced from a collection.
Return_t evaluateValueAndDerivatives(ParticleSet &P, const opt_variables_type &optvars, const Vector< ValueType > &dlogpsi, Vector< ValueType > &dhpsioverpsi) override
Evaluate value and derivatives wrt the optimizables.
const bool use_exact_spin_
bool put(xmlNodePtr cur) override
Read the input parameter.
An object of this type is a listener expecting a callback to the report function with a vector of val...
std::vector< std::vector< NLPPJob< RealType > > > sopp_jobs_
void releaseResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
Return a shared resource to a collection.
NeighborLists ion_neighbor_elecs_
neighborlist of ions
~SOECPotential() override
void createResource(ResourceCollection &collection) const override
Initialize a shared resource and hand it to a collection.
int my_table_index_
index of distance table for ion-el pair
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
std::vector< SOECPComponent * > pp_
Specialized paritlce class for atomistic simulations.
class to handle a set of variables that can be modified during optimizations
NeighborLists elec_neighbor_ions_
neighborlist of electrons
void acquireResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
Acquire a shared resource from a collection.
static void mw_evaluateImpl(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, std::optional< ListenerOption< Real >> listeners, bool keep_grid=false)
ResourceHandle< SOECPotentialMultiWalkerResource > mw_res_handle_
int num_ions_
number of ions
void setRandomGenerator(RandomBase< FullPrecRealType > *rng) override
Set the Random Generator object TODO: add docs.
bool dependsOnWaveFunction() const override
return true if this operator depends on a wavefunction
An abstract class for Local Energy operators.
Return_t evaluateDeterministic(ParticleSet &P) override
Evaluate the local energy contribution of this component, deterministically based on current state...
ParticleSet & ion_config_
std::string getClassName() const override
return class name
Class to represent a many-body trial wave function.
void addComponent(int groupID, std::unique_ptr< SOECPComponent > &&pp)
ParticleSet & peln_
reference to the electrons
RandomBase< FullPrecRealType > * my_rng_
SOECPotential(ParticleSet &ions, ParticleSet &els, TrialWaveFunction &psi, bool use_exact_spin)
constructor
Convenience container for common optional element to mw_eval.._impl.
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
BareKineticEnergy::Return_t Return_t
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