QMCPACK
LocalECPotential.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 // Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 // Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
11 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
12 //
13 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
14 //////////////////////////////////////////////////////////////////////////////////////
15 
16 
17 #ifndef QMCPLUSPLUS_LOCALECPPOTENTIAL_H
18 #define QMCPLUSPLUS_LOCALECPPOTENTIAL_H
19 #include "Particle/ParticleSet.h"
25 #include "Particle/DistanceTable.h"
26 
27 namespace qmcplusplus
28 {
29 /** @ingroup hamiltonian
30  * \brief Evaluate the local potentials (either pseudo or full core) around each ion.
31  */
32 
34 {
37 
38  ///reference to the ionic configuration
40  ///the number of ioncs
41  int NumIons;
42  ///distance table index
44  ///temporary energy per particle for pbyp move
46  ///unique set of local ECP to cleanup
47  std::vector<std::unique_ptr<RadialPotentialType>> PPset;
48  ///PP[iat] is the local potential for the iat-th particle
49  std::vector<RadialPotentialType*> PP;
50  ///effective charge per ion
51  std::vector<RealType> Zeff;
52  ///effective charge per species
53  std::vector<RealType> gZeff;
54  ///energy per particle
56 #if !defined(REMOVE_TRACEMANAGER)
57  ///single particle trace samples
60 #endif
61  const ParticleSet& Peln;
62  const ParticleSet& Pion;
63 
64  LocalECPotential(const ParticleSet& ions, ParticleSet& els);
65 
66  std::string getClassName() const override { return "LocalECPotential"; }
67  void resetTargetParticleSet(ParticleSet& P) override;
68 
69 #if !defined(REMOVE_TRACEMANAGER)
70  void contributeParticleQuantities() override;
71  void checkoutParticleQuantities(TraceManager& tm) override;
72  Return_t evaluate_sp(ParticleSet& P); //collect
73  void deleteParticleQuantities() override;
74 #endif
75 
76  Return_t evaluate(ParticleSet& P) override;
77 
79  ParticleSet& ions,
80  TrialWaveFunction& psi,
81  ParticleSet::ParticlePos& hf_terms,
82  ParticleSet::ParticlePos& pulay_terms) override;
83 
84 
86 
87  bool put(xmlNodePtr cur) override { return true; }
88 
89  bool get(std::ostream& os) const override
90  {
91  os << "LocalECPotential: " << IonConfig.getName();
92  return true;
93  }
94 
95  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) override;
96 
97  /** Add a RadialPotentialType of a species
98  * @param groupID index of the ion species
99  * @param ppot local pseudopotential
100  * @param z effective charge of groupID particle
101  */
102  void add(int groupID, std::unique_ptr<RadialPotentialType>&& ppot, RealType z);
103 };
104 } // namespace qmcplusplus
105 #endif
Array< TraceReal, 1 > * Vi_sample
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
const std::string & getName() const
return the name
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
Declaration of OperatorBase.
std::string getClassName() const override
return class name
std::vector< RealType > Zeff
effective charge per ion
const ParticleSet & IonConfig
reference to the ionic configuration
int myTableIndex
distance table index
Attaches a unit to a Vector for IO.
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Return_t evaluate_sp(ParticleSet &P)
An abstract base class to implement a One-Dimensional grid.
Decalaration of One-Dimesional grids.
Array< TraceReal, 1 > * Ve_sample
single particle trace samples
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::vector< std::unique_ptr< RadialPotentialType > > PPset
unique set of local ECP to cleanup
Evaluate the local potentials (either pseudo or full core) around each ion.
LocalECPotential(const ParticleSet &ions, ParticleSet &els)
std::vector< RadialPotentialType * > PP
PP[iat] is the local potential for the iat-th particle.
Return_t evaluate_orig(ParticleSet &P)
RealType PPtmp
temporary energy per particle for pbyp move
void checkoutParticleQuantities(TraceManager &tm) override
void add(int groupID, std::unique_ptr< RadialPotentialType > &&ppot, RealType z)
Add a RadialPotentialType of a species.
std::vector< RealType > gZeff
effective charge per species
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
Class to represent a many-body trial wave function.
Vector< RealType > PPart
energy per particle
int NumIons
the number of ioncs
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
void contributeParticleQuantities() override
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...
BareKineticEnergy::Return_t Return_t
void deleteParticleQuantities() override
bool put(xmlNodePtr cur) override
Read the input parameter.