QMCPACK
SPOSetInputInfo.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 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
9 //
10 // File created by: Jaron T. Krogel, krogeljt@ornl.gov, Oak Ridge National Laboratory
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 #ifndef QMCPLUSPLUS_SPOSET_INPUT_INFO_H
15 #define QMCPLUSPLUS_SPOSET_INPUT_INFO_H
16 
18 
19 
20 namespace qmcplusplus
21 {
22 /** class to read state range information from sposet input
23  *
24  * typically just a temporary object to read and get info from xml
25  *
26  */
28 {
30  using indices_t = std::vector<int>;
31  using energies_t = std::vector<RealType>;
32 
33  int group;
34  int size;
35  int index_min;
36  int index_max;
37  std::string occ;
44 
45  bool has_size;
47  bool has_occ;
48  bool has_ecut;
52 
55 
57 
62 
64  std::vector<bool> occupations;
66 
67  SPOSetInputInfo(xmlNodePtr cur) { put(cur); }
68 
70 
72 
73  void reset();
74 
75  void put(xmlNodePtr cur);
76 
77  void report(const std::string& pad = "");
78 
79  inline int min_index() { return lowest_index; }
80 
81  inline int max_index() { return highest_index; }
82 
83  inline RealType min_energy() { return lowest_energy; }
84 
85  inline RealType max_energy() { return highest_energy; }
86 
87  indices_t& get_indices(const std::vector<std::unique_ptr<SPOSetInfo>>& states_vec);
88 
89  inline indices_t& get_indices(xmlNodePtr cur, const std::vector<std::unique_ptr<SPOSetInfo>>& states_vec)
90  {
91  put(cur);
92  return get_indices(states_vec);
93  }
94 
95 
96 private:
97  void find_index_extrema();
98  void find_energy_extrema();
99 
100  void occupy_size();
101  void occupy_index_range();
102  void occupy_occ();
103  void occupy_indices();
104  void occupy_ecut(const SPOSetInfo& states);
105  void occupy_energy_range(const SPOSetInfo& states);
106  void occupy_energies(const SPOSetInfo& states);
107 
108  void occupy(const std::string& loc, const indices_t& ind);
109 };
110 
111 } // namespace qmcplusplus
112 
113 #endif
QMCTraits::RealType RealType
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
class to read state range information from sposet input
QTBase::RealType RealType
Definition: Configuration.h:58
std::vector< int > indices_t
void occupy_ecut(const SPOSetInfo &states)
void occupy_energies(const SPOSetInfo &states)
std::vector< RealType > energies_t
void occupy_energy_range(const SPOSetInfo &states)
collection of orbital info for SPOSet instance or builder
Definition: SPOSetInfo.h:25
void report(const std::string &pad="")
indices_t & get_indices(xmlNodePtr cur, const std::vector< std::unique_ptr< SPOSetInfo >> &states_vec)
std::vector< bool > occupations
void occupy(const std::string &loc, const indices_t &ind)
indices_t & get_indices(const std::vector< std::unique_ptr< SPOSetInfo >> &states_vec)