Index: src/Legacy/oldmenu.cpp
===================================================================
--- src/Legacy/oldmenu.cpp	(revision 952f384acb0e9ac4e3de4c2ad9da1e8ceaf2c797)
+++ src/Legacy/oldmenu.cpp	(revision 8f4df1ef77448922e1b977a3e138bcc2a4a4dad0)
@@ -89,9 +89,9 @@
         first = World::getInstance().createAtom();
         std::vector<element *> elements;
-        dialog->queryVector("Please enter coordinates: ",&first->x,World::getInstance().getDomain(), false);
+        dialog->queryVector("Please enter coordinates: ",&first->AtomicPosition,World::getInstance().getDomain(), false);
         dialog->queryElement("Please choose element: ",&elements);
         if(dialog->display()){
           if (elements.size() == 1) {
-            first->type = elements.at(0);
+            first->setType(elements.at(0));
             mol->AddAtom(first);  // add to molecule
           } else {
@@ -113,12 +113,12 @@
           auto_ptr<Dialog> dialog(UIFactory::getInstance().makeDialog());
           dialog->queryVector("Enter reference coordinates.",&x,World::getInstance().getDomain(), true);
-          dialog->queryVector("Enter relative coordinates.",&first->x,World::getInstance().getDomain(), false);
+          dialog->queryVector("Enter relative coordinates.",&first->AtomicPosition,World::getInstance().getDomain(), false);
           if((aborted = !dialog->display())){
             continue;
           }
-          first->x += x;
-        } while (!aborted && !(valid = mol->CheckBounds((const Vector *)&first->x)));
+          first->AtomicPosition += x;
+        } while (!aborted && !(valid = mol->CheckBounds((const Vector *)&first->AtomicPosition)));
         if(!aborted){
-          first->type = periode->AskElement();  // give type
+          first->AtomicElement = periode->AskElement();  // give type
           mol->AddAtom(first);  // add to molecule
         }
@@ -136,11 +136,11 @@
           auto_ptr<Dialog> dialog(UIFactory::getInstance().makeDialog());
           second = mol->AskAtom("Enter atom number: ");
-          dialog->queryVector("Enter relative coordinates.",&first->x,World::getInstance().getDomain(), false);
+          dialog->queryVector("Enter relative coordinates.",&first->AtomicPosition,World::getInstance().getDomain(), false);
           dialog->display();
           for (int i=NDIM;i--;) {
-            first->x[i] += second->x[i];
+            first->AtomicPosition[i] += second->AtomicPosition[i];
           }
-        } while (!(valid = mol->CheckBounds((const Vector *)&first->x)));
-        first->type = periode->AskElement();  // give type
+        } while (!(valid = mol->CheckBounds((const Vector *)&first->AtomicPosition)));
+        first->AtomicElement = periode->AskElement();  // give type
         mol->AddAtom(first);  // add to molecule
       }
