Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PcpParser.cpp

    rd74077 re97a44  
    1414#include "element.hpp"
    1515#include "Helpers/Assert.hpp"
    16 #include "log.hpp"
     16#include "Helpers/Log.hpp"
     17#include "Helpers/Verbose.hpp"
     18#include "LinearAlgebra/Matrix.hpp"
    1719#include "molecule.hpp"
    1820#include "PcpParser.hpp"
    1921#include "periodentafel.hpp"
    2022#include "ThermoStatContainer.hpp"
    21 #include "verbose.hpp"
    2223#include "World.hpp"
    23 #include "Matrix.hpp"
    2424#include "Box.hpp"
    2525
     
    332332void PcpParser::save(std::ostream* file)
    333333{
     334  DoLog(0) && (Log() << Verbose(0) << "Saving changes to pcp." << std::endl);
     335
    334336  const Matrix &domain = World::getInstance().getDomain().getM();
    335337  class ThermoStatContainer *Thermostats = World::getInstance().getThermostats();
     
    460462  PlaneWaveSpecifics.MaxPsiDouble = PlaneWaveSpecifics.PsiMaxNoDown = PlaneWaveSpecifics.PsiMaxNoUp = PlaneWaveSpecifics.PsiType = 0;
    461463  for (vector<atom *>::iterator runner = allatoms.begin(); runner != allatoms.end(); ++runner) {
    462     PlaneWaveSpecifics.MaxPsiDouble += (*runner)->getType()->NoValenceOrbitals;
     464    PlaneWaveSpecifics.MaxPsiDouble += (*runner)->type->NoValenceOrbitals;
    463465  }
    464466  cout << PlaneWaveSpecifics.MaxPsiDouble << endl;
     
    495497  // insert all found elements into the map
    496498  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));
    498500    if (!Inserter.second) // increase if present
    499501      Inserter.first->second += 1;
     
    526528  int nr = 0;
    527529  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) );
    529531    if (!Inserter.second)
    530532      Inserter.first->second += 1;
    531     const int Z = (*AtomRunner)->getType()->Z;
     533    const int Z = (*AtomRunner)->type->Z;
    532534    *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];
    534536    *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";
    537539    *file << " # molecule nr " << nr++ << endl;
    538540  }
Note: See TracChangeset for help on using the changeset viewer.