QMCPACK
QMCGaussianParserBase.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: Jordan E. Vincent, University of Illinois at Urbana-Champaign
8 // Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
9 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
10 // Miguel Morales, moralessilva2@llnl.gov, Lawrence Livermore National Laboratory
11 // Anouar Benali, benali@anl.gov, Argonne National Laboratory
12 // Mark A. Berrill, berrillma@ornl.gov, Oak Ridge National Laboratory
13 //
14 // File created by: Jordan E. Vincent, University of Illinois at Urbana-Champaign
15 //////////////////////////////////////////////////////////////////////////////////////
16 
17 
18 #ifndef QMCPLUSPLUS_TOOLS_EXTERNAL_GAUSSIANPARSERBASE_H
19 #define QMCPLUSPLUS_TOOLS_EXTERNAL_GAUSSIANPARSERBASE_H
20 #include <iostream>
21 #include <cstdlib>
22 #include <sstream>
23 #include <iomanip>
24 #include <vector>
25 #include <map>
27 #include "Utilities/SimpleParser.h"
28 #include "Particle/ParticleSet.h"
29 #include "hdf/hdf_archive.h"
30 
31 using namespace qmcplusplus;
32 
34 {
35  using value_type = double;
37 
39  bool multidetH5;
40  bool BohrUnit;
43  bool UseHDF5;
44  bool PBC;
45  bool production;
46  bool zeroCI;
48  bool addJastrow;
50  bool ECP;
51  bool debug;
52  bool Structure;
53  bool DoCusp;
54  // if true, adjust valence electron count output based on gCoreTable
55  bool FixValence;
58  bool usingCSF;
59  bool isSpinor;
65  // targeted state number
68  int NumberOfAlpha, NumberOfBeta;
70  // mmorales: number of Molecular orbitals, not always equal to SizeOfBasisSet
71  int numMO, readNO, readGuess, numMO2print;
72  int ci_size, ci_nca, ci_ncb, ci_nea, ci_neb, ci_nstates;
73  int NbKpts;
75  double ci_threshold;
76 
77 
78  std::vector<double> STwist_Coord; //Super Twist Coordinates
79 
80 
81  std::string Title;
82  std::string basisType;
83  std::string basisName;
84  std::string Normalized;
85  std::string CurrentCenter;
86  std::string outputFile;
87  std::string angular_type;
88  std::string expandYlm;
89  std::string h5file;
90  std::string multih5file;
91  std::string WFS_name;
92  std::string CodeName;
93 
96 
97 
98  std::vector<std::string> GroupName;
99 
100  std::vector<int> gShell, gNumber, gBound;
101  std::vector<int> Occ_alpha, Occ_beta;
102  std::vector<value_type> Qv;
103  std::vector<value_type> gExp, gC0, gC1;
104  std::vector<value_type> EigVal_alpha, EigVal_beta;
105  std::vector<value_type> EigVec;
106  //std::vector<GaussianCombo<value_type> > gExp, gC0, gC1;
107  //std::string EigVecU, EigVecD;
108  std::unique_ptr<xmlNode, void (*)(xmlNodePtr)> gridPtr =
109  std::unique_ptr<xmlNode, void (*)(xmlNodePtr)>(nullptr, nullptr);
110  std::vector<std::string> CIalpha, CIbeta;
111  std::vector<std::string> CSFocc;
112  std::vector<std::vector<std::string>> CSFalpha, CSFbeta;
113  std::vector<std::vector<double>> CSFexpansion;
114  std::vector<double> CIcoeff;
115  std::vector<double> X, Y, Z; //LAttice vectors for PBC
116  std::vector<int> Image;
117 
118  std::vector<int> CIexcitLVL;
119 
120  std::vector<std::pair<int, double>> coeff2csf;
121 
123  QMCGaussianParserBase(int argc, char** argv);
124 
125  virtual ~QMCGaussianParserBase() = default;
126 
127  void setOccupationNumbers();
128 
129  void createGridNode(int argc, char** argv);
130 
131  void createSPOSets(xmlNodePtr, xmlNodePtr);
132  void createSPOSetsH5(xmlNodePtr, xmlNodePtr);
133  void PrepareSPOSetsFromH5(xmlNodePtr, xmlNodePtr);
134  xmlNodePtr createElectronSet(const std::string& ion_tag);
135  xmlNodePtr createIonSet();
136  xmlNodePtr createCell();
137  xmlNodePtr createHamiltonian(const std::string& ion_tag, const std::string& psi_tag);
138  xmlNodePtr createBasisSet();
139  xmlNodePtr createBasisSetWithHDF5();
140  xmlNodePtr createCenter(int iat, int _off);
141  void createCenterH5(int iat, int _off, int numelem);
142  void createShell(int n, int ig, int off_, xmlNodePtr abasis);
143  void createShellH5(int n, int ig, int off_, int numelem);
144 
145  xmlNodePtr createDeterminantSet();
146  xmlNodePtr createMultiDeterminantSet();
147  xmlNodePtr createDeterminantSetWithHDF5();
148  xmlNodePtr createMultiDeterminantSetFromH5();
149  xmlNodePtr createMultiDeterminantSetCIHDF5();
150  xmlNodePtr PrepareDeterminantSetFromHDF5();
151  xmlNodePtr createJ3();
152  xmlNodePtr createJ2();
153  xmlNodePtr createJ1();
154 
155  xmlNodePtr parameter(xmlNodePtr Parent, std::string Mypara, std::string a);
156 
157  int numberOfExcitationsCSF(std::string&);
158 
159  virtual void parse(const std::string& fname) = 0;
160 
161  virtual void dumpPBC(const std::string& psi_tag, const std::string& ion_tag);
162 
163  virtual void dump(const std::string& psi_tag, const std::string& ion_tag);
164 
165  void dumpStdInput(const std::string& psi_tag, const std::string& ion_tag);
166 
167  void dumpStdInputProd(const std::string& psi_tag, const std::string& ion_tag);
168 
169 
170  //static std::vector<std::string> IonName;
171  static std::map<int, std::string> IonName;
172 
173  static std::vector<std::string> gShellType;
174  static std::vector<int> gShellID;
175 
176  static const std::vector<double> gCoreTable;
177 
178  static void init();
179 };
180 #endif
std::vector< std::vector< double > > CSFexpansion
ParticleSet::SingleParticlePos SingleParticlePos
std::vector< value_type > EigVal_beta
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
ParticleLayout::SingleParticlePos SingleParticlePos
Definition: Configuration.h:87
static std::vector< int > gShellID
std::vector< double > Z
std::vector< double > CIcoeff
std::vector< int > Occ_beta
std::vector< std::string > GroupName
Declaration of OhmmsElementBase and define xml-related macros.
std::vector< std::vector< std::string > > CSFbeta
std::vector< std::string > CSFocc
Specialized paritlce class for atomistic simulations.
Definition: ParticleSet.h:55
const SimulationCell simulation_cell
std::vector< double > STwist_Coord
std::vector< value_type > EigVec
std::vector< value_type > gExp
static std::map< int, std::string > IonName
std::vector< int > CIexcitLVL
std::vector< std::pair< int, double > > coeff2csf
std::vector< value_type > Qv
static std::vector< std::string > gShellType
std::vector< std::string > CIbeta
static const std::vector< double > gCoreTable