@@ -152,5 +152,5 @@
         do {
           if (!valid) {
-            eLog() << Verbose(2) << "Resulting coordinates out of cell - " << first->x << endl;
+            eLog() << Verbose(2) << "Resulting coordinates out of cell - " << first->AtomicPosition << endl;
           }
           Log() << Verbose(0) << "First, we need two atoms, the first atom is the central, while the second is the outer one." << endl;
@@ -185,8 +185,8 @@
           */
           // calc axis vector
-          x= second->x - third->x;
+          x= second->AtomicPosition - third->AtomicPosition;
           x.Normalize();
           Log() << Verbose(0) << "x: " << x << endl;
-          z = Plane(second->x,third->x,fourth->x).getNormal();
+          z = Plane(second->AtomicPosition,third->AtomicPosition,fourth->AtomicPosition).getNormal();
           Log() << Verbose(0) << "z: " << z << endl;
           y = Plane(x,z,0).getNormal();
@@ -194,18 +194,18 @@
 
           // rotate vector around first angle
-          first->x = x;
-          first->x = Line(zeroVec,z).rotateVector(first->x,b - M_PI);
-          Log() << Verbose(0) << "Rotated vector: " << first->x << endl,
+          first->AtomicPosition = x;
+          first->AtomicPosition = Line(zeroVec,z).rotateVector(first->AtomicPosition,b - M_PI);
+          Log() << Verbose(0) << "Rotated vector: " << first->AtomicPosition << endl,
           // remove the projection onto the rotation plane of the second angle
           n = y;
-          n.Scale(first->x.ScalarProduct(y));
+          n.Scale(first->AtomicPosition.ScalarProduct(y));
           Log() << Verbose(0) << "N1: " << n << endl;
-          first->x -= n;
-          Log() << Verbose(0) << "Subtracted vector: " << first->x << endl;
+          first->AtomicPosition -= n;
+          Log() << Verbose(0) << "Subtracted vector: " << first->AtomicPosition << endl;
           n = z;
-          n.Scale(first->x.ScalarProduct(z));
+          n.Scale(first->AtomicPosition.ScalarProduct(z));
           Log() << Verbose(0) << "N2: " << n << endl;
-          first->x -= n;
-          Log() << Verbose(0) << "2nd subtracted vector: " << first->x << endl;
+          first->AtomicPosition -= n;
+          Log() << Verbose(0) << "2nd subtracted vector: " << first->AtomicPosition << endl;
 
           // rotate another vector around second angle
@@ -215,12 +215,12 @@
 
           // add the two linear independent vectors
-          first->x += n;
-          first->x.Normalize();
-          first->x.Scale(a);
-          first->x += second->x;
-
-          Log() << Verbose(0) << "resulting coordinates: " << first->x << endl;
-        } while (!(valid = mol->CheckBounds((const Vector *)&first->x)));
-        first->type = periode->AskElement();  // give type
+          first->AtomicPosition += n;
+          first->AtomicPosition.Normalize();
+          first->AtomicPosition.Scale(a);
+          first->AtomicPosition += second->AtomicPosition;
+
+          Log() << Verbose(0) << "resulting coordinates: " << first->AtomicPosition << endl;
+        } while (!(valid = mol->CheckBounds((const Vector *)&first->AtomicPosition)));
+        first->AtomicElement = periode->AskElement();  // give type
         mol->AddAtom(first);  // add to molecule
         break;
