QMCPACK
NEReferencePoints.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) 2023 QMCPACK developers.
6 //
7 // File developed by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
8 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 // Peter W. Doak. doakpw@ornl.gov, Oak Ridge National Laboratory
10 //
11 // File refactored from: QMCHamiltonian/ReferencePoints.h
12 //////////////////////////////////////////////////////////////////////////////////////
13 
14 #ifndef QMCPLUSPLUS_NEREFERENCE_POINTS_H
15 #define QMCPLUSPLUS_NEREFERENCE_POINTS_H
16 
17 /** @file
18  * \todo When QMCHamiltonian/ReferencePoints is removed rename this class to ReferencePoints
19  */
20 
21 #include <Configuration.h>
23 #include "Particle/ParticleSet.h"
25 #include "OhmmsPETE/Tensor.h"
26 #include "ReferencePointsInput.h"
27 
28 namespace qmcplusplus
29 {
30 
31 /** This class creates, contains, and writes both user and machine readable referencepoints.
32  * they are derived from the lattice of the pset passed and the particle positions in the ref_psets
33  * an arbitrary number of additional points can be defined in the input that ReferencePointsInput
34  * presents as native input.
35  * It is a dependency of Estimators/NESpaceGrid and Estimatorss/EnergyDensityEstimator
36  */
38 {
39 public:
43  using Points = std::map<std::string, Point>;
45  /** Usual constructor
46  * \param[in] rp_input Input object for reference points which can contain and arbitrary set of points beyond
47  * those take from the pset, and ref_psets
48  * \param[in] pset pset that supplies the lattice information for reference points
49  * \param[in] ref_psets pset reference vector the particle points in this/these psets are reference points
50  * ions are surfaced in the reference points as ion{num} with no special formatting.
51  */
53  NEReferencePoints(const NEReferencePoints& nerp) = default;
54 
55  /** writes a human readable representation of the reference points.
56  * \param[inout] os ostream to write description to
57  * \param[in] indent spaces or other text to preface each line of output with. needed to preserve
58  * legacy output format.
59  */
60  void write_description(std::ostream& os, const std::string& indent) const;
61 
62  /** machine readable output
63  * \param[inout] file hdf5 file to write to. Respects current state of file.
64  */
65  void write(hdf_archive& file) const;
66 
67  /** return const ref to map of reference points.
68  * labeling scheme unchanged from legacy
69  */
70  const Points& get_points() const { return points_; }
71 
72 protected:
74 private:
78 };
79 
80 std::ostream& operator<<(std::ostream& out, const NEReferencePoints& rhs);
81 
82 }
83 #endif
This class creates, contains, and writes both user and machine readable referencepoints.
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
NEReferencePoints(const ReferencePointsInput &rp_input, const ParticleSet &pset, RefVector< ParticleSet > &ref_psets)
Usual constructor.
void write(hdf_archive &file) const
machine readable output
std::map< std::string, Point > Points
class to handle hdf file
Definition: hdf_archive.h:51
typename ReferencePointsInput::Coord Coord
Declaration of OhmmsElementBase and define xml-related macros.
Declaration of ObservableHelper and other helper class for observables.
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
void processParticleSets(const ParticleSet &P, RefVector< ParticleSet > &Pref)
std::ostream & operator<<(std::ostream &out, const AntiSymTensor< T, D > &rhs)
void write_description(std::ostream &os, const std::string &indent) const
writes a human readable representation of the reference points.
std::vector< std::reference_wrapper< T > > RefVector
QTFull::RealType FullPrecRealType
Definition: Configuration.h:66
const Points & get_points() const
return const ref to map of reference points.
QMCTraits::FullPrecRealType Real