source: src/config.hpp@ bbc338

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 bbc338 was f66195, checked in by Frederik Heber <heber@…>, 16 years ago

forward declarations used to untangle interdependet classes.

  • basically, everywhere in header files we removed '#include' lines were only pointer to the respective classes were used and the include line was moved to the implementation file.
  • as a sidenote, lots of funny errors happened because headers were included via a nesting over three other includes. Now, all should be declared directly as needed, as only very little include lines remain in header files.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*
2 * config.hpp
3 *
4 * Created on: Aug 3, 2009
5 * Author: heber
6 */
7
8#ifndef CONFIG_HPP_
9#define CONFIG_HPP_
10
11using namespace std;
12
13/*********************************************** includes ***********************************/
14
15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
20#include <string>
21
22/****************************************** forward declarations *****************************/
23
24class molecule;
25class periodentafel;
26
27/********************************************** declarations *******************************/
28
29class ConfigFileBuffer {
30 public:
31 char **buffer;
32 int *LineMapping;
33 int CurrentLine;
34 int NoLines;
35
36 ConfigFileBuffer();
37 ConfigFileBuffer(char *filename);
38 ~ConfigFileBuffer();
39
40 void InitMapping();
41 void MapIonTypesInBuffer(int NoAtoms);
42};
43
44/** The config file.
45 * The class contains all parameters that control a dft run also functions to load and save.
46 */
47class config {
48 public:
49 int PsiType;
50 int MaxPsiDouble;
51 int PsiMaxNoUp;
52 int PsiMaxNoDown;
53 int MaxMinStopStep;
54 int InitMaxMinStopStep;
55 int ProcPEGamma;
56 int ProcPEPsi;
57 char *configpath;
58 char *configname;
59 bool FastParsing;
60 double Deltat;
61 string basis;
62
63 char *databasepath;
64
65 int DoConstrainedMD;
66 int MaxOuterStep;
67 int Thermostat;
68 int *ThermostatImplemented;
69 char **ThermostatNames;
70 double TempFrequency;
71 double alpha;
72 double HooverMass;
73 double TargetTemp;
74 int ScaleTempStep;
75
76 private:
77 char *mainname;
78 char *defaultpath;
79 char *pseudopotpath;
80
81 int DoOutVis;
82 int DoOutMes;
83 int DoOutNICS;
84 int DoOutOrbitals;
85 int DoOutCurrent;
86 int DoFullCurrent;
87 int DoPerturbation;
88 int DoWannier;
89 int CommonWannier;
90 double SawtoothStart;
91 int VectorPlane;
92 double VectorCut;
93 int UseAddGramSch;
94 int Seed;
95
96 int OutVisStep;
97 int OutSrcStep;
98 int MaxPsiStep;
99 double EpsWannier;
100
101 int MaxMinStep;
102 double RelEpsTotalEnergy;
103 double RelEpsKineticEnergy;
104 int MaxMinGapStopStep;
105 int MaxInitMinStep;
106 double InitRelEpsTotalEnergy;
107 double InitRelEpsKineticEnergy;
108 int InitMaxMinGapStopStep;
109
110 //double BoxLength[NDIM*NDIM];
111
112 double ECut;
113 int MaxLevel;
114 int RiemannTensor;
115 int LevRFactor;
116 int RiemannLevel;
117 int Lev0Factor;
118 int RTActualUse;
119 int AddPsis;
120
121 double RCut;
122 int StructOpt;
123 int IsAngstroem;
124 int RelativeCoord;
125 int MaxTypes;
126
127
128 int ParseForParameter(int verbose, ifstream *file, const char *name, int sequential, int const xth, int const yth, int type, void *value, int repetition, int critical);
129 int ParseForParameter(int verbose, struct ConfigFileBuffer *FileBuffer, const char *name, int sequential, int const xth, int const yth, int type, void *value, int repetition, int critical);
130
131 public:
132 config();
133 ~config();
134
135 int TestSyntax(char *filename, periodentafel *periode, molecule *mol);
136 void Load(char *filename, periodentafel *periode, molecule *mol);
137 void LoadOld(char *filename, periodentafel *periode, molecule *mol);
138 void RetrieveConfigPathAndName(string filename);
139 bool Save(const char *filename, periodentafel *periode, molecule *mol) const;
140 bool SaveMPQC(const char *filename, molecule *mol) const;
141 void Edit();
142 bool GetIsAngstroem() const;
143 char *GetDefaultPath() const;
144 void SetDefaultPath(const char *path);
145 void InitThermostats(class ConfigFileBuffer *fb);
146};
147
148#endif /* CONFIG_HPP_ */
Note: See TracBrowser for help on using the repository browser.