QMCPACK
DensityEstimator.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: Bryan Clark, bclark@Princeton.edu, Princeton University
8 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 // Ken Esler, kpesler@gmail.com, University of Illinois at Urbana-Champaign
10 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
11 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
12 //
13 // File created by: Bryan Clark, bclark@Princeton.edu, Princeton University
14 //////////////////////////////////////////////////////////////////////////////////////
15 
16 
17 #ifndef QMCPLUSPLUS_DENSITY_HAMILTONIAN_H
18 #define QMCPLUSPLUS_DENSITY_HAMILTONIAN_H
20 #include "OhmmsPETE/OhmmsArray.h"
22 namespace qmcplusplus
23 {
27 
29 {
30 public:
32 
33  std::string getClassName() const override;
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& olist) 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) final;
46 
47 
48 private:
49  ///true if any direction of a supercell is periodic
50  bool periodic_;
51  ///number of grids
53  ///bin size
55  ///inverse
57  ///scaling factor for conversion
59  ///lower bound
61  ///upper bound
63  ///name of the density data
64  std::string prefix;
65 
66  /** resize the internal data
67  *
68  * The argument list is not completed
69  */
70  void resize();
71 
72  /**
73  * @brief Get the linearized grid Index object from 3D coordinates
74  * @param i x-index
75  * @param j y-index
76  * @param k k-index
77  * @return int linearized index
78  */
79  int getGridIndex(int i, int j, int k) const noexcept;
80 };
81 
82 } // namespace qmcplusplus
83 #endif
void setParticlePropertyList(PropertySetType &plist, int offset) override
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
int getGridIndex(int i, int j, int k) const noexcept
Get the linearized grid Index object from 3D coordinates.
std::string getClassName() const override
return class name
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Declaration of OperatorBase.
bool put(xmlNodePtr cur) override
check xml elements
class to handle hdf file
Definition: hdf_archive.h:51
TinyVector< RealType, OHMMS_DIM > density_min_
lower bound
Vectorized record engine for scalar properties.
TinyVector< int, OHMMS_DIM+1 > num_grids_
number of grids
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
TinyVector< RealType, OHMMS_DIM > density_max_
upper bound
OneDimCubicSpline< pRealType > RadFunctorType
void addObservables(PropertySetType &plist)
void resize()
resize the internal data
DensityEstimator(ParticleSet &elns)
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
FullPrecRealType Return_t
type of return value of evaluate
Definition: OperatorBase.h:64
GridType
The different types of grids that we currently allow.
Definition: Grid.h:29
LRCoulombSingleton::LRHandlerType LRHandlerType
Class to represent a many-body trial wave function.
TinyVector< RealType, OHMMS_DIM > delta_
bin size
TinyVector< RealType, OHMMS_DIM > scale_factor_
scaling factor for conversion
std::string prefix
name of the density data
LRCoulombSingleton::RadFunctorType RadFunctorType
Define a LRHandler with two template parameters.
LinearGrid< pRealType > GridType
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
bool periodic_
true if any direction of a supercell is periodic
TinyVector< RealType, OHMMS_DIM > delta_inv_
inverse