1 | /*
|
---|
2 | * MpqcParser_Parameters.hpp
|
---|
3 | *
|
---|
4 | * Created on: Feb 3, 2011
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef MPQCPARSER_PARAMETERS_HPP_
|
---|
9 | #define MPQCPARSER_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/Log.hpp"
|
---|
21 |
|
---|
22 | #include "Parser/FormatParser_Parameters.hpp"
|
---|
23 |
|
---|
24 | class MpqcParser;
|
---|
25 |
|
---|
26 | class MpqcParser_Parameters : public FormatParser_Parameters
|
---|
27 | {
|
---|
28 | // MpqcParser should be friend to access params directly for types.
|
---|
29 | friend class MpqcParser;
|
---|
30 | // ParserMpqcUnitTest needs to be friend to check types contained in params.
|
---|
31 | friend class ParserMpqcUnitTest;
|
---|
32 |
|
---|
33 | public:
|
---|
34 | /** Constructor of MpqcParser_Parameters.
|
---|
35 | *
|
---|
36 | */
|
---|
37 | MpqcParser_Parameters();
|
---|
38 |
|
---|
39 | /** Destructor of MpqcParser_Parameters.
|
---|
40 | *
|
---|
41 | */
|
---|
42 | virtual ~MpqcParser_Parameters();
|
---|
43 |
|
---|
44 | /** Enumeration of all known Parameters to allow placing them in vectors, maps.
|
---|
45 | *
|
---|
46 | */
|
---|
47 | enum Parameters {
|
---|
48 | hessianParam, //!< HessianParam, whether hessian should be calculated or not
|
---|
49 | savestateParam, //!< savestateParam, whether intermediate/final states (wave function) should be stored
|
---|
50 | do_gradientParam,//!< do_gradientParam, whether a gradient should be calculated
|
---|
51 | maxiterParam, //!< maxiterParam, number of maximum iterations for CG
|
---|
52 | memoryParam, //!< memoryParam, maximum amount of memory to use
|
---|
53 | stdapproxParam, //!< stdapproxParam, standard approximation in MBPT2 R12
|
---|
54 | nfzcParam, //!< nfzcParam, nfzc parameter in MBPT2 R12
|
---|
55 | basisParam, //!< basisParam, basis set to use
|
---|
56 | aux_basisParam, //!< aux_basisParam, auxiliary baseis set to use in MBPT2 R12
|
---|
57 | integrationParam,//!< integrationParam, integration method to use in MBPT2 R12
|
---|
58 | theoryParam, //!< theoryParam, level of theory to use
|
---|
59 | unknownParam}; //!< unknownParam, designates an unknown parameter
|
---|
60 |
|
---|
61 | /** Enumeration of all known theories.
|
---|
62 | *
|
---|
63 | */
|
---|
64 | enum Theory {
|
---|
65 | CLHF, //!< Closed Shell Hartree-Fock equations
|
---|
66 | CLKS, //!< Closed Shell Kohn-Sham equations
|
---|
67 | MBPT2, //!< Moeller Plesset Perturbation Theory second order
|
---|
68 | MBPT2_R12, //!< Moeller Plesset Perturbation Theory second order with R12 integral
|
---|
69 | unknownTheory //!< designates an unknown theory
|
---|
70 | };
|
---|
71 |
|
---|
72 | /** Enumeration of all known boolean valus.
|
---|
73 | *
|
---|
74 | */
|
---|
75 | enum Bools {
|
---|
76 | no=0, //!< false or not set
|
---|
77 | yes=1, //!< true or set
|
---|
78 | unknownBool //!> designates an unknown bool
|
---|
79 | };
|
---|
80 |
|
---|
81 | /** Enumeration of all known integration methods
|
---|
82 | *
|
---|
83 | */
|
---|
84 | enum IntegrationMethod {
|
---|
85 | IntegralCints, //!< Integration method Cints in MBPT2 R12?
|
---|
86 | unknownIntegration //!< designates unknown integration method
|
---|
87 | };
|
---|
88 |
|
---|
89 | // enum to string getters
|
---|
90 | const std::string getParameter(const enum Parameters param) const;
|
---|
91 | void setParameter(const enum Parameters param, const std::string &);
|
---|
92 | const std::string &getParameterName(const enum Parameters param) const;
|
---|
93 | const std::string &getTheoryName(const enum Theory theory) const;
|
---|
94 | const std::string &getIntegrationMethodName(const enum IntegrationMethod integration) const;
|
---|
95 |
|
---|
96 | private:
|
---|
97 |
|
---|
98 | //!> vector with all available theories in same order as enum Theory.
|
---|
99 | std::vector<std::string> ValidTheories;
|
---|
100 |
|
---|
101 | //!> vector with all available integration methods in same order as enum IntegrationMethod.
|
---|
102 | std::vector<std::string> ValidIntegrationMethods;
|
---|
103 |
|
---|
104 | //!> vector with all available bools in same order as enum Bools.
|
---|
105 | std::vector<std::string> ValidBools;
|
---|
106 |
|
---|
107 | bool checkWorldElementsAgainstCurrentBasis() const;
|
---|
108 |
|
---|
109 | /** Global initialization in cstor.
|
---|
110 | *
|
---|
111 | */
|
---|
112 | void Init();
|
---|
113 |
|
---|
114 | /** Initializes BasisList.
|
---|
115 | *
|
---|
116 | */
|
---|
117 | void initBasis();
|
---|
118 |
|
---|
119 | //!> vector with all parameter names in same order as enum Parameters
|
---|
120 | std::vector<std::string> ParamNames;
|
---|
121 |
|
---|
122 | //!> typedef for the list of all available basis sets
|
---|
123 | typedef std::map<std::string, std::list<std::string> > BasisMapType;
|
---|
124 |
|
---|
125 | //!> list of all basis along with their present element parametrization
|
---|
126 | BasisMapType BasisList;
|
---|
127 | };
|
---|
128 |
|
---|
129 | #endif /* MPQCPARSER_PARAMETERS_HPP_ */
|
---|