source: src/Parser/MpqcParser_Parameters.hpp@ ff4fff9

CombiningParticlePotentialParsing
Last change on this file since ff4fff9 was e3c4c5, checked in by Frederik Heber <heber@…>, 9 years ago

MpqcParser additionally allows to save optimization jobs.

  • this is enabled via a new flag "jobtype" that can be either Default or Optimization.
  • also storing "checkpoint = no" per default for all mpqc input files. This is a safety measures such that no old checkpoint files are used that reside in the same folder accidentally. This is especially important for fragment files.
  • TESTFIX: changed all regression tests comparing against .in files, added new checkpoint statement.
  • TESTFIX: changed unit test ParserMpqcUnitTest in the same manner.
  • Property mode set to 100644
File size: 4.4 KB
Line 
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 <string>
19#include <vector>
20
21#include "CodePatterns/Log.hpp"
22
23#include "Parser/FormatParser_Parameters.hpp"
24
25class MpqcParser;
26
27class MpqcParser_Parameters : public FormatParser_Parameters
28{
29 // MpqcParser should be friend to access params directly for types.
30 friend class MpqcParser;
31 // ParserMpqcUnitTest needs to be friend to check types contained in params.
32 friend class ParserMpqcUnitTest;
33
34public:
35 /** Constructor of MpqcParser_Parameters.
36 *
37 */
38 MpqcParser_Parameters();
39
40 /** Destructor of MpqcParser_Parameters.
41 *
42 */
43 virtual ~MpqcParser_Parameters();
44
45 /** Enumeration of all known Parameters to allow placing them in vectors, maps.
46 *
47 */
48 enum Parameters {
49 hessianParam, //!< HessianParam, whether hessian should be calculated or not
50 savestateParam, //!< savestateParam, whether intermediate/final states (wave function) should be stored
51 do_gradientParam,//!< do_gradientParam, whether a gradient should be calculated
52 maxiterParam, //!< maxiterParam, number of maximum iterations for CG
53 memoryParam, //!< memoryParam, maximum amount of memory to use
54 stdapproxParam, //!< stdapproxParam, standard approximation in MBPT2 R12
55 nfzcParam, //!< nfzcParam, nfzc parameter in MBPT2 R12
56 basisParam, //!< basisParam, basis set to use
57 aux_basisParam, //!< aux_basisParam, auxiliary baseis set to use in MBPT2 R12
58 integrationParam,//!< integrationParam, integration method to use in MBPT2 R12
59 theoryParam, //!< theoryParam, level of theory to use
60 jobtypeParam, //!< jobtypeParam, job type to use
61 unknownParam}; //!< unknownParam, designates an unknown parameter
62
63 /** Enumeration of all known theories.
64 *
65 */
66 enum Theory {
67 CLHF, //!< Closed Shell Hartree-Fock equations
68 CLKS, //!< Closed Shell Kohn-Sham equations
69 MBPT2, //!< Moeller Plesset Perturbation Theory second order
70 MBPT2_R12, //!< Moeller Plesset Perturbation Theory second order with R12 integral
71 unknownTheory //!< designates an unknown theory
72 };
73
74 /** Enumeration of all known jobtypes.
75 *
76 */
77 enum Jobtype {
78 Default, //!< standard energy and force calculation
79 Optimization, //!< additional optimization of geometry
80 unknownJob //!< designates an unknown job
81 };
82
83 /** Enumeration of all known boolean valus.
84 *
85 */
86 enum Bools {
87 no=0, //!< false or not set
88 yes=1, //!< true or set
89 unknownBool //!> designates an unknown bool
90 };
91
92 /** Enumeration of all known integration methods
93 *
94 */
95 enum IntegrationMethod {
96 IntegralCints, //!< Integration method Cints in MBPT2 R12?
97 unknownIntegration //!< designates unknown integration method
98 };
99
100 // enum to string getters
101 const std::string getParameter(const enum Parameters param) const;
102 void setParameter(const enum Parameters param, const std::string &);
103 const std::string &getParameterName(const enum Parameters param) const;
104 const std::string &getTheoryName(const enum Theory theory) const;
105 const std::string &getJobtypeName(const enum Jobtype jobtype) const;
106 const std::string &getIntegrationMethodName(const enum IntegrationMethod integration) const;
107
108private:
109
110 //!> vector with all available theories in same order as enum Theory.
111 std::vector<std::string> ValidTheories;
112
113 //!> vector with all available jobtypes in same order as enum Jobs.
114 std::vector<std::string> ValidJobtypes;
115
116 //!> vector with all available integration methods in same order as enum IntegrationMethod.
117 std::vector<std::string> ValidIntegrationMethods;
118
119 //!> vector with all available bools in same order as enum Bools.
120 std::vector<std::string> ValidBools;
121
122 bool checkWorldElementsAgainstCurrentBasis() const;
123
124 /** Global initialization in cstor.
125 *
126 */
127 void Init();
128
129 /** Initializes BasisList.
130 *
131 */
132 void initBasis();
133
134 //!> vector with all parameter names in same order as enum Parameters
135 std::vector<std::string> ParamNames;
136
137 //!> typedef for the list of all available basis sets
138 typedef std::map<std::string, std::list<std::string> > BasisMapType;
139
140 //!> list of all basis along with their present element parametrization
141 BasisMapType BasisList;
142};
143
144#endif /* MPQCPARSER_PARAMETERS_HPP_ */
Note: See TracBrowser for help on using the repository browser.