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