[61d69a4] | 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>
|
---|
[ee50c1] | 17 | #include <map>
|
---|
[cf1d82] | 18 | #include <string>
|
---|
[61d69a4] | 19 | #include <vector>
|
---|
| 20 |
|
---|
| 21 | #include "CodePatterns/Log.hpp"
|
---|
| 22 |
|
---|
[c1db05] | 23 | #include "Parser/FormatParser_Parameters.hpp"
|
---|
[61d69a4] | 24 |
|
---|
| 25 | class MpqcParser;
|
---|
| 26 |
|
---|
[c1db05] | 27 | class MpqcParser_Parameters : public FormatParser_Parameters
|
---|
[61d69a4] | 28 | {
|
---|
[44fce5] | 29 | // MpqcParser should be friend to access params directly for types.
|
---|
[61d69a4] | 30 | friend class MpqcParser;
|
---|
[44fce5] | 31 | // ParserMpqcUnitTest needs to be friend to check types contained in params.
|
---|
[61d69a4] | 32 | friend class ParserMpqcUnitTest;
|
---|
[44fce5] | 33 |
|
---|
[61d69a4] | 34 | public:
|
---|
[44fce5] | 35 | /** Constructor of MpqcParser_Parameters.
|
---|
| 36 | *
|
---|
| 37 | */
|
---|
[61d69a4] | 38 | MpqcParser_Parameters();
|
---|
[44fce5] | 39 |
|
---|
| 40 | /** Destructor of MpqcParser_Parameters.
|
---|
| 41 | *
|
---|
| 42 | */
|
---|
[c1db05] | 43 | virtual ~MpqcParser_Parameters();
|
---|
[61d69a4] | 44 |
|
---|
[44fce5] | 45 | /** Enumeration of all known Parameters to allow placing them in vectors, maps.
|
---|
| 46 | *
|
---|
| 47 | */
|
---|
[61d69a4] | 48 | enum Parameters {
|
---|
[44fce5] | 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
|
---|
[e3c4c5] | 60 | jobtypeParam, //!< jobtypeParam, job type to use
|
---|
[44fce5] | 61 | unknownParam}; //!< unknownParam, designates an unknown parameter
|
---|
[61d69a4] | 62 |
|
---|
[ee50c1] | 63 | /** Enumeration of all known theories.
|
---|
[44fce5] | 64 | *
|
---|
| 65 | */
|
---|
[ee50c1] | 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 | };
|
---|
[61d69a4] | 73 |
|
---|
[e3c4c5] | 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 |
|
---|
[42f2f0] | 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 |
|
---|
[ee50c1] | 92 | /** Enumeration of all known integration methods
|
---|
[44fce5] | 93 | *
|
---|
| 94 | */
|
---|
[ee50c1] | 95 | enum IntegrationMethod {
|
---|
| 96 | IntegralCints, //!< Integration method Cints in MBPT2 R12?
|
---|
| 97 | unknownIntegration //!< designates unknown integration method
|
---|
| 98 | };
|
---|
[61d69a4] | 99 |
|
---|
[ee50c1] | 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;
|
---|
[e3c4c5] | 105 | const std::string &getJobtypeName(const enum Jobtype jobtype) const;
|
---|
[ee50c1] | 106 | const std::string &getIntegrationMethodName(const enum IntegrationMethod integration) const;
|
---|
[44fce5] | 107 |
|
---|
[ee50c1] | 108 | private:
|
---|
[44fce5] | 109 |
|
---|
[ee50c1] | 110 | //!> vector with all available theories in same order as enum Theory.
|
---|
| 111 | std::vector<std::string> ValidTheories;
|
---|
[c1db05] | 112 |
|
---|
[e3c4c5] | 113 | //!> vector with all available jobtypes in same order as enum Jobs.
|
---|
| 114 | std::vector<std::string> ValidJobtypes;
|
---|
| 115 |
|
---|
[ee50c1] | 116 | //!> vector with all available integration methods in same order as enum IntegrationMethod.
|
---|
| 117 | std::vector<std::string> ValidIntegrationMethods;
|
---|
[c1db05] | 118 |
|
---|
[42f2f0] | 119 | //!> vector with all available bools in same order as enum Bools.
|
---|
| 120 | std::vector<std::string> ValidBools;
|
---|
| 121 |
|
---|
[ee50c1] | 122 | bool checkWorldElementsAgainstCurrentBasis() const;
|
---|
[c1db05] | 123 |
|
---|
| 124 | /** Global initialization in cstor.
|
---|
| 125 | *
|
---|
| 126 | */
|
---|
| 127 | void Init();
|
---|
| 128 |
|
---|
[44fce5] | 129 | /** Initializes BasisList.
|
---|
| 130 | *
|
---|
| 131 | */
|
---|
[61d69a4] | 132 | void initBasis();
|
---|
[44fce5] | 133 |
|
---|
[ee50c1] | 134 | //!> vector with all parameter names in same order as enum Parameters
|
---|
| 135 | std::vector<std::string> ParamNames;
|
---|
[61d69a4] | 136 |
|
---|
[ee50c1] | 137 | //!> typedef for the list of all available basis sets
|
---|
[61d69a4] | 138 | typedef std::map<std::string, std::list<std::string> > BasisMapType;
|
---|
| 139 |
|
---|
[ee50c1] | 140 | //!> list of all basis along with their present element parametrization
|
---|
[61d69a4] | 141 | BasisMapType BasisList;
|
---|
| 142 | };
|
---|
| 143 |
|
---|
| 144 | #endif /* MPQCPARSER_PARAMETERS_HPP_ */
|
---|