source: src/Parser/PcpParser.cpp@ bf3817

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

Added ifdef HAVE_CONFIG and config.h include to each and every cpp file.

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