Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Legacy/oldmenu.cpp

    rf16a4b r442218  
    99#include "Legacy/oldmenu.hpp"
    1010#include "analysis_correlation.hpp"
    11 #include "World.hpp"
    1211#include "atom.hpp"
    1312#include "bond.hpp"
     
    7877      case 'a': // absolute coordinates of atom
    7978        Log() << Verbose(0) << "Enter absolute coordinates." << endl;
    80         first = World::get()->createAtom();
     79        first = new atom;
    8180        first->x.AskPosition(mol->cell_size, false);
    8281        first->type = periode->AskElement();  // give type
     
    8584
    8685      case 'b': // relative coordinates of atom wrt to reference point
    87         first = World::get()->createAtom();
     86        first = new atom;
    8887        valid = true;
    8988        do {
     
    101100
    102101      case 'c': // relative coordinates of atom wrt to already placed atom
    103         first = World::get()->createAtom();
     102        first = new atom;
    104103        valid = true;
    105104        do {
     
    117116
    118117    case 'd': // two atoms, two angles and a distance
    119         first = World::get()->createAtom();
     118        first = new atom;
    120119        valid = true;
    121120        do {
     
    217216
    218217      case 'e': // least square distance position to a set of atoms
    219         first = World::get()->createAtom();
     218        first = new atom;
    220219        atoms = new (Vector*[128]);
    221220        valid = true;
     
    239238          mol->AddAtom(first);  // add to molecule
    240239        } else {
    241           World::get()->destroyAtom(first);
     240          delete first;
    242241          Log() << Verbose(0) << "Please enter at least two vectors!\n";
    243242        }
     
    737736        Log() << Verbose(0) << "New element by atomic number Z: ";
    738737        cin >> Z;
    739         first->setType(Z);
     738        first->type = periode->FindElement(Z);
    740739        Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->type->name << "." << endl;
    741740      }
     
    782781        x.AddVector(&y); // per factor one cell width further
    783782        for (int k=count;k--;) { // go through every atom of the original cell
    784           first = World::get()->createAtom(); // create a new body
     783          first = new atom(); // create a new body
    785784          first->x.CopyVector(vectors[k]);  // use coordinate of original atom
    786785          first->x.AddVector(&x);     // translate the coordinates
Note: See TracChangeset for help on using the changeset viewer.