source: molecuilder/src/config.hpp@ 4dca8e

Last change on this file since 4dca8e was 4dca8e, checked in by Frederik Heber <heber@…>, 16 years ago

definitions for class element and verbose moved to their own header files and reducing contents of helpers.hpp

  • Property mode set to 100644
File size: 2.9 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// include config.h
14#ifdef HAVE_CONFIG_H
15#include <config.h>
16#endif
17
18
19#include "molecules.hpp"
20#include "periodentafel.hpp"
21
22/** The config file.
23 * The class contains all parameters that control a dft run also functions to load and save.
24 */
25class config {
26 public:
27 int PsiType;
28 int MaxPsiDouble;
29 int PsiMaxNoUp;
30 int PsiMaxNoDown;
31 int MaxMinStopStep;
32 int InitMaxMinStopStep;
33 int ProcPEGamma;
34 int ProcPEPsi;
35 char *configpath;
36 char *configname;
37 bool FastParsing;
38 double Deltat;
39 string basis;
40
41 char *databasepath;
42
43 int DoConstrainedMD;
44 int MaxOuterStep;
45 int Thermostat;
46 int *ThermostatImplemented;
47 char **ThermostatNames;
48 double TempFrequency;
49 double alpha;
50 double HooverMass;
51 double TargetTemp;
52 int ScaleTempStep;
53
54 private:
55 char *mainname;
56 char *defaultpath;
57 char *pseudopotpath;
58
59 int DoOutVis;
60 int DoOutMes;
61 int DoOutNICS;
62 int DoOutOrbitals;
63 int DoOutCurrent;
64 int DoFullCurrent;
65 int DoPerturbation;
66 int DoWannier;
67 int CommonWannier;
68 double SawtoothStart;
69 int VectorPlane;
70 double VectorCut;
71 int UseAddGramSch;
72 int Seed;
73
74 int OutVisStep;
75 int OutSrcStep;
76 int MaxPsiStep;
77 double EpsWannier;
78
79 int MaxMinStep;
80 double RelEpsTotalEnergy;
81 double RelEpsKineticEnergy;
82 int MaxMinGapStopStep;
83 int MaxInitMinStep;
84 double InitRelEpsTotalEnergy;
85 double InitRelEpsKineticEnergy;
86 int InitMaxMinGapStopStep;
87
88 //double BoxLength[NDIM*NDIM];
89
90 double ECut;
91 int MaxLevel;
92 int RiemannTensor;
93 int LevRFactor;
94 int RiemannLevel;
95 int Lev0Factor;
96 int RTActualUse;
97 int AddPsis;
98
99 double RCut;
100 int StructOpt;
101 int IsAngstroem;
102 int RelativeCoord;
103 int MaxTypes;
104
105
106 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);
107 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);
108
109 public:
110 config();
111 ~config();
112
113 int TestSyntax(char *filename, periodentafel *periode, molecule *mol);
114 void Load(char *filename, periodentafel *periode, molecule *mol);
115 void LoadOld(char *filename, periodentafel *periode, molecule *mol);
116 void RetrieveConfigPathAndName(string filename);
117 bool Save(const char *filename, periodentafel *periode, molecule *mol) const;
118 bool SaveMPQC(const char *filename, molecule *mol) const;
119 void Edit();
120 bool GetIsAngstroem() const;
121 char *GetDefaultPath() const;
122 void SetDefaultPath(const char *path);
123 void InitThermostats(class ConfigFileBuffer *fb);
124};
125
126#endif /* CONFIG_HPP_ */
Note: See TracBrowser for help on using the repository browser.