QMCPACK
PairCorrEstimator.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 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 // Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
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 #ifndef QMCPLUSPLUS_PAIRCOOR_HAMILTONIAN_H
17 #define QMCPLUSPLUS_PAIRCOOR_HAMILTONIAN_H
19 #include "OhmmsPETE/OhmmsMatrix.h"
20 
21 namespace qmcplusplus
22 {
23 /** gofr estimator
24  *
25  * Compute pair correlation function for the target particle set and optionally any source particles
26  */
28 {
29 public:
30  /** constructor
31  * @param elns target particle set
32  * @param sources list of source particle sets
33  *
34  * Use the elns.DistTables to evaluate the pair correlation functions.
35  */
36  PairCorrEstimator(ParticleSet& elns, std::string& sources);
37 
38  std::string getClassName() const override { return "PairCorrEstimator"; }
39  void resetTargetParticleSet(ParticleSet& P) override;
40 
41  /* evaluate the pair correlation functions */
42  Return_t evaluate(ParticleSet& P) override;
43 
44  /// generate the unique pair id from the group ids of particle i and j and the number of species
45  static int gen_pair_id(const int ig, const int jg, const int ns);
46 
48  void addObservables(PropertySetType& plist, BufferType& collectables) override;
49  void registerCollectables(std::vector<ObservableHelper>& h5list, hdf_archive& file) const override;
50  void setObservables(PropertySetType& plist) override;
51  void setParticlePropertyList(PropertySetType& plist, int offset) override;
52  bool put(xmlNodePtr cur) override;
53  bool get(std::ostream& os) const override;
54  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) final;
55 
56  void set_norm_factor();
57  void report();
58 
59 private:
60  ///number of bins
61  int NumBins;
62  /// maximum distance
64  /// bin size
66  /// one of bin size
68  /// volume of the cell
70  ///save pair indices
71  std::vector<int> pair_ids;
72  /// table indexs for other type
73  std::vector<int> other_ids;
74  /// offset of the gofr's associated with others_id
75  std::vector<int> other_offsets;
76  /////save source indices
77  //vector<int> source_ids;
78  ///normalization factor
81  std::vector<RealType> n_vec;
82  // AA table ID
83  const int d_aa_ID_;
84  /////data
85  //Matrix<RealType> gof_r;
86  ///prefix of each gof_r
87  std::vector<std::string> gof_r_prefix;
88  /** resize the internal data
89  * @param nbins number of bins for the historgram
90  */
91  void resize(int nbins);
92 };
93 
94 } // namespace qmcplusplus
95 #endif
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
std::vector< int > other_offsets
offset of the gofr&#39;s associated with others_id
Declaration of OperatorBase.
class to handle hdf file
Definition: hdf_archive.h:51
bool put(xmlNodePtr cur) override
Read the input parameter.
Vectorized record engine for scalar properties.
Matrix< RealType > norm_factor
normalization factor
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
Definition: OperatorBase.h:75
PairCorrEstimator(ParticleSet &elns, std::string &sources)
constructor
std::vector< std::string > gof_r_prefix
prefix of each gof_r
RealType DeltaInv
one of bin size
void addObservables(PropertySetType &plist)
std::vector< int > other_ids
table indexs for other type
void setParticlePropertyList(PropertySetType &plist, int offset) override
RealType Dmax
maximum distance
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
std::vector< int > pair_ids
save pair indices
std::string getClassName() const override
return class name
Class to represent a many-body trial wave function.
void registerCollectables(std::vector< ObservableHelper > &h5list, hdf_archive &file) const override
static int gen_pair_id(const int ig, const int jg, const int ns)
generate the unique pair id from the group ids of particle i and j and the number of species ...
std::vector< RealType > n_vec
BareKineticEnergy::Return_t Return_t
RealType Volume
volume of the cell
void resize(int nbins)
resize the internal data
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
Definition: Configuration.h:69