source: src/Parser/PcpParser.cpp@ df5b8c

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

Converted FormatParser::save() to using vector of const atom ptrs.

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