Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/XyzParser.cpp

    r97ebf8 rab4b55  
    4444
    4545  for (int i = 0; i < numberOfAtoms; i++) {
    46     newAtom = World::getInstance().createAtom();
    47     *file >> type >> ws >> newAtom->x[0] >> ws >> newAtom->x[1] >> ws >> newAtom->x[2];
    48     newAtom->setType(World::getInstance().getPeriode()->FindElement(type));
     46    newAtom = World::get()->createAtom();
     47    *file >> type >> ws >> newAtom->x.x[0] >> ws >> newAtom->x.x[1] >> ws >> newAtom->x.x[2];
     48    newAtom->setType(World::get()->getPeriode()->FindElement(type));
    4949  }
    5050}
     
    5656 */
    5757void XyzParser::save(ostream* file) {
    58   *file << World::getInstance().numAtoms() << endl << comment << endl;
     58  *file << World::get()->numAtoms() << endl << comment << endl;
    5959
    60   vector<atom*> atoms = World::getInstance().getAllAtoms();
    61   for(vector<atom*>::iterator it = atoms.begin(); it != atoms.end(); it++) {
    62     *file << fixed << (*it)->getType()->symbol << "\t" << (*it)->x[0] << "\t" << (*it)->x[1] << "\t" << (*it)->x[2] << endl;
     60  vector<atom*> atoms = World::get()->getAllAtoms();
     61  for(vector<atom*>::iterator it = atoms.begin(); it < atoms.end(); it++) {
     62    *file << fixed << (*it)->getType()->symbol << "\t" << (*it)->x.x[0] << "\t" << (*it)->x.x[1] << "\t" << (*it)->x.x[2] << endl;
    6363  }
    6464}
Note: See TracChangeset for help on using the changeset viewer.