QMCPACK
SpinDensity.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: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
8 // Ye Luo, yeluo@anl.gov, Argonne National Laboratory
9 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
10 //
11 // File created by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 
15 #ifndef QMCPLUSPLUS_SPIN_DENSITY_H
16 #define QMCPLUSPLUS_SPIN_DENSITY_H
17 
19 
20 namespace qmcplusplus
21 {
22 class SpinDensity : public OperatorBase
23 {
24 public:
26  using dens_t = std::vector<RealType>;
27  using pts_t = std::vector<PosType>;
28 
30 
31  //data members
32  int nspecies;
33  std::vector<int> species_size;
34  std::vector<std::string> species_name;
39  int npoints;
40 
41  //constructor/destructor
43  ~SpinDensity() override {}
44 
45  //standard interface
46  std::string getClassName() const override { return "SpinDensity"; }
47  std::unique_ptr<OperatorBase> makeClone(ParticleSet& P, TrialWaveFunction& psi) final;
48  bool put(xmlNodePtr cur) override;
49  Return_t evaluate(ParticleSet& P) override;
50 
51  //required for Collectables interface
52  void addObservables(PropertySetType& plist, BufferType& olist) override;
53  void registerCollectables(std::vector<ObservableHelper>& h5desc, hdf_archive& file) const override;
54 
55  //should be empty for Collectables interface
56  void resetTargetParticleSet(ParticleSet& P) override {}
57  void setObservables(PropertySetType& plist) override {}
58  void setParticlePropertyList(PropertySetType& plist, int offset) override {}
59 #if !defined(REMOVE_TRACEMANAGER)
63 #endif
64 
65  //obsolete?
66  bool get(std::ostream& os) const override { return false; }
67 
68  //local functions
69  void reset();
70  void report(const std::string& pad);
71  void test(int moves, ParticleSet& P);
72  Return_t test_evaluate(ParticleSet& P, int& pmin, int& pmax);
73 };
74 
75 } // namespace qmcplusplus
76 
77 #endif
a class that defines a supercell in D-dimensional Euclean space.
std::vector< PosType > pts_t
Definition: SpinDensity.h:27
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
bool put(xmlNodePtr cur) override
Read the input parameter.
Definition: SpinDensity.cpp:59
std::vector< int > species_size
Definition: SpinDensity.h:33
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > ParticleLayout
Definition: Configuration.h:79
Declaration of OperatorBase.
class to handle hdf file
Definition: hdf_archive.h:51
Vectorized record engine for scalar properties.
Return_t test_evaluate(ParticleSet &P, int &pmin, int &pmax)
SpinDensity(ParticleSet &P)
Definition: SpinDensity.cpp:21
void addObservables(PropertySetType &plist, BufferType &olist) override
named values to the property list Default implementaton uses addValue(plist_)
TinyVector< int, DIM > gdims
Definition: SpinDensity.h:38
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
ParticleSet::Buffer_t BufferType
typedef for the serialized buffer
Definition: OperatorBase.h:75
std::unique_ptr< OperatorBase > makeClone(ParticleSet &P, TrialWaveFunction &psi) final
Definition: SpinDensity.cpp:53
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...
Definition: SpinDensity.h:57
void report(const std::string &pad)
std::string getClassName() const override
return class name
Definition: SpinDensity.h:46
std::vector< RealType > dens_t
Definition: SpinDensity.h:26
void registerCollectables(std::vector< ObservableHelper > &h5desc, hdf_archive &file) const override
An abstract class for Local Energy operators.
Definition: OperatorBase.h:59
Class to represent a many-body trial wave function.
void test(int moves, ParticleSet &P)
std::vector< std::string > species_name
Definition: SpinDensity.h:34
void setParticlePropertyList(PropertySetType &plist, int offset) override
Definition: SpinDensity.h:58
void resetTargetParticleSet(ParticleSet &P) override
Reset the data with the target ParticleSet.
Definition: SpinDensity.h:56
BareKineticEnergy::Return_t Return_t
void checkout_scalar_arrays(TraceManager &tm)
Definition: SpinDensity.h:60
TinyVector< int, DIM > grid
Definition: SpinDensity.h:37
RecordNamedProperty< FullPrecRealType > PropertySetType
define PropertyList_t
Definition: Configuration.h:69