QMCPACK
MomentumEstimator.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 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 //
11 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 
15 #ifndef QMCPLUSPLUS_MOMENTUM_HAMILTONIAN_H
16 #define QMCPLUSPLUS_MOMENTUM_HAMILTONIAN_H
18 namespace qmcplusplus
19 {
21 {
22 public:
24  bool dependsOnWaveFunction() const override { return true; }
25  std::string getClassName() const override { return "MomentumEstimator"; }
26  void resetTargetParticleSet(ParticleSet& P) override;
27 
28  Return_t evaluate(ParticleSet& P) override;
29 
31  void addObservables(PropertySetType& plist, BufferType& olist) override;
32  void registerCollectables(std::vector<ObservableHelper>& h5desc, hdf_archive& file) const override;
33  void setObservables(PropertySetType& plist) override;
34  void setParticlePropertyList(PropertySetType& plist, int offset) override;
35  bool putSpecial(xmlNodePtr cur, ParticleSet& elns, bool rootNode);
36  bool put(xmlNodePtr cur) override { return false; };
37  bool get(std::ostream& os) const override;
38  std::unique_ptr<OperatorBase> makeClone(ParticleSet& qp, TrialWaveFunction& psi) final;
40  //resize the internal data by input k-point list
41  void resize(const std::vector<PosType>& kin, const int Min);
42  ///number of samples
43  int M;
44  ///reference to the trial wavefunction for ratio evaluations
46  ///lattice vector
48  ///normalization factor for n(k)
50  ///random generator
51  std::unique_ptr<RandomBase<FullPrecRealType>> myRNG;
52  ///sample positions
53  std::vector<PosType> vPos;
54  ///wavefunction ratios
55  std::vector<ValueType> psi_ratios;
56  ///wavefunction ratios all samples
58  ///nofK internal
60  ///phases
62  ///phases of vPos
63  std::vector<VectorSoaContainer<RealType, 2>> phases_vPos;
64  ///list of k-points in Cartesian Coordinates
65  std::vector<PosType> kPoints;
66  ///weight of k-points (make use of symmetry)
67  std::vector<int> kWeights;
68  ///nofK
70  /// print to hdf5 or scalar.dat
71  bool hdf5_out;
73 };
74 
75 } // namespace qmcplusplus
76 #endif
a class that defines a supercell in D-dimensional Euclean space.
std::vector< PosType > vPos
sample positions
TrialWaveFunction & refPsi
reference to the trial wavefunction for ratio evaluations
void resize(const std::vector< PosType > &kin, const int Min)
std::vector< T, aligned_allocator< T > > aligned_vector
Matrix< ValueType > psi_ratios_all
wavefunction ratios all samples
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
bool hdf5_out
print to hdf5 or scalar.dat
RealType norm_nofK
normalization factor for n(k)
bool putSpecial(xmlNodePtr cur, ParticleSet &elns, bool rootNode)
std::unique_ptr< OperatorBase > makeClone(ParticleSet &qp, TrialWaveFunction &psi) final
Declaration of OperatorBase.
class to handle hdf file
Definition: hdf_archive.h:51
MomentumEstimator(ParticleSet &elns, TrialWaveFunction &psi)
Vectorized record engine for scalar properties.
void setObservables(PropertySetType &plist) override
Set the values evaluated by this object to plist Default implementation is to assign Value which is u...
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
Definition: OperatorBase.h:75
std::unique_ptr< RandomBase< FullPrecRealType > > myRNG
random generator
VectorSoaContainer< RealType, 2 > phases
phases
bool put(xmlNodePtr cur) override
Read the input parameter.
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
void setRandomGenerator(RandomBase< FullPrecRealType > *rng) override
Set the Random Generator object TODO: add docs.
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
Return_t evaluate(ParticleSet &P) override
Evaluate the local energy contribution of this component.
Class to represent a many-body trial wave function.
aligned_vector< RealType > nofK
nofK
void addObservables(PropertySetType &plist)
std::vector< int > kWeights
weight of k-points (make use of symmetry)
const ParticleSet::ParticleLayout & lattice_
lattice vector
std::vector< VectorSoaContainer< RealType, 2 > > phases_vPos
phases of vPos
void setParticlePropertyList(PropertySetType &plist, int offset) override
std::vector< ValueType > psi_ratios
wavefunction ratios
Vector< RealType > kdotp
nofK internal
std::string getClassName() const override
return class name
BareKineticEnergy::Return_t Return_t
bool dependsOnWaveFunction() const override
return true if this operator depends on a wavefunction
std::vector< PosType > kPoints
list of k-points in Cartesian Coordinates
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
Definition: Configuration.h:69