source: src/Parser/PcpParser.cpp@ bbbad5

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

Added MemDebug.hpp to each and every .cpp file (were it was still missing).

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