| [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
 | 
|---|
 | 60 |     unknownParam};   //!< unknownParam, designates an unknown parameter
 | 
|---|
| [61d69a4] | 61 | 
 | 
|---|
| [ee50c1] | 62 |   /** Enumeration of all known theories.
 | 
|---|
| [44fce5] | 63 |    *
 | 
|---|
 | 64 |    */
 | 
|---|
| [ee50c1] | 65 |   enum Theory {
 | 
|---|
 | 66 |     CLHF,       //!< Closed Shell Hartree-Fock equations
 | 
|---|
 | 67 |     CLKS,       //!< Closed Shell Kohn-Sham equations
 | 
|---|
 | 68 |     MBPT2,      //!< Moeller Plesset Perturbation Theory second order
 | 
|---|
 | 69 |     MBPT2_R12,  //!< Moeller Plesset Perturbation Theory second order with R12 integral
 | 
|---|
 | 70 |     unknownTheory //!< designates an unknown theory
 | 
|---|
 | 71 |   };
 | 
|---|
| [61d69a4] | 72 | 
 | 
|---|
| [42f2f0] | 73 |   /** Enumeration of all known boolean valus.
 | 
|---|
 | 74 |    *
 | 
|---|
 | 75 |    */
 | 
|---|
 | 76 |   enum Bools {
 | 
|---|
 | 77 |     no=0,         //!< false or not set
 | 
|---|
 | 78 |     yes=1,        //!< true or set
 | 
|---|
 | 79 |     unknownBool   //!> designates an unknown bool
 | 
|---|
 | 80 |   };
 | 
|---|
 | 81 | 
 | 
|---|
| [ee50c1] | 82 |   /** Enumeration of all known integration methods
 | 
|---|
| [44fce5] | 83 |    *
 | 
|---|
 | 84 |    */
 | 
|---|
| [ee50c1] | 85 |   enum IntegrationMethod {
 | 
|---|
 | 86 |     IntegralCints,  //!< Integration method Cints in MBPT2 R12?
 | 
|---|
 | 87 |     unknownIntegration //!< designates unknown integration method
 | 
|---|
 | 88 |   };
 | 
|---|
| [61d69a4] | 89 | 
 | 
|---|
| [ee50c1] | 90 |   // enum to string getters
 | 
|---|
 | 91 |   const std::string getParameter(const enum Parameters param) const;
 | 
|---|
 | 92 |   void setParameter(const enum Parameters param, const std::string &);
 | 
|---|
 | 93 |   const std::string &getParameterName(const enum Parameters param) const;
 | 
|---|
 | 94 |   const std::string &getTheoryName(const enum Theory theory) const;
 | 
|---|
 | 95 |   const std::string &getIntegrationMethodName(const enum IntegrationMethod integration) const;
 | 
|---|
| [44fce5] | 96 | 
 | 
|---|
| [ee50c1] | 97 | private:
 | 
|---|
| [44fce5] | 98 | 
 | 
|---|
| [ee50c1] | 99 |   //!> vector with all available theories in same order as enum Theory.
 | 
|---|
 | 100 |   std::vector<std::string> ValidTheories;
 | 
|---|
| [c1db05] | 101 | 
 | 
|---|
| [ee50c1] | 102 |   //!> vector with all available integration methods in same order as enum IntegrationMethod.
 | 
|---|
 | 103 |   std::vector<std::string> ValidIntegrationMethods;
 | 
|---|
| [c1db05] | 104 | 
 | 
|---|
| [42f2f0] | 105 |   //!> vector with all available bools in same order as enum Bools.
 | 
|---|
 | 106 |   std::vector<std::string> ValidBools;
 | 
|---|
 | 107 | 
 | 
|---|
| [ee50c1] | 108 |   bool checkWorldElementsAgainstCurrentBasis() const;
 | 
|---|
| [c1db05] | 109 | 
 | 
|---|
 | 110 |   /** Global initialization in cstor.
 | 
|---|
 | 111 |    *
 | 
|---|
 | 112 |    */
 | 
|---|
 | 113 |   void Init();
 | 
|---|
 | 114 | 
 | 
|---|
| [44fce5] | 115 |   /** Initializes BasisList.
 | 
|---|
 | 116 |    *
 | 
|---|
 | 117 |    */
 | 
|---|
| [61d69a4] | 118 |   void initBasis();
 | 
|---|
| [44fce5] | 119 | 
 | 
|---|
| [ee50c1] | 120 |   //!> vector with all parameter names in same order as enum Parameters
 | 
|---|
 | 121 |   std::vector<std::string> ParamNames;
 | 
|---|
| [61d69a4] | 122 | 
 | 
|---|
| [ee50c1] | 123 |   //!> typedef for the list of all available basis sets
 | 
|---|
| [61d69a4] | 124 |   typedef std::map<std::string, std::list<std::string> > BasisMapType;
 | 
|---|
 | 125 | 
 | 
|---|
| [ee50c1] | 126 |   //!> list of all basis along with their present element parametrization
 | 
|---|
| [61d69a4] | 127 |   BasisMapType BasisList;
 | 
|---|
 | 128 | };
 | 
|---|
 | 129 | 
 | 
|---|
 | 130 | #endif /* MPQCPARSER_PARAMETERS_HPP_ */
 | 
|---|