18 #ifndef QMCPLUSPLUS_COULOMBPBCAB_H 19 #define QMCPLUSPLUS_COULOMBPBCAB_H 47 std::shared_ptr<LRHandlerType>
AB;
49 std::shared_ptr<const LRHandlerType>
dAB;
65 std::shared_ptr<const RadFunctorType>
V0;
67 std::shared_ptr<const RadFunctorType>
fV0;
69 std::shared_ptr<const RadFunctorType>
dfV0;
78 std::vector<RealType>
Zat;
80 std::vector<RealType>
Qat;
86 std::vector<const RadFunctorType*>
Vat;
88 std::vector<std::shared_ptr<RadFunctorType>>
Vspec;
91 std::vector<const RadFunctorType*>
fVat;
92 std::vector<const RadFunctorType*>
fdVat;
94 std::vector<std::shared_ptr<const RadFunctorType>>
fVspec;
95 std::vector<std::shared_ptr<const RadFunctorType>>
fdVspec;
113 #if !defined(REMOVE_TRACEMANAGER) 136 #if !defined(REMOVE_TRACEMANAGER) 163 bool put(xmlNodePtr cur)
override {
return true; }
165 bool get(std::ostream& os)
const override 184 void add(
int groupID, std::unique_ptr<RadFunctorType>&& ppot);
Array< TraceReal, 1 > * Vi_sample
std::vector< const RadFunctorType * > fdVat
int NumSpeciesB
number of species of B particle set
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
std::shared_ptr< const RadFunctorType > fV0
Radial functor for bare coulomb, optimized for forces.
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
const std::string & getName() const
return the name
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.
Return_t myConst
const energy after breakup
std::vector< const RadFunctorType * > Vat
Short-range potential for each ion.
helper functions for EinsplineSetBuilder
Calculates the AA Coulomb potential using PBCs.
Array< TraceReal, 1 > Vi_const
std::shared_ptr< LRHandlerType > AB
long-range Handler. Should be const LRHandlerType eventually
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
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
Soa Container for D-dim vectors.
std::vector< std::shared_ptr< RadFunctorType > > Vspec
Short-range potential for each species.
Declaration of OperatorBase.
std::string getClassName() const override
return class name
An object of this type is a listener expecting a callback to the report function with a vector of val...
std::vector< std::shared_ptr< const RadFunctorType > > fVspec
Vectorized record engine for scalar properties.
LRHandlerType::mRealType mRealType
Vector< RealType > LRpart
long-range per particle
bool ComputeForces
Flag for whether to compute forces or not.
Attaches a unit to a Vector for IO.
const int myTableIndex
locator of the distance table
std::shared_ptr< const RadFunctorType > V0
Always mave a radial functor for the bare coulomb.
std::shared_ptr< const RadFunctorType > dfV0
Radial functor for derivative of bare coulomb, optimized for forces.
Decalaration of One-Dimesional grids.
std::vector< std::shared_ptr< const RadFunctorType > > fdVspec
Array< TraceReal, 1 > * Ve_sample
RealType LRtmp
long-range part for the moved particle
Specialized paritlce class for atomistic simulations.
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
int NptclB
number of particles of B
RealType myRcut
cutoff radius of the short-range part
void createResource(ResourceCollection &collection) const override
initialize a shared resource and hand it to a collection
Return_t evaluate_sp(ParticleSet &P)
void initBreakup(ParticleSet &P)
Creates the long-range handlers, then splines and stores it by particle and species for quick evaluat...
int NptclA
number of particles of A
OneDimCubicSpline< pRealType > RadFunctorType
LRHandlerBase LRHandlerType
Array< TraceReal, 1 > Ve_const
void checkoutParticleQuantities(TraceManager &tm) override
void setParticleSetF(QMCTraits::PropertySetType &plist, int offset)
int NumSpeciesA
number of species of A particle set
std::vector< RealType > Qspec
Qspec[spec] charge for the spec-th species of B.
ParticleSet & pset_ions_
source particle set
void add(int groupID, std::unique_ptr< RadFunctorType > &&ppot)
Adds a local pseudopotential channel "ppot" to all source species of type "groupID".
Vector< RealType > SRpart
short-range per particle
std::vector< int > NofSpeciesA
number of particles per species of A
void evalPerParticleConsts(Vector< RealType > &pp_consts_src, Vector< RealType > &pp_consts_trg) const
Compute the const part of the per particle coulomb AB potential.
CoulombPBCAB(ParticleSet &ions, ParticleSet &elns, bool computeForces=false)
An abstract class for Local Energy operators.
FullPrecRealType Return_t
type of return value of evaluate
std::vector< const RadFunctorType * > fVat
Short-range potential (r*V) and potential derivative d/dr(rV) derivative for each ion Required for fo...
ResourceHandle< CoulombPBCABMultiWalkerResource > mw_res_handle_
virtual void setParticlePropertyList(PropertySetType &plist, int offset)
void setObservablesF(QMCTraits::PropertySetType &plist)
Return_t evalLRwithForces(ParticleSet &P)
Computes the long-range contribution to the coulomb energy and forces.
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 > Qat
Qat[iat] charge for the iat-th particle of B.
std::vector< RealType > Zspec
Zspec[spec] charge for the spec-th species of A.
std::vector< RealType > Zat
Zat[iat] charge for the iat-th particle of A.
std::shared_ptr< const LRHandlerType > dAB
long-range derivative handler
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...
const ParticleSet & getSourcePSet() const
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 ...
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
void contributeParticleQuantities() override
RealType SRtmp
short-range part for the moved particle
LinearGrid< pRealType > GridType
void informOfPerParticleListener() override
Call to inform objects associated with this operator of per particle listeners.
Return_t evalLR(ParticleSet &P)
Computes the long-range contribution to the coulomb energy.
std::vector< int > NofSpeciesB
number of particles per species of B
void setParticlePropertyList(PropertySetType &plist, int offset) override
Return_t evalSR(ParticleSet &P)
Computes the short-range contribution to the coulomb energy.
BareKineticEnergy::Return_t Return_t
Return_t evalSRwithForces(ParticleSet &P)
Computes the short-range contribution to the coulomb energy and forces.
void deleteParticleQuantities() override
Return_t evalConsts(const ParticleSet &P, bool report=true)
Evaluates madelung and background contributions to total energy.
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
bool put(xmlNodePtr cur) override
Do nothing.