QMCPACK
ForceChiesaPBCAA.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: Raymond Clay III, j.k.rofling@gmail.com, Lawrence Livermore National Laboratory
8 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 //
10 // File created by: Raymond Clay III, j.k.rofling@gmail.com, Lawrence Livermore National Laboratory
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 #ifndef QMCPLUSPLUS_FORCE_CHIESA_HAMILTONIAN_H
15 #define QMCPLUSPLUS_FORCE_CHIESA_HAMILTONIAN_H
22 
23 namespace qmcplusplus
24 {
25 struct ForceChiesaPBCAA : public OperatorBase, public ForceBase
26 {
30 
31  RealType Rcut; // parameter: radial distance within which estimator is used
32  int m_exp; // parameter: exponent in polynomial fit
33  int N_basis; // parameter: size of polynomial basis set
34  Matrix<RealType> Sinv; // terms in fitting polynomial
35  Vector<RealType> h; // terms in fitting polynomial
36  Vector<RealType> c; // polynomial coefficients
37  // container for short-range force estimator
38 
39  ///source particle set
41  ///long-range Handler
42  std::unique_ptr<LRHandlerType> dAB;
43  ///number of species of A particle set
45  ///number of species of B particle set
47  ///number of particles of A
48  int NptclA;
49  ///number of particles of B
50  int NptclB;
51 
52  ///Zat[iat] charge for the iat-th particle of A
53  std::vector<RealType> Zat;
54  ///Qat[iat] charge for the iat-th particle of B
55  std::vector<RealType> Qat;
56  ///Zspec[spec] charge for the spec-th species of A
57  std::vector<RealType> Zspec;
58  ///Qspec[spec] charge for the spec-th species of B
59  std::vector<RealType> Qspec;
60 
61  bool first_time;
62 
63  ForceChiesaPBCAA(ParticleSet& ions, ParticleSet& elns, bool firsttime = true);
64 
65  std::string getClassName() const override { return "ForceChiesaPBCAA"; }
66 
67  Return_t evaluate(ParticleSet& P) override;
68 
69  void InitMatrix();
70  void initBreakup(ParticleSet& P);
71 
72  void evaluateLR(ParticleSet&);
73  void evaluateSR(ParticleSet&);
74  void evaluateSR_AA();
75  void evaluateLR_AA();
76 
78 
79  void registerObservables(std::vector<ObservableHelper>& h5list, hdf_archive& file) const override
80  {
81  registerObservablesF(h5list, file);
82  }
83 
84  void addObservables(PropertySetType& plist, BufferType& collectables) override;
85 
86 
87  void setObservables(PropertySetType& plist) override
88  {
90  setObservablesF(plist);
91  }
92 
93  void setParticlePropertyList(PropertySetType& plist, int offset) override
94  {
96  setParticleSetF(plist, offset);
97  }
98 
99 
100  void resetTargetParticleSet(ParticleSet& P) override;
101 
102 
103  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) final;
104 
105  bool put(xmlNodePtr cur) override;
106 
107  bool get(std::ostream& os) const override
108  {
109  os << "Ceperley Force Estimator Hamiltonian: " << pair_name_;
110  return true;
111  }
112 
113  // for testing only
114  int getDistanceTableAAID() const { return d_aa_ID; }
115 
116 private:
117  // AA table ID
118  const int d_aa_ID;
119  const int d_ei_ID;
120 };
121 
122 } // namespace qmcplusplus
123 #endif
std::unique_ptr< LRHandlerType > dAB
long-range Handler
One-Dimensional linear-grid.
ParticleSet & PtclA
source particle set
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
int NptclA
number of particles of A
std::vector< RealType > Zat
Zat[iat] charge for the iat-th particle of A.
Declaration of OperatorBase.
class to handle hdf file
Definition: hdf_archive.h:51
Vectorized record engine for scalar properties.
std::string getClassName() const override
return class name
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...
void registerObservablesF(std::vector< ObservableHelper > &h5list, hdf_archive &file) const
Definition: ForceBase.cpp:75
void initBreakup(ParticleSet &P)
int NumSpeciesB
number of species of B particle set
Decalaration of One-Dimesional grids.
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
Definition: OperatorBase.h:75
void setParticlePropertyList(PropertySetType &plist, int offset) override
void addObservables(PropertySetType &plist, BufferType &collectables) override
named values to the property list Default implementaton uses addValue(plist_)
int NptclB
number of particles of B
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
OneDimCubicSpline< pRealType > RadFunctorType
void setParticleSetF(QMCTraits::PropertySetType &plist, int offset)
Definition: ForceBase.cpp:113
std::string pair_name_
Definition: ForceBase.h:97
std::vector< RealType > Qat
Qat[iat] charge for the iat-th particle of B.
int NumSpeciesA
number of species of A particle set
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
virtual void setParticlePropertyList(PropertySetType &plist, int offset)
void setObservablesF(QMCTraits::PropertySetType &plist)
Definition: ForceBase.cpp:86
Class to represent a many-body trial wave function.
Define a LRHandler with two template parameters.
base class for LRHandlerTemp<FUNC,BASIS> and DummyLRHanlder<typename Func>
Definition: LRHandlerBase.h:30
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
virtual void setObservables(PropertySetType &plist)
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
LinearGrid< pRealType > GridType
std::vector< RealType > Zspec
Zspec[spec] charge for the spec-th species of A.
bool put(xmlNodePtr cur) override
Read the input parameter.
ForceChiesaPBCAA(ParticleSet &ions, ParticleSet &elns, bool firsttime=true)
BareKineticEnergy::Return_t Return_t
std::vector< RealType > Qspec
Qspec[spec] charge for the spec-th species of B.
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
Definition: Configuration.h:69