source: src/Parser/Psi3Parser_Parameters.hpp@ e45c1d

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since e45c1d was e45c1d, checked in by Frederik Heber <heber@…>, 13 years ago

Added ParameterExceptions, is caught by Dialog::checkAll() for the moment.

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