18 #ifndef QMCPLUSPLUS_COULOMBPBCAA_H 19 #define QMCPLUSPLUS_COULOMBPBCAA_H 30 class OneDimCubicSplineLinearGrid;
47 std::shared_ptr<LRHandlerType>
AA;
49 std::shared_ptr<const RadFunctorType>
rVs;
53 std::shared_ptr<const LRHandlerType>
dAA;
55 std::shared_ptr<const RadFunctorType>
rVsforce;
70 std::shared_ptr<Vector<RealType, OffloadPinnedAllocator<RealType>>>
Zat_offload;
83 #if !defined(REMOVE_TRACEMANAGER) 96 std::string
getClassName()
const override {
return "CoulombPBCAA"; }
125 bool put(xmlNodePtr cur)
override {
return true; }
127 bool get(std::ostream& os)
const override 140 #if !defined(REMOVE_TRACEMANAGER) void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
Calculates the AA Coulomb potential using PBCs.
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...
One-Dimensional linear-grid.
const bool use_offload_
if true use offload
helper functions for EinsplineSetBuilder
std::shared_ptr< Vector< RealType, OffloadPinnedAllocator< RealType > > > Zat_offload
const int d_aa_ID
AA table ID.
NewTimer & evalLR_timer_
Timer for long range.
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Array< TraceReal, 1 > V_const
void acquireResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
acquire a shared resource from a collection
ResourceHandle manages the temporary resource referenced from a collection.
void releaseResource(ResourceCollection &collection, const RefVectorWithLeader< OperatorBase > &o_list) const override
return a shared resource to a collection
EwaldHandler3D::mRealType mRealType
NewTimer & evalSR_timer_
Timer for long range.
std::shared_ptr< const RadFunctorType > rVs
energy-optimized short range pair potential
Declaration of OperatorBase.
std::string getClassName() const override
return class name
Return_t evalSR(ParticleSet &P)
void updateSource(ParticleSet &s) override
Update data associated with a particleset.
An object of this type is a listener expecting a callback to the report function with a vector of val...
Timer accumulates time and call counts.
Vectorized record engine for scalar properties.
std::vector< int > SpeciesID
LRHandlerType::mRealType mRealType
Return_t evalLR(ParticleSet &P)
std::shared_ptr< const LRHandlerType > dAA
force-optimized long range handle
bool ComputeForces
Flag for whether to compute forces or not.
Attaches a unit to a Vector for IO.
std::shared_ptr< const RadFunctorType > rVsforce
force-optimized short range pair potential
Return_t evalSRwithForces(ParticleSet &P)
Specialized paritlce class for atomistic simulations.
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
RealType myRcut
cutoff radius of the short-range part
std::shared_ptr< const OffloadSpline > rVs_offload
the same as rVs but can be used inside OpenMP offload regions
void createResource(ResourceCollection &collection) const override
initialize a shared resource and hand it to a collection
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.
RealType madelung_constant_
NewTimer & offload_timer_
Timer for offload part.
ResourceHandle< CoulombPBCAAMultiWalkerResource > mw_res_handle_
RealType get_madelung_constant() const
combined OneDimCubicSpline and LinearGrid OneDimCubicSpline contains OneDimGridBase pointer and calls...
void initBreakup(ParticleSet &P)
constructor code factored out
Return_t evalConsts(bool report=true)
OneDimCubicSpline< pRealType > RadFunctorType
LRHandlerBase LRHandlerType
void checkoutParticleQuantities(TraceManager &tm) override
void setParticleSetF(QMCTraits::PropertySetType &plist, int offset)
const bool quasi2d
Flag for whether to use quasi-2D Ewald.
Vector< ComplexType > del_eikr
An abstract class for Local Energy operators.
FullPrecRealType Return_t
type of return value of evaluate
std::shared_ptr< LRHandlerType > AA
energy-optimized long range handle. Should be const LRHandlerType eventually
virtual void setParticlePropertyList(PropertySetType &plist, int offset)
void setObservablesF(QMCTraits::PropertySetType &plist)
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_)
std::vector< RealType > Zspec
std::vector< RealType > Zat
Array< TraceReal, 1 > * V_sample
Define a LRHandler with two template parameters.
base class for LRHandlerTemp<FUNC,BASIS> and DummyLRHanlder<typename Func>
virtual void setObservables(PropertySetType &plist)
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
static std::vector< Return_t > mw_evalSR_offload(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< ParticleSet > &p_list)
void mw_evaluatePerParticle(const RefVectorWithLeader< OperatorBase > &o_list, const RefVectorWithLeader< TrialWaveFunction > &wf_list, const RefVectorWithLeader< ParticleSet > &p_list, const std::vector< ListenerVector< RealType >> &listeners, const std::vector< ListenerVector< RealType >> &ion_listeners) const override
Evaluate the contribution of this component of multiple walkers per particle reporting to registered ...
void contributeParticleQuantities() override
LinearGrid< pRealType > GridType
Return_t evalLRwithForces(ParticleSet &P)
void informOfPerParticleListener() override
Inform objects associated with this operator of per particle listeners.
std::vector< int > NofSpecies
Return_t evaluate_sp(ParticleSet &P)
void setParticlePropertyList(PropertySetType &plist, int offset) override
CoulombPBCAA(ParticleSet &ref, bool active, bool computeForces, bool use_offload)
constructor
BareKineticEnergy::Return_t Return_t
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
void evalPerParticleConsts(Vector< RealType > &pp_consts) const
Compute the const part of the per particle coulomb self interaction potential.
void deleteParticleQuantities() override
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
bool put(xmlNodePtr cur) override
Do nothing.