Changes in src/Parser/PcpParser.cpp [d74077:e97a44]
- File:
-
- 1 edited
-
src/Parser/PcpParser.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/PcpParser.cpp
rd74077 re97a44 14 14 #include "element.hpp" 15 15 #include "Helpers/Assert.hpp" 16 #include "log.hpp" 16 #include "Helpers/Log.hpp" 17 #include "Helpers/Verbose.hpp" 18 #include "LinearAlgebra/Matrix.hpp" 17 19 #include "molecule.hpp" 18 20 #include "PcpParser.hpp" 19 21 #include "periodentafel.hpp" 20 22 #include "ThermoStatContainer.hpp" 21 #include "verbose.hpp"22 23 #include "World.hpp" 23 #include "Matrix.hpp"24 24 #include "Box.hpp" 25 25 … … 332 332 void PcpParser::save(std::ostream* file) 333 333 { 334 DoLog(0) && (Log() << Verbose(0) << "Saving changes to pcp." << std::endl); 335 334 336 const Matrix &domain = World::getInstance().getDomain().getM(); 335 337 class ThermoStatContainer *Thermostats = World::getInstance().getThermostats(); … … 460 462 PlaneWaveSpecifics.MaxPsiDouble = PlaneWaveSpecifics.PsiMaxNoDown = PlaneWaveSpecifics.PsiMaxNoUp = PlaneWaveSpecifics.PsiType = 0; 461 463 for (vector<atom *>::iterator runner = allatoms.begin(); runner != allatoms.end(); ++runner) { 462 PlaneWaveSpecifics.MaxPsiDouble += (*runner)-> getType()->NoValenceOrbitals;464 PlaneWaveSpecifics.MaxPsiDouble += (*runner)->type->NoValenceOrbitals; 463 465 } 464 466 cout << PlaneWaveSpecifics.MaxPsiDouble << endl; … … 495 497 // insert all found elements into the map 496 498 for (vector<atom *>::iterator AtomRunner = allatoms.begin();AtomRunner != allatoms.end();++AtomRunner) { 497 Inserter = PresentElements.insert(pair<int, int>((*AtomRunner)-> getType()->Z, 1));499 Inserter = PresentElements.insert(pair<int, int>((*AtomRunner)->type->Z, 1)); 498 500 if (!Inserter.second) // increase if present 499 501 Inserter.first->second += 1; … … 526 528 int nr = 0; 527 529 for (vector<atom *>::iterator AtomRunner = allatoms.begin();AtomRunner != allatoms.end();++AtomRunner) { 528 Inserter = ZtoCountMap.insert( pair<int, int>((*AtomRunner)-> getType()->Z, 1) );530 Inserter = ZtoCountMap.insert( pair<int, int>((*AtomRunner)->type->Z, 1) ); 529 531 if (!Inserter.second) 530 532 Inserter.first->second += 1; 531 const int Z = (*AtomRunner)-> getType()->Z;533 const int Z = (*AtomRunner)->type->Z; 532 534 *file << "Ion_Type" << ZtoIndexMap[Z] << "_" << ZtoCountMap[Z] << "\t" << fixed << setprecision(9) << showpoint; 533 *file << (*AtomRunner)-> at(0) << "\t" << (*AtomRunner)->at(1) << "\t" << (*AtomRunner)->at(2);535 *file << (*AtomRunner)->x[0] << "\t" << (*AtomRunner)->x[1] << "\t" << (*AtomRunner)->x[2]; 534 536 *file << "\t" << (*AtomRunner)->FixedIon; 535 if ((*AtomRunner)-> AtomicVelocity.Norm() > MYEPSILON)536 *file << "\t" << scientific << setprecision(6) << (*AtomRunner)-> AtomicVelocity[0] << "\t" << (*AtomRunner)->AtomicVelocity[1] << "\t" << (*AtomRunner)->AtomicVelocity[2] << "\t";537 if ((*AtomRunner)->v.Norm() > MYEPSILON) 538 *file << "\t" << scientific << setprecision(6) << (*AtomRunner)->v[0] << "\t" << (*AtomRunner)->v[1] << "\t" << (*AtomRunner)->v[2] << "\t"; 537 539 *file << " # molecule nr " << nr++ << endl; 538 540 }
Note:
See TracChangeset
for help on using the changeset viewer.
