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