source: src/config.hpp@ e5ad5c

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 e5ad5c was fa649a, checked in by Frederik Heber <heber@…>, 15 years ago

Small changes.

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