source: src/config.hpp@ d6c485

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

Added config::SavePDB() and config::SaveMPQC().

  • note: for CODICE we need to know about the different connected subgraphs created by the DFSAnalysis(). Hence, we write a pdb file which contains a resid number to discern in VMD between the molecules. Also, we need neighbour construction from a simple xyz file for TREMOLO in order to measure MSDs per water molecule.
  • new function in config.cpp: config::SavePDB() gets molecule or MoleculeListClass and writes PDB file
  • new function in config.cpp: config::SaveTREMOLO() gets molecule or MoleculeListClass and writes TREMOLO data file (with neighbours, mapped to global ids, and resid and resname)
  • new function in moleculelist.cpp: MoleculeListClass::CountAllAtoms() - counts all atoms.
  • BUGFIX: In MoleculeListClass::DissectMoleculeIntoConnectedSubgraphs() we did not shift the chained bond list from mol into the connected subgraphs. Thus, they were free'd on delete(mol) and no bonds were present afterwards. This is fixed, now we unlink() in mol and re-link() in the respective subgraph
  • Property mode set to 100644
File size: 4.4 KB
RevLine 
[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
11using namespace std;
12
[f66195]13/*********************************************** includes ***********************************/
14
[cd4ccc]15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
[f66195]20#include <string>
21
[b21a64]22#include "bondgraph.hpp"
23
[f66195]24/****************************************** forward declarations *****************************/
25
26class molecule;
[568be7]27class MoleculeListClass;
[f66195]28class periodentafel;
29
30/********************************************** declarations *******************************/
[a80fbdf]31
[34e0592]32class ConfigFileBuffer {
33 public:
34 char **buffer;
35 int *LineMapping;
36 int CurrentLine;
37 int NoLines;
38
39 ConfigFileBuffer();
[fb73b8]40 ConfigFileBuffer(const char * const filename);
[34e0592]41 ~ConfigFileBuffer();
42
43 void InitMapping();
[fb73b8]44 void MapIonTypesInBuffer(const int NoAtoms);
[34e0592]45};
46
[a80fbdf]47/** The config file.
48 * The class contains all parameters that control a dft run also functions to load and save.
49 */
50class config {
51 public:
[b21a64]52 class BondGraph *BG;
53
[a80fbdf]54 int PsiType;
55 int MaxPsiDouble;
56 int PsiMaxNoUp;
57 int PsiMaxNoDown;
58 int MaxMinStopStep;
59 int InitMaxMinStopStep;
60 int ProcPEGamma;
61 int ProcPEPsi;
62 char *configpath;
63 char *configname;
64 bool FastParsing;
65 double Deltat;
66 string basis;
67
68 char *databasepath;
69
70 int DoConstrainedMD;
71 int MaxOuterStep;
72 int Thermostat;
73 int *ThermostatImplemented;
74 char **ThermostatNames;
75 double TempFrequency;
76 double alpha;
77 double HooverMass;
78 double TargetTemp;
79 int ScaleTempStep;
80
81 private:
82 char *mainname;
83 char *defaultpath;
84 char *pseudopotpath;
85
86 int DoOutVis;
87 int DoOutMes;
88 int DoOutNICS;
89 int DoOutOrbitals;
90 int DoOutCurrent;
91 int DoFullCurrent;
92 int DoPerturbation;
93 int DoWannier;
94 int CommonWannier;
95 double SawtoothStart;
96 int VectorPlane;
97 double VectorCut;
98 int UseAddGramSch;
99 int Seed;
100
101 int OutVisStep;
102 int OutSrcStep;
103 int MaxPsiStep;
104 double EpsWannier;
105
106 int MaxMinStep;
107 double RelEpsTotalEnergy;
108 double RelEpsKineticEnergy;
109 int MaxMinGapStopStep;
110 int MaxInitMinStep;
111 double InitRelEpsTotalEnergy;
112 double InitRelEpsKineticEnergy;
113 int InitMaxMinGapStopStep;
114
115 //double BoxLength[NDIM*NDIM];
116
117 double ECut;
118 int MaxLevel;
119 int RiemannTensor;
120 int LevRFactor;
121 int RiemannLevel;
122 int Lev0Factor;
123 int RTActualUse;
124 int AddPsis;
125
126 double RCut;
127 int StructOpt;
128 int IsAngstroem;
129 int RelativeCoord;
130 int MaxTypes;
131
132
133 public:
134 config();
135 ~config();
136
[fa649a]137 int TestSyntax(const char * const filename, const periodentafel * const periode) const;
138 void Load(const char * const filename, const string &BondGraphFileName, const periodentafel * const periode, MoleculeListClass * const &MolList);
139 void LoadOld(const char * const filename, const string &BondGraphFileName, const periodentafel * const periode, MoleculeListClass * const &MolList);
[fb73b8]140 void RetrieveConfigPathAndName(const string filename);
141 bool Save(const char * const filename, const periodentafel * const periode, molecule * const mol) const;
142 bool SaveMPQC(const char * const filename, const molecule * const mol) const;
[568be7]143 bool SavePDB(const char * const filename, const MoleculeListClass * const MolList) const;
144 bool SavePDB(const char * const filename, const molecule * const mol) const;
145 bool SaveTREMOLO(const char * const filename, const molecule * const mol) const;
146 bool SaveTREMOLO(const char * const filename, const MoleculeListClass * const MolList) const;
147
[a80fbdf]148 void Edit();
149 bool GetIsAngstroem() const;
150 char *GetDefaultPath() const;
[fb73b8]151 void SetDefaultPath(const char * const path);
152 void InitThermostats();
153 void ParseThermostats(class ConfigFileBuffer * const fb);
[a80fbdf]154};
155
[fb73b8]156int 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);
157int 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);
158void LoadMolecule(molecule * const &mol, struct ConfigFileBuffer * const &FileBuffer, const periodentafel * const periode, const bool FastParsing);
159void PrepareFileBuffer(const char * const filename, struct ConfigFileBuffer *&FileBuffer);
[3a9fe9]160
[a80fbdf]161#endif /* CONFIG_HPP_ */
Note: See TracBrowser for help on using the repository browser.