source: src/Parser/PcpParser.cpp@ 5ec8e3

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 5ec8e3 was 5ec8e3, checked in by Tillmann Crueger <crueger@…>, 15 years ago

Merge branch 'VectorRefactoring' into StructureRefactoring

Conflicts:

molecuilder/src/Makefile.am

  • Property mode set to 100644
File size: 37.7 KB
Line 
1/*
2 * PcpParser.cpp
3 *
4 * Created on: 12.06.2010
5 * Author: heber
6 */
7
8#include <iostream>
9
10#include "atom.hpp"
11#include "config.hpp"
12#include "ConfigFileBuffer.hpp"
13#include "element.hpp"
14#include "Helpers/Assert.hpp"
15#include "log.hpp"
16#include "molecule.hpp"
17#include "PcpParser.hpp"
18#include "periodentafel.hpp"
19#include "ThermoStatContainer.hpp"
20#include "verbose.hpp"
21#include "World.hpp"
22#include "Matrix.hpp"
23#include "Box.hpp"
24
25/** Constructor of PcpParser.
26 *
27 */
28PcpParser::PcpParser()
29{
30 Parallelization.ProcPEGamma = 8;
31 Parallelization.ProcPEPsi = 1;
32
33 Paths.databasepath = NULL;
34 Paths.configname = NULL;
35 Paths.mainname = NULL;
36 Paths.defaultpath = NULL;
37 Paths.pseudopotpath = NULL;
38
39 Switches.DoConstrainedMD = 0;
40 Switches.DoOutVis = 0;
41 Switches.DoOutMes = 1;
42 Switches.DoOutNICS = 0;
43 Switches.DoOutOrbitals = 0;
44 Switches.DoOutCurrent = 0;
45 Switches.DoFullCurrent = 0;
46 Switches.DoPerturbation = 0;
47 Switches.DoWannier = 0;
48
49 LocalizedOrbitals.CommonWannier = 0;
50 LocalizedOrbitals.SawtoothStart = 0.01;
51 LocalizedOrbitals.VectorPlane = 0;
52 LocalizedOrbitals.VectorCut = 0;
53 LocalizedOrbitals.UseAddGramSch = 1;
54 LocalizedOrbitals.Seed = 1;
55 LocalizedOrbitals.EpsWannier = 1e-7;
56
57 StepCounts.MaxMinStopStep = 1;
58 StepCounts.InitMaxMinStopStep = 1;
59 StepCounts.OutVisStep = 10;
60 StepCounts.OutSrcStep = 5;
61 StepCounts.MaxPsiStep = 0;
62 StepCounts.MaxOuterStep = 0;
63 StepCounts.MaxMinStep = 100;
64 StepCounts.RelEpsTotalEnergy = 1e-07;
65 StepCounts.RelEpsKineticEnergy = 1e-05;
66 StepCounts.MaxMinGapStopStep = 0;
67 StepCounts.MaxInitMinStep = 100;
68 StepCounts.InitRelEpsTotalEnergy = 1e-05;
69 StepCounts.InitRelEpsKineticEnergy = 0.0001;
70 StepCounts.InitMaxMinGapStopStep = 0;
71
72 PlaneWaveSpecifics.PsiType = 0;
73 PlaneWaveSpecifics.MaxPsiDouble = 0;
74 PlaneWaveSpecifics.PsiMaxNoUp = 0;
75 PlaneWaveSpecifics.PsiMaxNoDown = 0;
76 PlaneWaveSpecifics.ECut = 128;
77 PlaneWaveSpecifics.MaxLevel = 5;
78 PlaneWaveSpecifics.RiemannTensor = 0;
79 PlaneWaveSpecifics.LevRFactor = 0;
80 PlaneWaveSpecifics.RiemannLevel = 0;
81 PlaneWaveSpecifics.Lev0Factor = 2;
82 PlaneWaveSpecifics.RTActualUse = 0;
83 PlaneWaveSpecifics.AddPsis = 0;
84 PlaneWaveSpecifics.RCut = 20;
85 PlaneWaveSpecifics.PsiType = 0;
86
87 FastParsing = false;
88
89 Deltat = 0.01;
90 IsAngstroem = 1;
91 RelativeCoord = 0;
92 StructOpt = 0;
93 MaxTypes = 0;
94}
95
96/** Destructor of PcpParser.
97 *
98 */
99PcpParser::~PcpParser()
100{}
101
102void PcpParser::load(std::istream* file)
103{
104 if (file->fail()) {
105 DoeLog(1) && (eLog()<< Verbose(1) << "could not access given file" << endl);
106 return;
107 }
108
109 // ParseParameterFile
110 class ConfigFileBuffer *FileBuffer = new ConfigFileBuffer();
111 FileBuffer->InitFileBuffer(file);
112
113 /* Oeffne Hauptparameterdatei */
114 int di = 0;
115 double BoxLength[9];
116 string zeile;
117 string dummy;
118 int verbose = 0;
119
120 ParseThermostats(FileBuffer);
121
122 /* Namen einlesen */
123
124 // 1. parse in options
125 ParseForParameter(verbose,FileBuffer, "mainname", 0, 1, 1, string_type, (Paths.mainname), 1, critical);
126 ParseForParameter(verbose,FileBuffer, "defaultpath", 0, 1, 1, string_type, (Paths.defaultpath), 1, critical);
127 ParseForParameter(verbose,FileBuffer, "pseudopotpath", 0, 1, 1, string_type, (Paths.pseudopotpath), 1, critical);
128 ParseForParameter(verbose,FileBuffer,"ProcPEGamma", 0, 1, 1, int_type, &(Parallelization.ProcPEGamma), 1, critical);
129 ParseForParameter(verbose,FileBuffer,"ProcPEPsi", 0, 1, 1, int_type, &(Parallelization.ProcPEPsi), 1, critical);
130
131 if (!ParseForParameter(verbose,FileBuffer,"Seed", 0, 1, 1, int_type, &(LocalizedOrbitals.Seed), 1, optional))
132 LocalizedOrbitals.Seed = 1;
133
134 if(!ParseForParameter(verbose,FileBuffer,"DoOutOrbitals", 0, 1, 1, int_type, &(Switches.DoOutOrbitals), 1, optional)) {
135 Switches.DoOutOrbitals = 0;
136 } else {
137 if (Switches.DoOutOrbitals < 0) Switches.DoOutOrbitals = 0;
138 if (Switches.DoOutOrbitals > 1) Switches.DoOutOrbitals = 1;
139 }
140 ParseForParameter(verbose,FileBuffer,"DoOutVis", 0, 1, 1, int_type, &(Switches.DoOutVis), 1, critical);
141 if (Switches.DoOutVis < 0) Switches.DoOutVis = 0;
142 if (Switches.DoOutVis > 1) Switches.DoOutVis = 1;
143 if (!ParseForParameter(verbose,FileBuffer,"VectorPlane", 0, 1, 1, int_type, &(LocalizedOrbitals.VectorPlane), 1, optional))
144 LocalizedOrbitals.VectorPlane = -1;
145 if (!ParseForParameter(verbose,FileBuffer,"VectorCut", 0, 1, 1, double_type, &(LocalizedOrbitals.VectorCut), 1, optional))
146 LocalizedOrbitals.VectorCut = 0.;
147 ParseForParameter(verbose,FileBuffer,"DoOutMes", 0, 1, 1, int_type, &(Switches.DoOutMes), 1, critical);
148 if (Switches.DoOutMes < 0) Switches.DoOutMes = 0;
149 if (Switches.DoOutMes > 1) Switches.DoOutMes = 1;
150 if (!ParseForParameter(verbose,FileBuffer,"DoOutCurr", 0, 1, 1, int_type, &(Switches.DoOutCurrent), 1, optional))
151 Switches.DoOutCurrent = 0;
152 if (Switches.DoOutCurrent < 0) Switches.DoOutCurrent = 0;
153 if (Switches.DoOutCurrent > 1) Switches.DoOutCurrent = 1;
154 ParseForParameter(verbose,FileBuffer,"AddGramSch", 0, 1, 1, int_type, &(LocalizedOrbitals.UseAddGramSch), 1, critical);
155 if (LocalizedOrbitals.UseAddGramSch < 0) LocalizedOrbitals.UseAddGramSch = 0;
156 if (LocalizedOrbitals.UseAddGramSch > 2) LocalizedOrbitals.UseAddGramSch = 2;
157 if(!ParseForParameter(verbose,FileBuffer,"DoWannier", 0, 1, 1, int_type, &(Switches.DoWannier), 1, optional)) {
158 Switches.DoWannier = 0;
159 } else {
160 if (Switches.DoWannier < 0) Switches.DoWannier = 0;
161 if (Switches.DoWannier > 1) Switches.DoWannier = 1;
162 }
163 if(!ParseForParameter(verbose,FileBuffer,"CommonWannier", 0, 1, 1, int_type, &(LocalizedOrbitals.CommonWannier), 1, optional)) {
164 LocalizedOrbitals.CommonWannier = 0;
165 } else {
166 if (LocalizedOrbitals.CommonWannier < 0) LocalizedOrbitals.CommonWannier = 0;
167 if (LocalizedOrbitals.CommonWannier > 4) LocalizedOrbitals.CommonWannier = 4;
168 }
169 if(!ParseForParameter(verbose,FileBuffer,"SawtoothStart", 0, 1, 1, double_type, &(LocalizedOrbitals.SawtoothStart), 1, optional)) {
170 LocalizedOrbitals.SawtoothStart = 0.01;
171 } else {
172 if (LocalizedOrbitals.SawtoothStart < 0.) LocalizedOrbitals.SawtoothStart = 0.;
173 if (LocalizedOrbitals.SawtoothStart > 1.) LocalizedOrbitals.SawtoothStart = 1.;
174 }
175
176 if (ParseForParameter(verbose,FileBuffer,"DoConstrainedMD", 0, 1, 1, int_type, &(Switches.DoConstrainedMD), 1, optional))
177 if (Switches.DoConstrainedMD < 0)
178 Switches.DoConstrainedMD = 0;
179 ParseForParameter(verbose,FileBuffer,"MaxOuterStep", 0, 1, 1, int_type, &(StepCounts.MaxOuterStep), 1, critical);
180 if (!ParseForParameter(verbose,FileBuffer,"Deltat", 0, 1, 1, double_type, &(Deltat), 1, optional))
181 Deltat = 1;
182 ParseForParameter(verbose,FileBuffer,"OutVisStep", 0, 1, 1, int_type, &(StepCounts.OutVisStep), 1, optional);
183 ParseForParameter(verbose,FileBuffer,"OutSrcStep", 0, 1, 1, int_type, &(StepCounts.OutSrcStep), 1, optional);
184 ParseForParameter(verbose,FileBuffer,"TargetTemp", 0, 1, 1, double_type, &(World::getInstance().getThermostats()->TargetTemp), 1, optional);
185 //ParseForParameter(verbose,FileBuffer,"Thermostat", 0, 1, 1, int_type, &(ScaleTempStep), 1, optional);
186 if (!ParseForParameter(verbose,FileBuffer,"EpsWannier", 0, 1, 1, double_type, &(LocalizedOrbitals.EpsWannier), 1, optional))
187 LocalizedOrbitals.EpsWannier = 1e-8;
188
189 // stop conditions
190 //if (MaxOuterStep <= 0) MaxOuterStep = 1;
191 ParseForParameter(verbose,FileBuffer,"MaxPsiStep", 0, 1, 1, int_type, &(StepCounts.MaxPsiStep), 1, critical);
192 if (StepCounts.MaxPsiStep <= 0) StepCounts.MaxPsiStep = 3;
193
194 ParseForParameter(verbose,FileBuffer,"MaxMinStep", 0, 1, 1, int_type, &(StepCounts.MaxMinStep), 1, critical);
195 ParseForParameter(verbose,FileBuffer,"RelEpsTotalE", 0, 1, 1, double_type, &(StepCounts.RelEpsTotalEnergy), 1, critical);
196 ParseForParameter(verbose,FileBuffer,"RelEpsKineticE", 0, 1, 1, double_type, &(StepCounts.RelEpsKineticEnergy), 1, critical);
197 ParseForParameter(verbose,FileBuffer,"MaxMinStopStep", 0, 1, 1, int_type, &(StepCounts.MaxMinStopStep), 1, critical);
198 ParseForParameter(verbose,FileBuffer,"MaxMinGapStopStep", 0, 1, 1, int_type, &(StepCounts.MaxMinGapStopStep), 1, critical);
199 if (StepCounts.MaxMinStep <= 0) StepCounts.MaxMinStep = StepCounts.MaxPsiStep;
200 if (StepCounts.MaxMinStopStep < 1) StepCounts.MaxMinStopStep = 1;
201 if (StepCounts.MaxMinGapStopStep < 1) StepCounts.MaxMinGapStopStep = 1;
202
203 ParseForParameter(verbose,FileBuffer,"MaxInitMinStep", 0, 1, 1, int_type, &(StepCounts.MaxInitMinStep), 1, critical);
204 ParseForParameter(verbose,FileBuffer,"InitRelEpsTotalE", 0, 1, 1, double_type, &(StepCounts.InitRelEpsTotalEnergy), 1, critical);
205 ParseForParameter(verbose,FileBuffer,"InitRelEpsKineticE", 0, 1, 1, double_type, &(StepCounts.InitRelEpsKineticEnergy), 1, critical);
206 ParseForParameter(verbose,FileBuffer,"InitMaxMinStopStep", 0, 1, 1, int_type, &(StepCounts.InitMaxMinStopStep), 1, critical);
207 ParseForParameter(verbose,FileBuffer,"InitMaxMinGapStopStep", 0, 1, 1, int_type, &(StepCounts.InitMaxMinGapStopStep), 1, critical);
208 if (StepCounts.MaxInitMinStep <= 0) StepCounts.MaxInitMinStep = StepCounts.MaxPsiStep;
209 if (StepCounts.InitMaxMinStopStep < 1) StepCounts.InitMaxMinStopStep = 1;
210 if (StepCounts.InitMaxMinGapStopStep < 1) StepCounts.InitMaxMinGapStopStep = 1;
211
212 // Unit cell and magnetic field
213 ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
214 double *cell_size = new double[6];
215 cell_size[0] = BoxLength[0];
216 cell_size[1] = BoxLength[3];
217 cell_size[2] = BoxLength[4];
218 cell_size[3] = BoxLength[6];
219 cell_size[4] = BoxLength[7];
220 cell_size[5] = BoxLength[8];
221 World::getInstance().setDomain(cell_size);
222 delete[] cell_size;
223 //if (1) fprintf(stderr,"\n");
224
225 ParseForParameter(verbose,FileBuffer,"DoPerturbation", 0, 1, 1, int_type, &(Switches.DoPerturbation), 1, optional);
226 ParseForParameter(verbose,FileBuffer,"DoOutNICS", 0, 1, 1, int_type, &(Switches.DoOutNICS), 1, optional);
227 if (!ParseForParameter(verbose,FileBuffer,"DoFullCurrent", 0, 1, 1, int_type, &(Switches.DoFullCurrent), 1, optional))
228 Switches.DoFullCurrent = 0;
229 if (Switches.DoFullCurrent < 0) Switches.DoFullCurrent = 0;
230 if (Switches.DoFullCurrent > 2) Switches.DoFullCurrent = 2;
231 if (Switches.DoOutNICS < 0) Switches.DoOutNICS = 0;
232 if (Switches.DoOutNICS > 2) Switches.DoOutNICS = 2;
233 if (Switches.DoPerturbation == 0) {
234 Switches.DoFullCurrent = 0;
235 Switches.DoOutNICS = 0;
236 }
237
238 ParseForParameter(verbose,FileBuffer,"ECut", 0, 1, 1, double_type, &(PlaneWaveSpecifics.ECut), 1, critical);
239 ParseForParameter(verbose,FileBuffer,"MaxLevel", 0, 1, 1, int_type, &(PlaneWaveSpecifics.MaxLevel), 1, critical);
240 ParseForParameter(verbose,FileBuffer,"Level0Factor", 0, 1, 1, int_type, &(PlaneWaveSpecifics.Lev0Factor), 1, critical);
241 if (PlaneWaveSpecifics.Lev0Factor < 2) {
242 PlaneWaveSpecifics.Lev0Factor = 2;
243 }
244 ParseForParameter(verbose,FileBuffer,"RiemannTensor", 0, 1, 1, int_type, &di, 1, critical);
245 if (di >= 0 && di < 2) {
246 PlaneWaveSpecifics.RiemannTensor = di;
247 } else {
248 cerr << "0 <= RiemanTensor < 2: 0 UseNotRT, 1 UseRT" << endl;
249 exit(1);
250 }
251 switch (PlaneWaveSpecifics.RiemannTensor) {
252 case 0: //UseNoRT
253 if (PlaneWaveSpecifics.MaxLevel < 2) {
254 PlaneWaveSpecifics.MaxLevel = 2;
255 }
256 PlaneWaveSpecifics.LevRFactor = 2;
257 PlaneWaveSpecifics.RTActualUse = 0;
258 break;
259 case 1: // UseRT
260 if (PlaneWaveSpecifics.MaxLevel < 3) {
261 PlaneWaveSpecifics.MaxLevel = 3;
262 }
263 ParseForParameter(verbose,FileBuffer,"RiemannLevel", 0, 1, 1, int_type, &(PlaneWaveSpecifics.RiemannLevel), 1, critical);
264 if (PlaneWaveSpecifics.RiemannLevel < 2) {
265 PlaneWaveSpecifics.RiemannLevel = 2;
266 }
267 if (PlaneWaveSpecifics.RiemannLevel > PlaneWaveSpecifics.MaxLevel-1) {
268 PlaneWaveSpecifics.RiemannLevel = PlaneWaveSpecifics.MaxLevel-1;
269 }
270 ParseForParameter(verbose,FileBuffer,"LevRFactor", 0, 1, 1, int_type, &(PlaneWaveSpecifics.LevRFactor), 1, critical);
271 if (PlaneWaveSpecifics.LevRFactor < 2) {
272 PlaneWaveSpecifics.LevRFactor = 2;
273 }
274 PlaneWaveSpecifics.Lev0Factor = 2;
275 PlaneWaveSpecifics.RTActualUse = 2;
276 break;
277 }
278 ParseForParameter(verbose,FileBuffer,"PsiType", 0, 1, 1, int_type, &di, 1, critical);
279 if (di >= 0 && di < 2) {
280 PlaneWaveSpecifics.PsiType = di;
281 } else {
282 cerr << "0 <= PsiType < 2: 0 UseSpinDouble, 1 UseSpinUpDown" << endl;
283 exit(1);
284 }
285 switch (PlaneWaveSpecifics.PsiType) {
286 case 0: // SpinDouble
287 ParseForParameter(verbose,FileBuffer,"MaxPsiDouble", 0, 1, 1, int_type, &(PlaneWaveSpecifics.MaxPsiDouble), 1, critical);
288 ParseForParameter(verbose,FileBuffer,"PsiMaxNoUp", 0, 1, 1, int_type, &(PlaneWaveSpecifics.PsiMaxNoUp), 1, optional);
289 ParseForParameter(verbose,FileBuffer,"PsiMaxNoDown", 0, 1, 1, int_type, &(PlaneWaveSpecifics.PsiMaxNoDown), 1, optional);
290 ParseForParameter(verbose,FileBuffer,"AddPsis", 0, 1, 1, int_type, &(PlaneWaveSpecifics.AddPsis), 1, optional);
291 break;
292 case 1: // SpinUpDown
293 if (Parallelization.ProcPEGamma % 2) Parallelization.ProcPEGamma*=2;
294 ParseForParameter(verbose,FileBuffer,"MaxPsiDouble", 0, 1, 1, int_type, &(PlaneWaveSpecifics.MaxPsiDouble), 1, optional);
295 ParseForParameter(verbose,FileBuffer,"PsiMaxNoUp", 0, 1, 1, int_type, &(PlaneWaveSpecifics.PsiMaxNoUp), 1, critical);
296 ParseForParameter(verbose,FileBuffer,"PsiMaxNoDown", 0, 1, 1, int_type, &(PlaneWaveSpecifics.PsiMaxNoDown), 1, critical);
297 ParseForParameter(verbose,FileBuffer,"AddPsis", 0, 1, 1, int_type, &(PlaneWaveSpecifics.AddPsis), 1, optional);
298 break;
299 }
300
301 // IonsInitRead
302
303 ParseForParameter(verbose,FileBuffer,"RCut", 0, 1, 1, double_type, &(PlaneWaveSpecifics.RCut), 1, critical);
304 ParseForParameter(verbose,FileBuffer,"IsAngstroem", 0, 1, 1, int_type, &(IsAngstroem), 1, critical);
305 ParseForParameter(verbose,FileBuffer,"MaxTypes", 0, 1, 1, int_type, &(MaxTypes), 1, critical);
306 if (!ParseForParameter(verbose,FileBuffer,"RelativeCoord", 0, 1, 1, int_type, &(RelativeCoord) , 1, optional))
307 RelativeCoord = 0;
308 if (!ParseForParameter(verbose,FileBuffer,"StructOpt", 0, 1, 1, int_type, &(StructOpt), 1, optional))
309 StructOpt = 0;
310
311 // 3. parse the molecule in
312 molecule *mol = World::getInstance().createMolecule();
313 MoleculeListClass *molecules = World::getInstance().getMolecules();
314 molecules->insert(mol);
315 LoadMolecule(mol, FileBuffer, World::getInstance().getPeriode(), FastParsing);
316 //mol->SetNameFromFilename(filename);
317 mol->ActiveFlag = true;
318 //MolList->insert(mol);
319
320 // 4. dissect the molecule into connected subgraphs
321 // don't do this here ...
322 //MolList->DissectMoleculeIntoConnectedSubgraphs(mol,this);
323 //delete(mol);
324
325 delete(FileBuffer);
326}
327
328/** Saves the World into a PCP config file.
329 * \param *file output stream to save to
330 */
331void PcpParser::save(std::ostream* file)
332{
333 const Matrix &domain = World::getInstance().getDomain().getM();
334 class ThermoStatContainer *Thermostats = World::getInstance().getThermostats();
335 if (!file->fail()) {
336 // calculate number of Psis
337 vector<atom *> allatoms = World::getInstance().getAllAtoms();
338 CalculateOrbitals(allatoms);
339 *file << "# ParallelCarParinello - main configuration file - created with molecuilder" << endl;
340 *file << endl;
341 if (Paths.mainname != NULL)
342 *file << "mainname\t" << Paths.mainname << "\t# programm name (for runtime files)" << endl;
343 else
344 *file << "mainname\tpcp\t# programm name (for runtime files)" << endl;
345 if (Paths.defaultpath != NULL)
346 *file << "defaultpath\t" << Paths.defaultpath << "\t# where to put files during runtime" << endl;
347 else
348 *file << "defaultpath\tnot specified\t# where to put files during runtime" << endl;
349 if (Paths.pseudopotpath != NULL)
350 *file << "pseudopotpath\t" << Paths.pseudopotpath << "\t# where to find pseudopotentials" << endl;
351 else
352 *file << "pseudopotpath\tnot specified\t# where to find pseudopotentials" << endl;
353 *file << endl;
354 *file << "ProcPEGamma\t" << Parallelization.ProcPEGamma << "\t# for parallel computing: share constants" << endl;
355 *file << "ProcPEPsi\t" << Parallelization.ProcPEPsi << "\t# for parallel computing: share wave functions" << endl;
356 *file << "DoOutVis\t" << Switches.DoOutVis << "\t# Output data for OpenDX" << endl;
357 *file << "DoOutMes\t" << Switches.DoOutMes << "\t# Output data for measurements" << endl;
358 *file << "DoOutOrbitals\t" << Switches.DoOutOrbitals << "\t# Output all Orbitals" << endl;
359 *file << "DoOutCurr\t" << Switches.DoOutCurrent << "\t# Ouput current density for OpenDx" << endl;
360 *file << "DoOutNICS\t" << Switches.DoOutNICS << "\t# Output Nucleus independent current shieldings" << endl;
361 *file << "DoPerturbation\t" << Switches.DoPerturbation << "\t# Do perturbation calculate and determine susceptibility and shielding" << endl;
362 *file << "DoFullCurrent\t" << Switches.DoFullCurrent << "\t# Do full perturbation" << endl;
363 *file << "DoConstrainedMD\t" << Switches.DoConstrainedMD << "\t# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD" << endl;
364 ASSERT(Thermostats != NULL, "PcpParser::save() - Thermostats not initialized!");
365 ASSERT(Thermostats->ThermostatNames != NULL, "PcpParser::save() - Thermostats not initialized!");
366 *file << "Thermostat\t" << Thermostats->ThermostatNames[Thermostats->Thermostat] << "\t";
367 switch(Thermostats->Thermostat) {
368 default:
369 case None:
370 break;
371 case Woodcock:
372 *file << Thermostats->ScaleTempStep;
373 break;
374 case Gaussian:
375 *file << Thermostats->ScaleTempStep;
376 break;
377 case Langevin:
378 *file << Thermostats->TempFrequency << "\t" << Thermostats->alpha;
379 break;
380 case Berendsen:
381 *file << Thermostats->TempFrequency;
382 break;
383 case NoseHoover:
384 *file << Thermostats->HooverMass;
385 break;
386 };
387 *file << "\t# Which Thermostat and its parameters to use in MD case." << endl;
388 *file << "CommonWannier\t" << LocalizedOrbitals.CommonWannier << "\t# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center" << endl;
389 *file << "SawtoothStart\t" << LocalizedOrbitals.SawtoothStart << "\t# Absolute value for smooth transition at cell border " << endl;
390 *file << "VectorPlane\t" << LocalizedOrbitals.VectorPlane << "\t# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot" << endl;
391 *file << "VectorCut\t" << LocalizedOrbitals.VectorCut << "\t# Cut plane axis value" << endl;
392 *file << "AddGramSch\t" << LocalizedOrbitals.UseAddGramSch << "\t# Additional GramSchmidtOrtogonalization to be safe" << endl;
393 *file << "Seed\t\t" << LocalizedOrbitals.Seed << "\t# initial value for random seed for Psi coefficients" << endl;
394 *file << endl;
395 *file << "MaxOuterStep\t" << StepCounts.MaxOuterStep << "\t# number of MolecularDynamics/Structure optimization steps" << endl;
396 *file << "Deltat\t" << Deltat << "\t# time per MD step" << endl;
397 *file << "OutVisStep\t" << StepCounts.OutVisStep << "\t# Output visual data every ...th step" << endl;
398 *file << "OutSrcStep\t" << StepCounts.OutSrcStep << "\t# Output \"restart\" data every ..th step" << endl;
399 *file << "TargetTemp\t" << Thermostats->TargetTemp << "\t# Target temperature" << endl;
400 *file << "MaxPsiStep\t" << StepCounts.MaxPsiStep << "\t# number of Minimisation steps per state (0 - default)" << endl;
401 *file << "EpsWannier\t" << LocalizedOrbitals.EpsWannier << "\t# tolerance value for spread minimisation of orbitals" << endl;
402 *file << endl;
403 *file << "# Values specifying when to stop" << endl;
404 *file << "MaxMinStep\t" << StepCounts.MaxMinStep << "\t# Maximum number of steps" << endl;
405 *file << "RelEpsTotalE\t" << StepCounts.RelEpsTotalEnergy << "\t# relative change in total energy" << endl;
406 *file << "RelEpsKineticE\t" << StepCounts.RelEpsKineticEnergy << "\t# relative change in kinetic energy" << endl;
407 *file << "MaxMinStopStep\t" << StepCounts.MaxMinStopStep << "\t# check every ..th steps" << endl;
408 *file << "MaxMinGapStopStep\t" << StepCounts.MaxMinGapStopStep << "\t# check every ..th steps" << endl;
409 *file << endl;
410 *file << "# Values specifying when to stop for INIT, otherwise same as above" << endl;
411 *file << "MaxInitMinStep\t" << StepCounts.MaxInitMinStep << "\t# Maximum number of steps" << endl;
412 *file << "InitRelEpsTotalE\t" << StepCounts.InitRelEpsTotalEnergy << "\t# relative change in total energy" << endl;
413 *file << "InitRelEpsKineticE\t" << StepCounts.InitRelEpsKineticEnergy << "\t# relative change in kinetic energy" << endl;
414 *file << "InitMaxMinStopStep\t" << StepCounts.InitMaxMinStopStep << "\t# check every ..th steps" << endl;
415 *file << "InitMaxMinGapStopStep\t" << StepCounts.InitMaxMinGapStopStep << "\t# check every ..th steps" << endl;
416 *file << endl;
417 *file << "BoxLength\t\t\t# (Length of a unit cell)" << endl;
418 *file << domain.at(0,0) << "\t" << endl;
419 *file << domain.at(1,0) << "\t" << domain.at(1,1) << "\t" << endl;
420 *file << domain.at(2,0) << "\t" << domain.at(2,1) << "\t" << domain.at(2,2) << "\t" << endl;
421 // FIXME
422 *file << endl;
423 *file << "ECut\t\t" << PlaneWaveSpecifics.ECut << "\t# energy cutoff for discretization in Hartrees" << endl;
424 *file << "MaxLevel\t" << PlaneWaveSpecifics.MaxLevel << "\t# number of different levels in the code, >=2" << endl;
425 *file << "Level0Factor\t" << PlaneWaveSpecifics.Lev0Factor << "\t# factor by which node number increases from S to 0 level" << endl;
426 *file << "RiemannTensor\t" << PlaneWaveSpecifics.RiemannTensor << "\t# (Use metric)" << endl;
427 switch (PlaneWaveSpecifics.RiemannTensor) {
428 case 0: //UseNoRT
429 break;
430 case 1: // UseRT
431 *file << "RiemannLevel\t" << PlaneWaveSpecifics.RiemannLevel << "\t# Number of Riemann Levels" << endl;
432 *file << "LevRFactor\t" << PlaneWaveSpecifics.LevRFactor << "\t# factor by which node number increases from 0 to R level from" << endl;
433 break;
434 }
435 *file << "PsiType\t\t" << PlaneWaveSpecifics.PsiType << "\t# 0 - doubly occupied, 1 - SpinUp,SpinDown" << endl;
436 *file << "MaxPsiDouble\t" << PlaneWaveSpecifics.MaxPsiDouble << "\t# here: specifying both maximum number of SpinUp- and -Down-states" << endl;
437 *file << "PsiMaxNoUp\t" << PlaneWaveSpecifics.PsiMaxNoUp << "\t# here: specifying maximum number of SpinUp-states" << endl;
438 *file << "PsiMaxNoDown\t" << PlaneWaveSpecifics.PsiMaxNoDown << "\t# here: specifying maximum number of SpinDown-states" << endl;
439 *file << "AddPsis\t\t" << PlaneWaveSpecifics.AddPsis << "\t# Additional unoccupied Psis for bandgap determination" << endl;
440 *file << endl;
441 *file << "RCut\t\t" << PlaneWaveSpecifics.RCut << "\t# R-cut for the ewald summation" << endl;
442 *file << "StructOpt\t" << StructOpt << "\t# Do structure optimization beforehand" << endl;
443 *file << "IsAngstroem\t" << IsAngstroem << "\t# 0 - Bohr, 1 - Angstroem" << endl;
444 *file << "RelativeCoord\t" << RelativeCoord << "\t# whether ion coordinates are relative (1) or absolute (0)" << endl;
445 map<int, int> ZtoIndexMap;
446 OutputElements(file, allatoms, ZtoIndexMap);
447 OutputAtoms(file, allatoms, ZtoIndexMap);
448 } else {
449 DoeLog(1) && (eLog()<< Verbose(1) << "Cannot open output file." << endl);
450 }
451}
452
453
454/** Counts necessary number of valence electrons and returns number and SpinType.
455 * \param &allatoms all atoms to store away
456 */
457void PcpParser::CalculateOrbitals(vector<atom *> &allatoms)
458{
459 PlaneWaveSpecifics.MaxPsiDouble = PlaneWaveSpecifics.PsiMaxNoDown = PlaneWaveSpecifics.PsiMaxNoUp = PlaneWaveSpecifics.PsiType = 0;
460 for (vector<atom *>::iterator runner = allatoms.begin(); runner != allatoms.end(); ++runner) {
461 PlaneWaveSpecifics.MaxPsiDouble += (*runner)->type->NoValenceOrbitals;
462 }
463 cout << PlaneWaveSpecifics.MaxPsiDouble << endl;
464 PlaneWaveSpecifics.PsiMaxNoDown = PlaneWaveSpecifics.MaxPsiDouble/2 + (PlaneWaveSpecifics.MaxPsiDouble % 2);
465 PlaneWaveSpecifics.PsiMaxNoUp = PlaneWaveSpecifics.MaxPsiDouble/2;
466 PlaneWaveSpecifics.MaxPsiDouble /= 2;
467 PlaneWaveSpecifics.PsiType = (PlaneWaveSpecifics.PsiMaxNoDown == PlaneWaveSpecifics.PsiMaxNoUp) ? 0 : 1;
468 if ((PlaneWaveSpecifics.PsiType == 1) && (Parallelization.ProcPEPsi < 2) && ((PlaneWaveSpecifics.PsiMaxNoDown != 1) || (PlaneWaveSpecifics.PsiMaxNoUp != 0))) {
469 Parallelization.ProcPEGamma /= 2;
470 Parallelization.ProcPEPsi *= 2;
471 } else {
472 Parallelization.ProcPEGamma *= Parallelization.ProcPEPsi;
473 Parallelization.ProcPEPsi = 1;
474 }
475 cout << PlaneWaveSpecifics.PsiMaxNoDown << ">" << PlaneWaveSpecifics.PsiMaxNoUp << endl;
476 if (PlaneWaveSpecifics.PsiMaxNoDown > PlaneWaveSpecifics.PsiMaxNoUp) {
477 StepCounts.InitMaxMinStopStep = StepCounts.MaxMinStopStep = PlaneWaveSpecifics.PsiMaxNoDown;
478 cout << PlaneWaveSpecifics.PsiMaxNoDown << " " << StepCounts.InitMaxMinStopStep << endl;
479 } else {
480 StepCounts.InitMaxMinStopStep = StepCounts.MaxMinStopStep = PlaneWaveSpecifics.PsiMaxNoUp;
481 cout << PlaneWaveSpecifics.PsiMaxNoUp << " " << StepCounts.InitMaxMinStopStep << endl;
482 }
483};
484
485/** Prints MaxTypes and list of elements to strea,
486 * \param *file output stream
487 * \param &allatoms vector of all atoms in the system, such as by World::getAllAtoms()
488 * \param &ZtoIndexMap map of which atoms belong to which ion number
489 */
490void PcpParser::OutputElements(ostream *file, vector<atom *> &allatoms, map<int, int> &ZtoIndexMap)
491{
492 map<int, int> PresentElements;
493 pair < map<int, int>::iterator, bool > Inserter;
494 // insert all found elements into the map
495 for (vector<atom *>::iterator AtomRunner = allatoms.begin();AtomRunner != allatoms.end();++AtomRunner) {
496 Inserter = PresentElements.insert(pair<int, int>((*AtomRunner)->type->Z, 1));
497 if (!Inserter.second) // increase if present
498 Inserter.first->second += 1;
499 }
500 // print total element count
501 *file << "MaxTypes\t" << PresentElements.size() << "\t# maximum number of different ion types" << endl;
502 *file << endl;
503 // print element list
504 *file << "# Ion type data (PP = PseudoPotential, Z = atomic number)" << endl;
505 *file << "#Ion_TypeNr.\tAmount\tZ\tRGauss\tL_Max(PP)L_Loc(PP)IonMass\t# chemical name, symbol" << endl;
506 // elements are due to map sorted by Z value automatically, hence just count through them
507 int counter = 1;
508 for(map<int, int>::const_iterator iter=PresentElements.begin(); iter!=PresentElements.end();++iter) {
509 const element * const elemental = World::getInstance().getPeriode()->FindElement(iter->first);
510 ZtoIndexMap.insert( pair<int,int> (iter->first, counter) );
511 *file << "Ion_Type" << counter++ << "\t" << iter->second << "\t" << elemental->Z << "\t1.0\t3\t3\t" << fixed << setprecision(11) << showpoint << elemental->mass << "\t" << elemental->name << "\t" << elemental->symbol <<endl;
512 }
513}
514
515/** Output all atoms one per line.
516 * \param *file output stream
517 * \param &allatoms vector of all atoms in the system, such as by World::getAllAtoms()
518 * \param &ZtoIndexMap map of which atoms belong to which ion number
519 */
520void PcpParser::OutputAtoms(ostream *file, vector<atom *> &allatoms, map<int, int> &ZtoIndexMap)
521{
522 *file << "#Ion_TypeNr._Nr.R[0] R[1] R[2] MoveType (0 MoveIon, 1 FixedIon)" << endl;
523 map<int, int> ZtoCountMap;
524 pair < map<int, int>::iterator, bool > Inserter;
525 int nr = 0;
526 for (vector<atom *>::iterator AtomRunner = allatoms.begin();AtomRunner != allatoms.end();++AtomRunner) {
527 Inserter = ZtoCountMap.insert( pair<int, int>((*AtomRunner)->type->Z, 1) );
528 if (!Inserter.second)
529 Inserter.first->second += 1;
530 const int Z = (*AtomRunner)->type->Z;
531 *file << "Ion_Type" << ZtoIndexMap[Z] << "_" << ZtoCountMap[Z] << "\t" << fixed << setprecision(9) << showpoint;
532 *file << (*AtomRunner)->x[0] << "\t" << (*AtomRunner)->x[1] << "\t" << (*AtomRunner)->x[2];
533 *file << "\t" << (*AtomRunner)->FixedIon;
534 if ((*AtomRunner)->v.Norm() > MYEPSILON)
535 *file << "\t" << scientific << setprecision(6) << (*AtomRunner)->v[0] << "\t" << (*AtomRunner)->v[1] << "\t" << (*AtomRunner)->v[2] << "\t";
536 *file << " # molecule nr " << nr++ << endl;
537 }
538}
539
540/** Reading of Thermostat related values from parameter file.
541 * \param *fb file buffer containing the config file
542 */
543void PcpParser::ParseThermostats(class ConfigFileBuffer * const fb)
544{
545 char * const thermo = new char[12];
546 const int verbose = 0;
547 class ThermoStatContainer *Thermostats = World::getInstance().getThermostats();
548
549 // read desired Thermostat from file along with needed additional parameters
550 if (ParseForParameter(verbose,fb,"Thermostat", 0, 1, 1, string_type, thermo, 1, optional)) {
551 if (strcmp(thermo, Thermostats->ThermostatNames[0]) == 0) { // None
552 if (Thermostats->ThermostatImplemented[0] == 1) {
553 Thermostats->Thermostat = None;
554 } else {
555 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
556 Thermostats->Thermostat = None;
557 }
558 } else if (strcmp(thermo, Thermostats->ThermostatNames[1]) == 0) { // Woodcock
559 if (Thermostats->ThermostatImplemented[1] == 1) {
560 Thermostats->Thermostat = Woodcock;
561 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &Thermostats->ScaleTempStep, 1, critical); // read scaling frequency
562 } else {
563 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
564 Thermostats->Thermostat = None;
565 }
566 } else if (strcmp(thermo, Thermostats->ThermostatNames[2]) == 0) { // Gaussian
567 if (Thermostats->ThermostatImplemented[2] == 1) {
568 Thermostats->Thermostat = Gaussian;
569 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, int_type, &Thermostats->ScaleTempStep, 1, critical); // read collision rate
570 } else {
571 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
572 Thermostats->Thermostat = None;
573 }
574 } else if (strcmp(thermo, Thermostats->ThermostatNames[3]) == 0) { // Langevin
575 if (Thermostats->ThermostatImplemented[3] == 1) {
576 Thermostats->Thermostat = Langevin;
577 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &Thermostats->TempFrequency, 1, critical); // read gamma
578 if (ParseForParameter(verbose,fb,"Thermostat", 0, 3, 1, double_type, &Thermostats->alpha, 1, optional)) {
579 DoLog(2) && (Log() << Verbose(2) << "Extended Stochastic Thermostat detected with interpolation coefficient " << Thermostats->alpha << "." << endl);
580 } else {
581 Thermostats->alpha = 1.;
582 }
583 } else {
584 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
585 Thermostats->Thermostat = None;
586 }
587 } else if (strcmp(thermo, Thermostats->ThermostatNames[4]) == 0) { // Berendsen
588 if (Thermostats->ThermostatImplemented[4] == 1) {
589 Thermostats->Thermostat = Berendsen;
590 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &Thermostats->TempFrequency, 1, critical); // read \tau_T
591 } else {
592 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
593 Thermostats->Thermostat = None;
594 }
595 } else if (strcmp(thermo, Thermostats->ThermostatNames[5]) == 0) { // Nose-Hoover
596 if (Thermostats->ThermostatImplemented[5] == 1) {
597 Thermostats->Thermostat = NoseHoover;
598 ParseForParameter(verbose,fb,"Thermostat", 0, 2, 1, double_type, &Thermostats->HooverMass, 1, critical); // read Hoovermass
599 Thermostats->alpha = 0.;
600 } else {
601 DoLog(1) && (Log() << Verbose(1) << "Warning: " << Thermostats->ThermostatNames[0] << " thermostat not implemented, falling back to None." << endl);
602 Thermostats->Thermostat = None;
603 }
604 } else {
605 DoLog(1) && (Log() << Verbose(1) << " Warning: thermostat name was not understood!" << endl);
606 Thermostats->Thermostat = None;
607 }
608 } else {
609 if ((Thermostats->TargetTemp != 0))
610 DoLog(2) && (Log() << Verbose(2) << "No thermostat chosen despite finite temperature MD, falling back to None." << endl);
611 Thermostats->Thermostat = None;
612 }
613 delete[](thermo);
614};
615
616bool PcpParser::operator==(const PcpParser& b) const
617{
618 ASSERT(Parallelization.ProcPEGamma == b.Parallelization.ProcPEGamma, "PcpParser ==: ProcPEGamma not");
619 ASSERT(Parallelization.ProcPEPsi == b.Parallelization.ProcPEPsi, "PcpParser ==: ProcPEPsi not");
620
621 if ((Paths.databasepath != NULL) && (b.Paths.databasepath != NULL))
622 ASSERT(strcmp(Paths.databasepath, b.Paths.databasepath), "PcpParser ==: databasepath not");
623 if ((Paths.configname != NULL) && (b.Paths.configname != NULL))
624 ASSERT(strcmp(Paths.configname, b.Paths.configname), "PcpParser ==: configname not");
625 if ((Paths.mainname != NULL) && (b.Paths.mainname != NULL))
626 ASSERT(strcmp(Paths.mainname, b.Paths.mainname), "PcpParser ==: mainname not");
627 if ((Paths.defaultpath != NULL) && (b.Paths.defaultpath != NULL))
628 ASSERT(strcmp(Paths.defaultpath, b.Paths.defaultpath), "PcpParser ==: defaultpath not");
629 if ((Paths.pseudopotpath != NULL) && (b.Paths.pseudopotpath != NULL))
630 ASSERT(strcmp(Paths.pseudopotpath, b.Paths.pseudopotpath), "PcpParser ==: pseudopotpath not");
631
632 ASSERT(Switches.DoConstrainedMD == b.Switches.DoConstrainedMD, "PcpParser ==: DoConstrainedMD not");
633 ASSERT(Switches.DoOutVis == b.Switches.DoOutVis, "PcpParser ==: DoOutVis not");
634 ASSERT(Switches.DoOutMes == b.Switches.DoOutMes, "PcpParser ==: DoOutMes not");
635 ASSERT(Switches.DoOutNICS == b.Switches.DoOutNICS, "PcpParser ==: DoOutNICS not");
636 ASSERT(Switches.DoOutOrbitals == b.Switches.DoOutOrbitals, "PcpParser ==: DoOutOrbitals not");
637 ASSERT(Switches.DoOutCurrent == b.Switches.DoOutCurrent, "PcpParser ==: DoOutCurrent not");
638 ASSERT(Switches.DoFullCurrent == b.Switches.DoFullCurrent, "PcpParser ==: DoFullCurrent not");
639 ASSERT(Switches.DoPerturbation == b.Switches.DoPerturbation, "PcpParser ==: DoPerturbation not");
640 ASSERT(Switches.DoWannier == b.Switches.DoWannier, "PcpParser ==: DoWannier not");
641
642 ASSERT(LocalizedOrbitals.CommonWannier == b.LocalizedOrbitals.CommonWannier, "PcpParser ==: CommonWannier not");
643 ASSERT(LocalizedOrbitals.SawtoothStart == b.LocalizedOrbitals.SawtoothStart, "PcpParser ==: SawtoothStart not");
644 ASSERT(LocalizedOrbitals.VectorPlane == b.LocalizedOrbitals.VectorPlane, "PcpParser ==: VectorPlane not");
645 ASSERT(LocalizedOrbitals.VectorCut == b.LocalizedOrbitals.VectorCut, "PcpParser ==: VectorCut not");
646 ASSERT(LocalizedOrbitals.UseAddGramSch == b.LocalizedOrbitals.UseAddGramSch, "PcpParser ==: UseAddGramSch not");
647 ASSERT(LocalizedOrbitals.Seed == b.LocalizedOrbitals.Seed, "PcpParser ==: Seed not");
648 ASSERT(LocalizedOrbitals.EpsWannier == b.LocalizedOrbitals.EpsWannier, "PcpParser ==: EpsWannier not");
649
650 ASSERT(StepCounts.MaxMinStopStep == b.StepCounts.MaxMinStopStep, "PcpParser ==: MaxMinStopStep not");
651 ASSERT(StepCounts.InitMaxMinStopStep == b.StepCounts.InitMaxMinStopStep, "PcpParser ==: InitMaxMinStopStep not");
652 ASSERT(StepCounts.OutVisStep == b.StepCounts.OutVisStep, "PcpParser ==: OutVisStep not");
653 ASSERT(StepCounts.OutSrcStep == b.StepCounts.OutSrcStep, "PcpParser ==: OutSrcStep not");
654 ASSERT(StepCounts.MaxPsiStep == b.StepCounts.MaxPsiStep, "PcpParser ==: MaxPsiStep not");
655 ASSERT(StepCounts.MaxOuterStep == b.StepCounts.MaxOuterStep, "PcpParser ==: MaxOuterStep not");
656 ASSERT(StepCounts.MaxMinStep == b.StepCounts.MaxMinStep, "PcpParser ==: MaxMinStep not");
657 ASSERT(StepCounts.RelEpsTotalEnergy == b.StepCounts.RelEpsTotalEnergy, "PcpParser ==: RelEpsTotalEnergy not");
658 ASSERT(StepCounts.MaxMinGapStopStep == b.StepCounts.MaxMinGapStopStep, "PcpParser ==: MaxMinGapStopStep not");
659 ASSERT(StepCounts.MaxInitMinStep == b.StepCounts.MaxInitMinStep, "PcpParser ==: MaxInitMinStep not");
660 ASSERT(StepCounts.InitRelEpsTotalEnergy == b.StepCounts.InitRelEpsTotalEnergy, "PcpParser ==: InitRelEpsTotalEnergy not");
661 ASSERT(StepCounts.InitRelEpsKineticEnergy == b.StepCounts.InitRelEpsKineticEnergy, "PcpParser ==: InitRelEpsKineticEnergy not");
662 ASSERT(StepCounts.InitMaxMinGapStopStep == b.StepCounts.InitMaxMinGapStopStep, "PcpParser ==: InitMaxMinGapStopStep not");
663
664 ASSERT(PlaneWaveSpecifics.PsiType == b.PlaneWaveSpecifics.PsiType, "PcpParser ==: PsiType not");
665 ASSERT(PlaneWaveSpecifics.MaxPsiDouble == b.PlaneWaveSpecifics.MaxPsiDouble, "PcpParser ==: MaxPsiDouble not");
666 ASSERT(PlaneWaveSpecifics.PsiMaxNoUp == b.PlaneWaveSpecifics.PsiMaxNoUp, "PcpParser ==: PsiMaxNoUp not");
667 ASSERT(PlaneWaveSpecifics.PsiMaxNoDown == b.PlaneWaveSpecifics.PsiMaxNoDown, "PcpParser ==: PsiMaxNoDown not");
668 ASSERT(PlaneWaveSpecifics.ECut == b.PlaneWaveSpecifics.ECut, "PcpParser ==: ECut not");
669 ASSERT(PlaneWaveSpecifics.MaxLevel == b.PlaneWaveSpecifics.MaxLevel, "PcpParser ==: MaxLevel not");
670 ASSERT(PlaneWaveSpecifics.RiemannTensor == b.PlaneWaveSpecifics.RiemannTensor, "PcpParser ==: RiemannTensor not");
671 ASSERT(PlaneWaveSpecifics.LevRFactor == b.PlaneWaveSpecifics.LevRFactor, "PcpParser ==: LevRFactor not");
672 ASSERT(PlaneWaveSpecifics.RiemannLevel == b.PlaneWaveSpecifics.RiemannLevel, "PcpParser ==: RiemannLevel not");
673 ASSERT(PlaneWaveSpecifics.Lev0Factor == b.PlaneWaveSpecifics.Lev0Factor, "PcpParser ==: Lev0Factor not");
674 ASSERT(PlaneWaveSpecifics.RTActualUse == b.PlaneWaveSpecifics.RTActualUse, "PcpParser ==: RTActualUse not");
675 ASSERT(PlaneWaveSpecifics.AddPsis == b.PlaneWaveSpecifics.AddPsis, "PcpParser ==: AddPsis not");
676 ASSERT(PlaneWaveSpecifics.AddPsis == b.PlaneWaveSpecifics.AddPsis, "PcpParser ==: AddPsis not");
677 ASSERT(PlaneWaveSpecifics.RCut == b.PlaneWaveSpecifics.RCut, "PcpParser ==: RCut not");
678
679 ASSERT(FastParsing == b.FastParsing, "PcpParser ==: FastParsing not");
680
681 ASSERT(Deltat == b.Deltat, "PcpParser ==: Deltat not");
682 ASSERT(IsAngstroem == b.IsAngstroem, "PcpParser ==: IsAngstroem not");
683 ASSERT(RelativeCoord == b.RelativeCoord, "PcpParser ==: RelativeCoord not");
684 ASSERT(StructOpt == b.StructOpt, "PcpParser ==: StructOpt not");
685 ASSERT(MaxTypes == b.MaxTypes, "PcpParser ==: MaxTypes not");
686 ASSERT(basis == b.basis, "PcpParser ==: basis not");
687
688 return true;
689}
Note: See TracBrowser for help on using the repository browser.