@@ -239,12 +239,12 @@
           if (j != -1) {
             second = mol->FindAtom(j);
-            atoms[i++] = &(second->x);
+            atoms[i++] = &(second->AtomicPosition);
           }
         } while ((j != -1) && (i<128));
         if (i >= 2) {
-          LSQdistance(first->x,(const Vector **)atoms, i);
-
-          Log() << Verbose(0) << first->x;
-          first->type = periode->AskElement();  // give type
+          LSQdistance(first->AtomicPosition,(const Vector **)atoms, i);
+
+          Log() << Verbose(0) << first->AtomicPosition;
+          first->AtomicElement = periode->AskElement();  // give type
           mol->AddAtom(first);  // add to molecule
         } else {
@@ -338,5 +338,5 @@
       third = mol->AskAtom("Enter third atom: ");
 
-      n = Plane(first->x,second->x,third->x).getNormal();
+      n = Plane(first->AtomicPosition,second->AtomicPosition,third->AtomicPosition).getNormal();
       break;
     case 'b': // normal vector of mirror plane
@@ -354,5 +354,5 @@
       second = mol->AskAtom("Enter second atom: ");
 
-      n = first->x - second->x;
+      n = first->AtomicPosition - second->AtomicPosition;
       n.Normalize();
       break;
@@ -405,5 +405,5 @@
       third = mol->AskAtom("Enter third atom: ");
 
-      n = Plane(first->x,second->x,third->x).getNormal();
+      n = Plane(first->AtomicPosition,second->AtomicPosition,third->AtomicPosition).getNormal();
       break;
     case 'b': // normal vector of mirror plane
@@ -421,5 +421,5 @@
       second = mol->AskAtom("Enter second atom: ");
 
-      n = first->x - second->x;
+      n = first->AtomicPosition - second->AtomicPosition;
       n.Normalize();
       break;
@@ -464,5 +464,5 @@
         for (molecule::iterator iter = mol->begin(); iter != mol->end(); ) {
           runner = iter++;
-          if ((*runner)->x.DistanceSquared((*runner)->x) > tmp1*tmp1) // distance to first above radius ...
+          if ((*runner)->AtomicPosition.DistanceSquared((*runner)->AtomicPosition) > tmp1*tmp1) // distance to first above radius ...
             mol->RemoveAtom((*runner));
         }
@@ -479,5 +479,5 @@
       for (molecule::iterator iter = mol->begin(); iter != mol->end(); ) {
         runner = iter++;
-        if (((*runner)->x[axis] < tmp1) || ((*runner)->x[axis] > tmp2)) {// out of boundary ...
+        if (((*runner)->AtomicPosition[axis] < tmp1) || ((*runner)->AtomicPosition[axis] > tmp2)) {// out of boundary ...
           //Log() << Verbose(0) << "Atom " << *(*runner) << " with " << (*runner)->x.x[axis] << " on axis " << axis << " is out of bounds [" << tmp1 << "," << tmp2 << "]." << endl;
           mol->RemoveAtom((*runner));
@@ -526,8 +526,8 @@
 
       for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-        Z = (*iter)->type->Z;
+        Z = (*iter)->getType()->Z;
         tmp1 = 0.;
         if (first != (*iter)) {
-          x = first->x - (*iter)->x;
+          x = first->AtomicPosition - (*iter)->AtomicPosition;
           tmp1 = x.Norm();
         }
@@ -536,5 +536,5 @@
       }
       for (int i=MAX_ELEMENTS;i--;)
-        if (min[i] != 0.) Log() << Verbose(0) << "Minimum Bond length between " << first->type->name << " Atom " << first->nr << " and next Ion of type " << (periode->FindElement(i))->name << ": " << min[i] << " a.u." << endl;
+        if (min[i] != 0.) Log() << Verbose(0) << "Minimum Bond length between " << first->getType()->name << " Atom " << first->nr << " and next Ion of type " << (periode->FindElement(i))->name << ": " << min[i] << " a.u." << endl;
       break;
 
@@ -544,5 +544,5 @@
       for (int i=NDIM;i--;)
         min[i] = 0.;
-      x = first->x - second->x;
+      x = first->AtomicPosition - second->AtomicPosition;
       tmp1 = x.Norm();
       Log() << Verbose(1) << "Distance vector is " << x << "." << "/n"
@@ -556,6 +556,6 @@
       third  = mol->AskAtom("Enter last atom: ");
       tmp1 = tmp2 = tmp3 = 0.;
-      x = first->x - second->x;
-      y = third->x - second->x;
+      x = first->AtomicPosition - second->AtomicPosition;
+      y = third->AtomicPosition - second->AtomicPosition;
       Log() << Verbose(0) << "Bond angle between first atom Nr." << first->nr << ", central atom Nr." << second->nr << " and last atom Nr." << third->nr << ": ";
       Log() << Verbose(0) << (acos(x.ScalarProduct(y)/(y.Norm()*x.Norm()))/M_PI*180.) << " degrees" << endl;
@@ -695,11 +695,11 @@
         minBond = 0.;
         for (int i=NDIM;i--;)
-          minBond += (first->x[i]-second->x[i])*(first->x[i] - second->x[i]);
+          minBond += (first->AtomicPosition[i]-second->AtomicPosition[i])*(first->AtomicPosition[i] - second->AtomicPosition[i]);
         minBond = sqrt(minBond);
-        Log() << Verbose(0) << "Current Bond length between " << first->type->name << " Atom " << first->nr << " and " << second->type->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl;
+        Log() << Verbose(0) << "Current Bond length between " << first->getType()->name << " Atom " << first->nr << " and " << second->getType()->name << " Atom " << second->nr << ": " << minBond << " a.u." << endl;
         Log() << Verbose(0) << "Enter new bond length [a.u.]: ";
         cin >> bond;
         for (int i=NDIM;i--;) {
-          second->x[i] -= (second->x[i]-first->x[i])/minBond*(minBond-bond);
+          second->AtomicPosition[i] -= (second->AtomicPosition[i]-first->AtomicPosition[i])/minBond*(minBond-bond);
         }
         //Log() << Verbose(0) << "New coordinates of Atom " << second->nr << " are: ";
@@ -757,5 +757,5 @@
         cin >> Z;
         first->setType(Z);
-        Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->type->name << "." << endl;
+        Log() << Verbose(0) << "Atom " << first->nr << "'s element is " << first->getType()->name << "." << endl;
       }
       break;
@@ -785,6 +785,6 @@
       j = 0;
       for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-        Elements[j] = (*iter)->type;
-        vectors[j] = &(*iter)->x;
+        Elements[j] = (*iter)->AtomicElement;
+        vectors[j] = &(*iter)->AtomicPosition;
         j++;
       }
@@ -798,6 +798,6 @@
         for (int k=count;k--;) { // go through every atom of the original cell
           first = World::getInstance().createAtom(); // create a new body
-          first->x = (*vectors[k]) + x;  // use coordinate of original atom
-          first->type = Elements[k];  // insert original element
+          first->AtomicPosition = (*vectors[k]) + x;  // use coordinate of original atom
+          first->AtomicElement = Elements[k];  // insert original element
           mol->AddAtom(first);        // and add to the molecule (which increments ElementsInMolecule, AtomCount, ...)
         }
