Changes in src/Parser/PcpParser.cpp [765f16:3bdb6d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/PcpParser.cpp
r765f16 r3bdb6d 27 27 #include "config.hpp" 28 28 #include "ConfigFileBuffer.hpp" 29 #include " element.hpp"29 #include "Element/element.hpp" 30 30 #include "CodePatterns/Assert.hpp" 31 31 #include "CodePatterns/Log.hpp" … … 34 34 #include "molecule.hpp" 35 35 #include "PcpParser.hpp" 36 #include " periodentafel.hpp"36 #include "Element/periodentafel.hpp" 37 37 #include "ThermoStatContainer.hpp" 38 38 #include "World.hpp" … … 40 40 41 41 42 // declare specialized static variables 43 const std::string FormatParserTrait<pcp>::name = "pcp"; 44 const std::string FormatParserTrait<pcp>::suffix = "conf"; 45 const ParserTypes FormatParserTrait<pcp>::type = pcp; 46 47 FormatParser< pcp >::StructParallelization::StructParallelization() : 42 PcpParser::StructParallelization::StructParallelization() : 48 43 ProcPEGamma(8), 49 44 ProcPEPsi(1) 50 45 {} 51 46 52 FormatParser< pcp >::StructParallelization::~StructParallelization()53 {} 54 55 FormatParser< pcp >::StructPaths::StructPaths() :47 PcpParser::StructParallelization::~StructParallelization() 48 {} 49 50 PcpParser::StructPaths::StructPaths() : 56 51 databasepath(NULL), 57 52 configname(NULL), … … 61 56 {} 62 57 63 FormatParser< pcp >::StructPaths::~StructPaths()64 {} 65 66 FormatParser< pcp >::StructSwitches::StructSwitches() :58 PcpParser::StructPaths::~StructPaths() 59 {} 60 61 PcpParser::StructSwitches::StructSwitches() : 67 62 DoConstrainedMD(0), 68 63 DoOutVis(0), … … 76 71 {} 77 72 78 FormatParser< pcp >::StructSwitches::~StructSwitches()79 {} 80 81 FormatParser< pcp >::StructLocalizedOrbitals::StructLocalizedOrbitals() :73 PcpParser::StructSwitches::~StructSwitches() 74 {} 75 76 PcpParser::StructLocalizedOrbitals::StructLocalizedOrbitals() : 82 77 CommonWannier(0), 83 78 SawtoothStart(0.01), … … 89 84 {} 90 85 91 FormatParser< pcp >::StructLocalizedOrbitals::~StructLocalizedOrbitals()92 {} 93 94 FormatParser< pcp >::StructStepCounts::StructStepCounts() :86 PcpParser::StructLocalizedOrbitals::~StructLocalizedOrbitals() 87 {} 88 89 PcpParser::StructStepCounts::StructStepCounts() : 95 90 MaxMinStopStep(1), 96 91 InitMaxMinStopStep(1), … … 109 104 {} 110 105 111 FormatParser< pcp >::StructStepCounts::~StructStepCounts()112 {} 113 114 FormatParser< pcp >::StructPlaneWaveSpecifics::StructPlaneWaveSpecifics() :106 PcpParser::StructStepCounts::~StructStepCounts() 107 {} 108 109 PcpParser::StructPlaneWaveSpecifics::StructPlaneWaveSpecifics() : 115 110 PsiType(0), 116 111 MaxPsiDouble(0), … … 128 123 {} 129 124 130 FormatParser< pcp >::StructPlaneWaveSpecifics::~StructPlaneWaveSpecifics()125 PcpParser::StructPlaneWaveSpecifics::~StructPlaneWaveSpecifics() 131 126 {} 132 127 … … 134 129 * 135 130 */ 136 FormatParser< pcp >::FormatParser() : 137 FormatParser_common(NULL), 131 PcpParser::PcpParser() : 138 132 FastParsing(false), 139 133 Deltat(0.01), … … 147 141 * 148 142 */ 149 FormatParser< pcp >::~FormatParser()150 {} 151 152 void FormatParser< pcp >::load(std::istream* file)143 PcpParser::~PcpParser() 144 {} 145 146 void PcpParser::load(std::istream* file) 153 147 { 154 148 if (file->fail()) { … … 386 380 * \param atoms atoms to store 387 381 */ 388 void FormatParser< pcp >::save(std::ostream* file, const std::vector<atom *> &atoms)382 void PcpParser::save(std::ostream* file, const std::vector<atom *> &atoms) 389 383 { 390 384 DoLog(0) && (Log() << Verbose(0) << "Saving changes to pcp." << std::endl); … … 420 414 *file << "DoFullCurrent\t" << Switches.DoFullCurrent << "\t# Do full perturbation" << endl; 421 415 *file << "DoConstrainedMD\t" << Switches.DoConstrainedMD << "\t# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD" << endl; 422 ASSERT(Thermostats != NULL, " FormatParser< pcp >::save() - Thermostats not initialized!");416 ASSERT(Thermostats != NULL, "PcpParser::save() - Thermostats not initialized!"); 423 417 *file << "Thermostat\t" << Thermostats->activeThermostat->name() << "\t"; 424 418 *file << Thermostats->activeThermostat->writeParams(); … … 493 487 * \param &allatoms all atoms to store away 494 488 */ 495 void FormatParser< pcp >::CalculateOrbitals(const std::vector<atom *> &allatoms)489 void PcpParser::CalculateOrbitals(const std::vector<atom *> &allatoms) 496 490 { 497 491 PlaneWaveSpecifics.MaxPsiDouble = PlaneWaveSpecifics.PsiMaxNoDown = PlaneWaveSpecifics.PsiMaxNoUp = PlaneWaveSpecifics.PsiType = 0; … … 526 520 * \param &ZtoIndexMap map of which atoms belong to which ion number 527 521 */ 528 void FormatParser< pcp >::OutputElements(ostream *file, const std::vector<atom *> &allatoms, map<int, int> &ZtoIndexMap)522 void PcpParser::OutputElements(ostream *file, const std::vector<atom *> &allatoms, map<int, int> &ZtoIndexMap) 529 523 { 530 524 map<int, int> PresentElements; … … 556 550 * \param &ZtoIndexMap map of which atoms belong to which ion number 557 551 */ 558 void FormatParser< pcp >::OutputAtoms(ostream *file, const std::vector<atom *> &allatoms, map<int, int> &ZtoIndexMap)552 void PcpParser::OutputAtoms(ostream *file, const std::vector<atom *> &allatoms, map<int, int> &ZtoIndexMap) 559 553 { 560 554 *file << "#Ion_TypeNr._Nr.R[0] R[1] R[2] MoveType (0 MoveIon, 1 FixedIon)" << endl; … … 604 598 * \param *fb file buffer containing the config file 605 599 */ 606 void FormatParser< pcp >::ParseThermostats(class ConfigFileBuffer * const fb)600 void PcpParser::ParseThermostats(class ConfigFileBuffer * const fb) 607 601 { 608 602 char * const thermo = new char[12]; … … 621 615 }; 622 616 623 bool FormatParser< pcp >::operator==(const FormatParser< pcp >& b) const617 bool PcpParser::operator==(const PcpParser& b) const 624 618 { 625 619 ASSERT(Parallelization.ProcPEGamma == b.Parallelization.ProcPEGamma, "PcpParser ==: ProcPEGamma not");
Note:
See TracChangeset
for help on using the changeset viewer.