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