Index: src/molecule_dynamics.cpp
===================================================================
--- src/molecule_dynamics.cpp	(revision a479fa6f7cb1bddf84d6c12af3c09dc810b66580)
+++ src/molecule_dynamics.cpp	(revision 735b1c1514f0f9ac27c1a3ef683b9fa6ea2cf010)
@@ -59,9 +59,9 @@
       break;
     // determine normalized trajectories direction vector (n1, n2)
-    Sprinter = Params.PermutationMap[Walker->ParticleInfo_nr];   // find first target point
+    Sprinter = Params.PermutationMap[Walker->getNr()];   // find first target point
     trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep);
     trajectory1.Normalize();
     Norm1 = trajectory1.Norm();
-    Sprinter = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find second target point
+    Sprinter = Params.PermutationMap[(*iter)->getNr()];   // find second target point
     trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep);
     trajectory2.Normalize();
@@ -71,5 +71,5 @@
       tmp = Walker->getPositionAtStep(Params.startstep).distance((*iter)->getPositionAtStep(Params.startstep));
     } else if (Norm1 < MYEPSILON) {
-      Sprinter = Params.PermutationMap[Walker->ParticleInfo_nr];   // find first target point
+      Sprinter = Params.PermutationMap[Walker->getNr()];   // find first target point
       trajectory1 = Sprinter->getPositionAtStep(Params.endstep) - (*iter)->getPositionAtStep(Params.startstep);
       trajectory2 *= trajectory1.ScalarProduct(trajectory2); // trajectory2 is scaled to unity, hence we don't need to divide by anything
@@ -77,5 +77,5 @@
       tmp = trajectory1.Norm();  // remaining norm is distance
     } else if (Norm2 < MYEPSILON) {
-      Sprinter = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find second target point
+      Sprinter = Params.PermutationMap[(*iter)->getNr()];   // find second target point
       trajectory2 = Sprinter->getPositionAtStep(Params.endstep) - Walker->getPositionAtStep(Params.startstep);  // copy second offset
       trajectory1 *= trajectory2.ScalarProduct(trajectory1); // trajectory1 is scaled to unity, hence we don't need to divide by anything
@@ -147,6 +147,6 @@
   double result = 0.;
   for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-    if ((Params.PermutationMap[Walker->ParticleInfo_nr] == Params.PermutationMap[(*iter)->ParticleInfo_nr]) && (Walker->ParticleInfo_nr < (*iter)->ParticleInfo_nr)) {
-  //    atom *Sprinter = PermutationMap[Walker->ParticleInfo_nr];
+    if ((Params.PermutationMap[Walker->getNr()] == Params.PermutationMap[(*iter)->getNr()]) && (Walker->getNr() < (*iter)->getNr())) {
+  //    atom *Sprinter = PermutationMap[Walker->getNr()];
   //        Log() << Verbose(0) << *Walker << " and " << *(*iter) << " are heading to the same target at ";
   //        Log() << Verbose(0) << Sprinter->getPosition(endstep);
@@ -182,5 +182,5 @@
   for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
     // first term: distance to target
-    Runner = Params.PermutationMap[(*iter)->ParticleInfo_nr];   // find target point
+    Runner = Params.PermutationMap[(*iter)->getNr()];   // find target point
     tmp = ((*iter)->getPositionAtStep(Params.startstep).distance(Runner->getPositionAtStep(Params.endstep)));
     tmp *= Params.IsAngstroem ? 1. : 1./AtomicLengthToAngstroem;
@@ -213,7 +213,7 @@
   zeile2 << "                ";
   for (int i=0;i<AtomCount;i++) {
-    Params.DoubleList[Params.PermutationMap[i]->ParticleInfo_nr]++;
+    Params.DoubleList[Params.PermutationMap[i]->getNr()]++;
     zeile1 << i << " ";
-    zeile2 << Params.PermutationMap[i]->ParticleInfo_nr << " ";
+    zeile2 << Params.PermutationMap[i]->getNr() << " ";
   }
   for (int i=0;i<AtomCount;i++)
@@ -239,5 +239,5 @@
   for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
     for (molecule::const_iterator runner = mol->begin(); runner != mol->end(); ++runner) {
-      Params.DistanceList[(*iter)->ParticleInfo_nr]->insert( DistancePair((*iter)->getPositionAtStep(Params.startstep).distance((*runner)->getPositionAtStep(Params.endstep)), (*runner)) );
+      Params.DistanceList[(*iter)->getNr()]->insert( DistancePair((*iter)->getPositionAtStep(Params.startstep).distance((*runner)->getPositionAtStep(Params.endstep)), (*runner)) );
     }
   }
@@ -252,9 +252,9 @@
 {
   for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-    Params.StepList[(*iter)->ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin();    // stores the step to the next iterator that could be a possible next target
-    Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin()->second;   // always pick target with the smallest distance
-    Params.DoubleList[Params.DistanceList[(*iter)->ParticleInfo_nr]->begin()->second->ParticleInfo_nr]++;            // increase this target's source count (>1? not injective)
-    Params.DistanceIterators[(*iter)->ParticleInfo_nr] = Params.DistanceList[(*iter)->ParticleInfo_nr]->begin();    // and remember which one we picked
-    DoLog(2) && (Log() << Verbose(2) << **iter << " starts with distance " << Params.DistanceList[(*iter)->ParticleInfo_nr]->begin()->first << "." << endl);
+    Params.StepList[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin();    // stores the step to the next iterator that could be a possible next target
+    Params.PermutationMap[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin()->second;   // always pick target with the smallest distance
+    Params.DoubleList[Params.DistanceList[(*iter)->getNr()]->begin()->second->getNr()]++;            // increase this target's source count (>1? not injective)
+    Params.DistanceIterators[(*iter)->getNr()] = Params.DistanceList[(*iter)->getNr()]->begin();    // and remember which one we picked
+    DoLog(2) && (Log() << Verbose(2) << **iter << " starts with distance " << Params.DistanceList[(*iter)->getNr()]->begin()->first << "." << endl);
   }
 };
@@ -270,17 +270,17 @@
 {
   double Potential = 0;
-  DistanceMap::iterator NewBase = Params.DistanceIterators[Walker->ParticleInfo_nr];  // store old base
+  DistanceMap::iterator NewBase = Params.DistanceIterators[Walker->getNr()];  // store old base
   do {
     NewBase++;  // take next further distance in distance to targets list that's a target of no one
-  } while ((Params.DoubleList[NewBase->second->ParticleInfo_nr] != 0) && (NewBase != Params.DistanceList[Walker->ParticleInfo_nr]->end()));
-  if (NewBase != Params.DistanceList[Walker->ParticleInfo_nr]->end()) {
-    Params.PermutationMap[Walker->ParticleInfo_nr] = NewBase->second;
+  } while ((Params.DoubleList[NewBase->second->getNr()] != 0) && (NewBase != Params.DistanceList[Walker->getNr()]->end()));
+  if (NewBase != Params.DistanceList[Walker->getNr()]->end()) {
+    Params.PermutationMap[Walker->getNr()] = NewBase->second;
     Potential = fabs(mol->ConstrainedPotential(Params));
     if (Potential > OldPotential) { // undo
-      Params.PermutationMap[Walker->ParticleInfo_nr] = Params.DistanceIterators[Walker->ParticleInfo_nr]->second;
+      Params.PermutationMap[Walker->getNr()] = Params.DistanceIterators[Walker->getNr()]->second;
     } else {  // do
-      Params.DoubleList[Params.DistanceIterators[Walker->ParticleInfo_nr]->second->ParticleInfo_nr]--;  // decrease the old entry in the doubles list
-      Params.DoubleList[NewBase->second->ParticleInfo_nr]++;    // increase the old entry in the doubles list
-      Params.DistanceIterators[Walker->ParticleInfo_nr] = NewBase;
+      Params.DoubleList[Params.DistanceIterators[Walker->getNr()]->second->getNr()]--;  // decrease the old entry in the doubles list
+      Params.DoubleList[NewBase->second->getNr()]++;    // increase the old entry in the doubles list
+      Params.DistanceIterators[Walker->getNr()] = NewBase;
       OldPotential = Potential;
       DoLog(3) && (Log() << Verbose(3) << "Found a new permutation, new potential is " << OldPotential << "." << endl);
@@ -310,5 +310,5 @@
     if (iter == mol->end()) // round-robin at the end
       iter = mol->begin();
-    if (Params.DoubleList[Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second->ParticleInfo_nr] <= 1)  // no need to make those injective that aren't
+    if (Params.DoubleList[Params.DistanceIterators[(*iter)->getNr()]->second->getNr()] <= 1)  // no need to make those injective that aren't
       continue;
     // now, try finding a new one
@@ -398,17 +398,17 @@
       for (; iter != end(); ++iter) {
         PrintPermutationMap(getAtomCount(), Params);
-        Sprinter = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second;   // store initial partner
-        Strider = Params.DistanceIterators[(*iter)->ParticleInfo_nr];  //remember old iterator
-        Params.DistanceIterators[(*iter)->ParticleInfo_nr] = Params.StepList[(*iter)->ParticleInfo_nr];
-        if (Params.DistanceIterators[(*iter)->ParticleInfo_nr] == Params.DistanceList[(*iter)->ParticleInfo_nr]->end()) {// stop, before we run through the list and still on
-          Params.DistanceIterators[(*iter)->ParticleInfo_nr] == Params.DistanceList[(*iter)->ParticleInfo_nr]->begin();
+        Sprinter = Params.DistanceIterators[(*iter)->getNr()]->second;   // store initial partner
+        Strider = Params.DistanceIterators[(*iter)->getNr()];  //remember old iterator
+        Params.DistanceIterators[(*iter)->getNr()] = Params.StepList[(*iter)->getNr()];
+        if (Params.DistanceIterators[(*iter)->getNr()] == Params.DistanceList[(*iter)->getNr()]->end()) {// stop, before we run through the list and still on
+          Params.DistanceIterators[(*iter)->getNr()] == Params.DistanceList[(*iter)->getNr()]->begin();
           break;
         }
-        //Log() << Verbose(2) << "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)->ParticleInfo_nr]->second << "." << endl;
+        //Log() << Verbose(2) << "Current Walker: " << *(*iter) << " with old/next candidate " << *Sprinter << "/" << *DistanceIterators[(*iter)->getNr()]->second << "." << endl;
         // find source of the new target
         molecule::const_iterator runner = begin();
         for (; runner != end(); ++runner) { // find the source whose toes we might be stepping on (Walker's new target should be in use by another already)
-          if (Params.PermutationMap[(*runner)->ParticleInfo_nr] == Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second) {
-            //Log() << Verbose(2) << "Found the corresponding owner " << *(*runner) << " to " << *PermutationMap[(*runner)->ParticleInfo_nr] << "." << endl;
+          if (Params.PermutationMap[(*runner)->getNr()] == Params.DistanceIterators[(*iter)->getNr()]->second) {
+            //Log() << Verbose(2) << "Found the corresponding owner " << *(*runner) << " to " << *PermutationMap[(*runner)->getNr()] << "." << endl;
             break;
           }
@@ -416,13 +416,13 @@
         if (runner != end()) { // we found the other source
           // then look in its distance list for Sprinter
-          Rider = Params.DistanceList[(*runner)->ParticleInfo_nr]->begin();
-          for (; Rider != Params.DistanceList[(*runner)->ParticleInfo_nr]->end(); Rider++)
+          Rider = Params.DistanceList[(*runner)->getNr()]->begin();
+          for (; Rider != Params.DistanceList[(*runner)->getNr()]->end(); Rider++)
             if (Rider->second == Sprinter)
               break;
-          if (Rider != Params.DistanceList[(*runner)->ParticleInfo_nr]->end()) { // if we have found one
-            //Log() << Verbose(2) << "Current Other: " << *(*runner) << " with old/next candidate " << *PermutationMap[(*runner)->ParticleInfo_nr] << "/" << *Rider->second << "." << endl;
+          if (Rider != Params.DistanceList[(*runner)->getNr()]->end()) { // if we have found one
+            //Log() << Verbose(2) << "Current Other: " << *(*runner) << " with old/next candidate " << *PermutationMap[(*runner)->getNr()] << "/" << *Rider->second << "." << endl;
             // exchange both
-            Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second; // put next farther distance into PermutationMap
-            Params.PermutationMap[(*runner)->ParticleInfo_nr] = Sprinter;  // and hand the old target to its respective owner
+            Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second; // put next farther distance into PermutationMap
+            Params.PermutationMap[(*runner)->getNr()] = Sprinter;  // and hand the old target to its respective owner
             PrintPermutationMap(getAtomCount(), Params);
             // calculate the new potential
@@ -431,13 +431,13 @@
             if (Potential > OldPotential) { // we made everything worse! Undo ...
               //Log() << Verbose(3) << "Nay, made the potential worse: " << Potential << " vs. " << OldPotential << "!" << endl;
-              //Log() << Verbose(3) << "Setting " << *(*runner) << "'s source to " << *Params.DistanceIterators[(*runner)->ParticleInfo_nr]->second << "." << endl;
+              //Log() << Verbose(3) << "Setting " << *(*runner) << "'s source to " << *Params.DistanceIterators[(*runner)->getNr()]->second << "." << endl;
               // Undo for Runner (note, we haven't moved the iteration yet, we may use this)
-              Params.PermutationMap[(*runner)->ParticleInfo_nr] = Params.DistanceIterators[(*runner)->ParticleInfo_nr]->second;
+              Params.PermutationMap[(*runner)->getNr()] = Params.DistanceIterators[(*runner)->getNr()]->second;
               // Undo for Walker
-              Params.DistanceIterators[(*iter)->ParticleInfo_nr] = Strider;  // take next farther distance target
-              //Log() << Verbose(3) << "Setting " << *(*iter) << "'s source to " << *Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second << "." << endl;
-              Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second;
+              Params.DistanceIterators[(*iter)->getNr()] = Strider;  // take next farther distance target
+              //Log() << Verbose(3) << "Setting " << *(*iter) << "'s source to " << *Params.DistanceIterators[(*iter)->getNr()]->second << "." << endl;
+              Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second;
             } else {
-              Params.DistanceIterators[(*runner)->ParticleInfo_nr] = Rider;  // if successful also move the pointer in the iterator list
+              Params.DistanceIterators[(*runner)->getNr()] = Rider;  // if successful also move the pointer in the iterator list
               DoLog(3) && (Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl);
               OldPotential = Potential;
@@ -453,7 +453,7 @@
           }
         } else {
-          Params.PermutationMap[(*iter)->ParticleInfo_nr] = Params.DistanceIterators[(*iter)->ParticleInfo_nr]->second; // new target has no source!
+          Params.PermutationMap[(*iter)->getNr()] = Params.DistanceIterators[(*iter)->getNr()]->second; // new target has no source!
         }
-        Params.StepList[(*iter)->ParticleInfo_nr]++; // take next farther distance target
+        Params.StepList[(*iter)->getNr()]++; // take next farther distance target
       }
     } while (++iter != end());
@@ -486,8 +486,8 @@
   DoLog(1) && (Log() << Verbose(1) << "Calculating forces and adding onto ForceMatrix ... " << endl);
   BOOST_FOREACH(atom *_atom, atoms) {
-    atom *Sprinter = PermutationMap[_atom->ParticleInfo_nr];
+    atom *Sprinter = PermutationMap[_atom->getNr()];
     // set forces
     for (int i=NDIM;i++;)
-      Force->Matrix[0][_atom->ParticleInfo_nr][5+i] += 2.*constant*sqrt(_atom->getPositionAtStep(startstep).distance(Sprinter->getPositionAtStep(endstep)));
+      Force->Matrix[0][_atom->getNr()][5+i] += 2.*constant*sqrt(_atom->getPositionAtStep(startstep).distance(Sprinter->getPositionAtStep(endstep)));
   }
   DoLog(1) && (Log() << Verbose(1) << "done." << endl);
@@ -520,5 +520,5 @@
     PermutationMap = new atom *[getAtomCount()];
     for(internal_iterator iter = atoms.begin(); iter != atoms.end();++iter){
-      PermutationMap[(*iter)->ParticleInfo_nr] = (*iter);
+      PermutationMap[(*iter)->getNr()] = (*iter);
     }
   }
@@ -540,5 +540,5 @@
       Sprinter = mol->AddCopyAtom((*iter));
       // add to Trajectories
-      Vector temp = (*iter)->getPositionAtStep(startstep) + (PermutationMap[(*iter)->ParticleInfo_nr]->getPositionAtStep(endstep) - (*iter)->getPositionAtStep(startstep))*((double)step/(double)MaxSteps);
+      Vector temp = (*iter)->getPositionAtStep(startstep) + (PermutationMap[(*iter)->getNr()]->getPositionAtStep(endstep) - (*iter)->getPositionAtStep(startstep))*((double)step/(double)MaxSteps);
       Sprinter->setPosition(temp);
       (*iter)->setAtomicVelocityAtStep(step, zeroVec);
@@ -618,5 +618,5 @@
   // check size of vectors
   BOOST_FOREACH(atom *_atom, atoms) {
-    _atom->VelocityVerletUpdate(_atom->ParticleInfo_nr, MDSteps+1, &configuration, &Force, (const size_t) 0);
+    _atom->VelocityVerletUpdate(_atom->getNr(), MDSteps+1, &configuration, &Force, (const size_t) 0);
   }
 
