1 | /*
|
---|
2 | * Psi3Parser_Parameters.hpp
|
---|
3 | *
|
---|
4 | * Created on: Feb 3, 2011
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef PSI3PARSER_PARAMETERS_HPP_
|
---|
9 | #define PSI3PARSER_PARAMETERS_HPP_
|
---|
10 |
|
---|
11 | // include config.h
|
---|
12 | #ifdef HAVE_CONFIG_H
|
---|
13 | #include <config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <list>
|
---|
17 | #include <map>
|
---|
18 | #include <vector>
|
---|
19 |
|
---|
20 | #include "CodePatterns/Clone.hpp"
|
---|
21 |
|
---|
22 | #include "Parser/FormatParser_Parameters.hpp"
|
---|
23 |
|
---|
24 | #include "Parser/Parameters/ContinuousParameter.hpp"
|
---|
25 |
|
---|
26 | // specialization for bool (we want "yes/no" not "1/0")
|
---|
27 | template <> inline const std::string ContinuousValue<bool>::get() const;
|
---|
28 | template <> inline void ContinuousValue<bool>::set(const std::string _value);
|
---|
29 |
|
---|
30 | class Psi3Parser;
|
---|
31 |
|
---|
32 | class Psi3Parser_Parameters : public FormatParser_Parameters
|
---|
33 | {
|
---|
34 | // Psi3Parser should be friend to access params directly for types.
|
---|
35 | friend class Psi3Parser;
|
---|
36 | // ParserPsi3UnitTest needs to be friend to check types contained in params.
|
---|
37 | friend class ParserPsi3UnitTest;
|
---|
38 |
|
---|
39 | public:
|
---|
40 | /** Constructor of Psi3Parser_Parameters.
|
---|
41 | *
|
---|
42 | */
|
---|
43 | Psi3Parser_Parameters();
|
---|
44 |
|
---|
45 | /** Destructor of Psi3Parser_Parameters.
|
---|
46 | *
|
---|
47 | */
|
---|
48 | virtual ~Psi3Parser_Parameters();
|
---|
49 |
|
---|
50 | /** Enumeration of all known Parameters to allow placing them in vectors, maps.
|
---|
51 | *
|
---|
52 | */
|
---|
53 | enum Parameters {
|
---|
54 | labelParam, //!< labelParam, name of the computation appears in output file
|
---|
55 | jobtypeParam, //!< jobtypeParam, type of job to perform (single point, ...)
|
---|
56 | wavefunctionParam,//!< wfnParam, wavefunction type
|
---|
57 | maxiterParam, //!< maxiterParam, maximum number of iterations
|
---|
58 | referenceParam, //!< referenceParam, type of self-consistent field calculation
|
---|
59 | basisParam, //!< basisParam, name of the basis
|
---|
60 | freeze_coreParam, //!< freeze_coreParam, whether to freeze core orbitals automatically or not
|
---|
61 | unitsParam, //!< unitsParam, unit of length
|
---|
62 | dertypeParam, //!< dertypeParam, type of derivative to use
|
---|
63 | originParam, //!< originParam, origin of the system
|
---|
64 | multiplicityParam,//!< multipParam, multiplicity of the molecule (2S+1) in case of unrestricted calculations
|
---|
65 | chargeParam, //!< chargeParam, charge of the molecule
|
---|
66 | soccParam, //!< soccParam, singly occupied orbitals in each irreducible representation
|
---|
67 | doccParam, //!< doccParam, doubly occupied orbitals in each irreducible representation
|
---|
68 | subgroupParam, //!< subgroupParam, subgroup symmetry the system fulfulls
|
---|
69 | unique_axisParam, //!< unique_axisParam, unique_axis in case of degeneracy for the given subgroup
|
---|
70 | unknownParam}; //!< unknownParam, designates an unknown parameter
|
---|
71 |
|
---|
72 | /** Enumeration of all known job typs.
|
---|
73 | *
|
---|
74 | */
|
---|
75 | enum Jobtype {
|
---|
76 | SP, //!< single-point energy calculation
|
---|
77 | OPT, //!< geometry optimization
|
---|
78 | DISP, //!< different displaced geometries
|
---|
79 | FREQ, //!< frequency calculation
|
---|
80 | SYMM_FREQ, //!< frequency calculation for symmetric vibrational modes only
|
---|
81 | DBOC, //!< Diagonal Born-Oppenheimer correction energy calculation
|
---|
82 | RESPONSE, //!< response properties calculation
|
---|
83 | unknownJobtype //!< designates an unknown job type
|
---|
84 | };
|
---|
85 |
|
---|
86 | /** Enumeration of all known wavefunction.
|
---|
87 | *
|
---|
88 | */
|
---|
89 | enum Wavefunction {
|
---|
90 | SCF, //!< Self-Consistent Field
|
---|
91 | MP2, //!< Moeller-Plesset perturbation theory to second order
|
---|
92 | MP2R12, //!< Moeller-Plesset perturbation theory to second order with r12 functional
|
---|
93 | CIS, //!< Complete Inverse Space
|
---|
94 | DETCI, //!< Determinatal Configuration Interaction
|
---|
95 | CASSCF, //!< Complete Active Space Self-Consistent Field
|
---|
96 | RASSCF, //!< Restriced Active Space Self-Consistent Field
|
---|
97 | CCSD, //!< Coupled Cluster with Singles and Doubles
|
---|
98 | CCSD_T, //!< Coupled Cluster with Singles, Doubles, and Triples
|
---|
99 | BCCD, //!< some Coupled Cluster with Singles and Doubles
|
---|
100 | BCCD_T, //!< some Coupled Cluster with Singles, Doubles, and Triples
|
---|
101 | EOM_CCSD, //!< some other Coupled Cluster with Singles and Doubles
|
---|
102 | ZAPTN, //!< unknown type?
|
---|
103 | unknownWavefunction //!< designates an unknown wavefunction
|
---|
104 | };
|
---|
105 |
|
---|
106 | /** Enumeration of all known reference.
|
---|
107 | *
|
---|
108 | */
|
---|
109 | enum Reference {
|
---|
110 | RHF, //!< Restricted Hartree-Fock equations
|
---|
111 | ROHF, //!< Restricted Open Shell Hartree-Fock equations
|
---|
112 | UHF, //!< Unrestricted Hartree-Fock equations
|
---|
113 | TWOCON, //!< Special Unrestricted Hartree-Fock equations
|
---|
114 | unknownReference //!< designates an unknown reference
|
---|
115 | };
|
---|
116 |
|
---|
117 | /** Enumeration of all known unique_axis values.
|
---|
118 | *
|
---|
119 | */
|
---|
120 | enum UniqueAxis {
|
---|
121 | X, //!< x axis
|
---|
122 | Y, //!< y axis
|
---|
123 | Z, //!< z axis
|
---|
124 | unknownUniqueAxis //!< designates an unknown unique axis
|
---|
125 | };
|
---|
126 |
|
---|
127 | /** Enumeration of all known length units.
|
---|
128 | *
|
---|
129 | */
|
---|
130 | enum Units {
|
---|
131 | angstrom, //!< angstroem units of length
|
---|
132 | bohr, //!< bohr units of length
|
---|
133 | unknownUnits //!< designates an unknown unit
|
---|
134 | };
|
---|
135 |
|
---|
136 | /** Enumeration of all known length dertypes.
|
---|
137 | *
|
---|
138 | */
|
---|
139 | enum DerivativeType {
|
---|
140 | NONE, //!< no derivative calculation
|
---|
141 | unknownDerivativeType //!< designates an unknown dertype
|
---|
142 | };
|
---|
143 |
|
---|
144 | /** Enumeration of all known unique freeze_core values.
|
---|
145 | *
|
---|
146 | */
|
---|
147 | enum FreezeCore {
|
---|
148 | YES, //!< freeze cores automatically
|
---|
149 | TRUE, //!< same as YES
|
---|
150 | NO, //!< don't freeze cores
|
---|
151 | FALSE, //!< same as NO
|
---|
152 | SMALL, //!< for elements Na-Ar
|
---|
153 | LARGE, //!< for elements Na-Ar
|
---|
154 | unknownFreezeCore //!< designates an unknown freeze_core
|
---|
155 | };
|
---|
156 |
|
---|
157 | // enum to string getters
|
---|
158 | const std::string getParameter(const enum Parameters param) const;
|
---|
159 | void setParameter(const enum Parameters param, const std::string &);
|
---|
160 | const std::string &getParameterName(const enum Parameters param) const;
|
---|
161 | const std::string &getReferenceName(const enum Reference reference) const;
|
---|
162 |
|
---|
163 | private:
|
---|
164 | //!> vector with all available dertype in same order as enum DerivativeType.
|
---|
165 | std::vector<std::string> ValidDerivativeType;
|
---|
166 |
|
---|
167 | //!> vector with all available unit in same order as enum Units.
|
---|
168 | std::vector<std::string> ValidUnits;
|
---|
169 |
|
---|
170 | //!> vector with all available unique_axis in same order as enum UniqueAxis.
|
---|
171 | std::vector<std::string> ValidUniqueAxis;
|
---|
172 |
|
---|
173 | //!> vector with all available freeze_core in same order as enum FreezeCore.
|
---|
174 | std::vector<std::string> ValidFreezeCore;
|
---|
175 |
|
---|
176 | //!> vector with all available job types in same order as enum Jobtypes.
|
---|
177 | std::vector<std::string> ValidJobtypes;
|
---|
178 |
|
---|
179 | //!> vector with all available wavefunction in same order as enum Wavefunction.
|
---|
180 | std::vector<std::string> ValidWavefunction;
|
---|
181 |
|
---|
182 | //!> vector with all available reference in same order as enum Reference.
|
---|
183 | std::vector<std::string> ValidReference;
|
---|
184 |
|
---|
185 | bool checkWorldElementsAgainstCurrentBasis() const;
|
---|
186 |
|
---|
187 | /** Global initialization in cstor.
|
---|
188 | *
|
---|
189 | */
|
---|
190 | void Init();
|
---|
191 |
|
---|
192 | // /** Initializes BasisList.
|
---|
193 | // *
|
---|
194 | // */
|
---|
195 | // void initBasis();
|
---|
196 |
|
---|
197 | //!> vector with all parameter names in same order as enum Parameters
|
---|
198 | std::vector<std::string> ParamNames;
|
---|
199 |
|
---|
200 | //!> typedef for the list of all available basis sets
|
---|
201 | typedef std::map<std::string, std::list<std::string> > BasisMapType;
|
---|
202 |
|
---|
203 | //!> list of all basis along with their present element parametrization
|
---|
204 | BasisMapType BasisList;
|
---|
205 | };
|
---|
206 |
|
---|
207 | #endif /* PSI3PARSER_PARAMETERS_HPP_ */
|
---|