source: src/Parser/PcpParser.cpp@ b5c53d

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

Merge branch 'StructureRefactoring' into stable

Conflicts:

src/Actions/AtomAction/AddAction.cpp
src/Actions/AtomAction/ChangeElementAction.cpp
src/Parser/XyzParser.cpp
src/analysis_correlation.cpp
src/atom.cpp
src/config.cpp
src/molecule.cpp

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