source: molecuilder/src/config.hpp@ 104cf4

Last change on this file since 104cf4 was 17b3a5c, 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.