Changes in src/Parser/XyzParser.cpp [ab4b55:97ebf8]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Parser/XyzParser.cpp ¶
rab4b55 r97ebf8 44 44 45 45 for (int i = 0; i < numberOfAtoms; i++) { 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));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)); 49 49 } 50 50 } … … 56 56 */ 57 57 void XyzParser::save(ostream* file) { 58 *file << World::get ()->numAtoms() << endl << comment << endl;58 *file << World::getInstance().numAtoms() << endl << comment << endl; 59 59 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;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; 63 63 } 64 64 }
Note:
See TracChangeset
for help on using the changeset viewer.