QMCPACK
SkEstimator.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 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
11 //
12 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
13 //////////////////////////////////////////////////////////////////////////////////////
14 
15 
16 /** @file SkEstimator.h
17  * @brief Declare SkEstimator
18  */
19 #ifndef QMCPLUSPLUS_SK_ESTIMATOR_H
20 #define QMCPLUSPLUS_SK_ESTIMATOR_H
22 namespace qmcplusplus
23 {
24 /** SkEstimator evaluate the structure factor of the target particleset
25  *
26  * <estimator name="sk" type="sk" debug="no"/>
27  */
28 class SkEstimator : public OperatorBase
29 {
30 public:
31  SkEstimator(ParticleSet& elns);
32 
33  std::string getClassName() const override { return "SkEstimator"; }
34  void resetTargetParticleSet(ParticleSet& P) override;
35 
36  Return_t evaluate(ParticleSet& P) override;
37 
38  void addObservables(PropertySetType& plist);
39  void addObservables(PropertySetType& plist, BufferType& collectables) override;
40  void registerCollectables(std::vector<ObservableHelper>& h5desc, hdf_archive& file) const override;
41  void setObservables(PropertySetType& plist) override;
42  void setParticlePropertyList(PropertySetType& plist, int offset) override;
43  bool put(xmlNodePtr cur) override;
44  bool get(std::ostream& os) const override;
45  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) override;
46 
47 protected:
49  /** number of species */
51  /** number of kpoints */
52  int NumK;
53  /** number of kshells */
54  int MaxKshell;
55  /** normalization factor */
57  /** kshell counters */
58  std::vector<int> Kshell;
59  /** instantaneous structure factor */
60  std::vector<RealType> Kmag;
61  /** 1.0/degenracy for a ksell */
62  std::vector<RealType> OneOverDnk;
63  /** \f$rho_k = \sum_{\alpha} \rho_k^{\alpha} \f$ for species index \f$\alpha\f$ */
66  /** resize the internal data
67  *
68  * The argument list is not completed
69  */
70  void resize();
71 
72  bool hdf5_out;
73 };
74 
75 } // namespace qmcplusplus
76 #endif
void resize()
resize the internal data
void addObservables(PropertySetType &plist)
Definition: SkEstimator.cpp:93
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
void setParticlePropertyList(PropertySetType &plist, int offset) override
int MaxKshell
number of kshells
Definition: SkEstimator.h:54
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
Definition: SkEstimator.cpp:45
SkEstimator evaluate the structure factor of the target particleset.
Definition: SkEstimator.h:28
Vector< RealType > values
Definition: SkEstimator.h:65
std::vector< RealType > OneOverDnk
1.0/degenracy for a ksell
Definition: SkEstimator.h:62
bool put(xmlNodePtr cur) override
Read the input parameter.
Declaration of OperatorBase.
class to handle hdf file
Definition: hdf_archive.h:51
RealType OneOverN
normalization factor
Definition: SkEstimator.h:56
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
int NumSpecies
number of species
Definition: SkEstimator.h:50
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::string getClassName() const override
return class name
Definition: SkEstimator.h:33
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
Definition: OperatorBase.h:75
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) override
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Definition: SkEstimator.cpp:47
ParticleSet * sourcePtcl
Definition: SkEstimator.h:48
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
Vector< RealType > RhokTot_i
Definition: SkEstimator.h:64
std::vector< int > Kshell
kshell counters
Definition: SkEstimator.h:58
Class to represent a many-body trial wave function.
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
int NumK
number of kpoints
Definition: SkEstimator.h:52
SkEstimator(ParticleSet &elns)
Definition: SkEstimator.cpp:23
std::vector< RealType > Kmag
instantaneous structure factor
Definition: SkEstimator.h:60
BareKineticEnergy::Return_t Return_t
Vector< RealType > RhokTot_r
for species index
Definition: SkEstimator.h:64
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
Definition: Configuration.h:69