source: src/Parser/PcpParser.cpp@ 4afa46

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

Added call to molecule::getAtomCount() to end of each parser's ::load().

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