source: src/Parser/Psi3Parser_Parameters.hpp@ f758dd

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 f758dd was 1bef07, checked in by Frederik Heber <heber@…>, 13 years ago

Added first working version of a Psi3Parser.

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