Index: src/Atom/TesselPoint.cpp
===================================================================
--- src/Atom/TesselPoint.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/TesselPoint.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -52,14 +52,14 @@
 {};
 
-void TesselPoint::UpdateSteps()
+void TesselPoint::UpdateStep(const unsigned int _step)
 {
-  ASSERT(0, "TesselPoint::UpdateSteps() should never be called, TesselPoints don't have trajectories.");
-  AtomInfo::AppendTrajectoryStep();
+  ASSERT(0, "TesselPoint::UpdateStep() should never be called, TesselPoints don't have trajectories.");
+  AtomInfo::AppendTrajectoryStep(_step);
 };
 
-void TesselPoint::removeSteps()
+void TesselPoint::removeStep(const unsigned int _step)
 {
-  ASSERT(0, "TesselPoint::removeSteps() should never be called, TesselPoints don't have trajectories.");
-  AtomInfo::removeTrajectoryStep();
+  ASSERT(0, "TesselPoint::removeStep() should never be called, TesselPoints don't have trajectories.");
+  AtomInfo::removeTrajectoryStep(_step);
 };
 
Index: src/Atom/TesselPoint.hpp
===================================================================
--- src/Atom/TesselPoint.hpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/TesselPoint.hpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -37,5 +37,5 @@
    *
    */
-  virtual void UpdateSteps();
+  virtual void UpdateStep(const unsigned int _step);
 
   /** Pops the last step in all trajectory vectors.
@@ -45,5 +45,5 @@
    * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void removeSteps();
+  virtual void removeStep(const unsigned int _step);
 
   /** Getter for this.
Index: src/Atom/atom.cpp
===================================================================
--- src/Atom/atom.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -90,20 +90,20 @@
 
 
-void atom::UpdateSteps()
-{
-  LOG(4,"atom::UpdateSteps() called.");
+void atom::UpdateStep(const unsigned int _step)
+{
+  LOG(4,"atom::UpdateStep() called.");
   // append to position, velocity and force vector
-  AtomInfo::AppendTrajectoryStep();
+  AtomInfo::AppendTrajectoryStep(WorldTime::getTime()+1);
   // append to ListOfBonds vector
-  BondedParticleInfo::AppendTrajectoryStep();
-}
-
-void atom::removeSteps()
-{
-  LOG(4,"atom::removeSteps() called.");
+  BondedParticleInfo::AppendTrajectoryStep(WorldTime::getTime()+1);
+}
+
+void atom::removeStep(const unsigned int _step)
+{
+  LOG(4,"atom::removeStep() called.");
   // append to position, velocity and force vector
-  AtomInfo::removeTrajectoryStep();
+  AtomInfo::removeTrajectoryStep(_step);
   // append to ListOfBonds vector
-  BondedParticleInfo::removeTrajectoryStep();
+  BondedParticleInfo::removeTrajectoryStep(_step);
 }
 
@@ -310,8 +310,4 @@
 atom* NewAtom(atomId_t _id){
   atom * res = new atom();
-  // extent trajectory to current time step
-  const size_t CurrentTime = WorldTime::getTime();
-  for (size_t step = res->getTrajectorySize(); step <= CurrentTime; ++step)
-    res->UpdateSteps();
   res->setId(_id);
   return res;
Index: src/Atom/atom.hpp
===================================================================
--- src/Atom/atom.hpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom.hpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -65,5 +65,5 @@
    * real functions, \sa AppendTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void UpdateSteps();
+  virtual void UpdateStep(const unsigned int _step);
 
   /** Pops the last step in all trajectory vectors.
@@ -73,5 +73,5 @@
    * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void removeSteps();
+  virtual void removeStep(const unsigned int _step);
 
   /** Output of a single atom with given numbering.
Index: src/Atom/atom_atominfo.cpp
===================================================================
--- src/Atom/atom_atominfo.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom_atominfo.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -3,4 +3,5 @@
  * Description: creates and alters molecular systems
  * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Copyright (C)  2014 Frederik Heber. All rights reserved.
  * 
  *
@@ -55,12 +56,8 @@
   charge(0.)
 {
-  AtomicPosition.reserve(1);
-  AtomicPosition.push_back(zeroVec);
-  AtomicVelocity.reserve(1);
-  AtomicVelocity.push_back(zeroVec);
-  AtomicForce.reserve(1);
-  AtomicForce.push_back(zeroVec);
-
-};
+  AtomicPosition.insert( std::make_pair(0, zeroVec) );
+  AtomicVelocity.insert( std::make_pair(0, zeroVec) );
+  AtomicForce.insert( std::make_pair(0, zeroVec) );
+}
 
 /** Copy constructor of class AtomInfo.
@@ -68,13 +65,11 @@
 AtomInfo::AtomInfo(const AtomInfo &_atom) :
     AtomicPosition(_atom.AtomicPosition),
+    AtomicVelocity(_atom.AtomicVelocity),
+    AtomicForce(_atom.AtomicForce),
     AtomicElement(_atom.AtomicElement),
     FixedIon(_atom.FixedIon),
     charge(_atom.charge)
 {
-  AtomicVelocity.reserve(1);
-  AtomicVelocity.push_back(zeroVec);
-  AtomicForce.reserve(1);
-  AtomicForce.push_back(zeroVec);
-};
+}
 
 AtomInfo::AtomInfo(const VectorInterface &_v) :
@@ -83,11 +78,7 @@
     charge(0.)
 {
-  if (AtomicPosition.size() < 1)
-    AtomicPosition.resize(1);
-  AtomicPosition[0] = _v.getPosition();
-  AtomicVelocity.reserve(1);
-  AtomicVelocity.push_back(zeroVec);
-  AtomicForce.reserve(1);
-  AtomicForce.push_back(zeroVec);
+  AtomicPosition.insert( std::make_pair(0, _v.getPosition()) );
+  AtomicVelocity.insert( std::make_pair(0, zeroVec) );
+  AtomicForce.insert( std::make_pair(0, zeroVec) );
 };
 
@@ -98,10 +89,11 @@
 };
 
-void AtomInfo::AppendTrajectoryStep()
-{
-  NOTIFY(TrajectoryChanged);
-  AtomicPosition.push_back(zeroVec);
-  AtomicVelocity.push_back(zeroVec);
-  AtomicForce.push_back(zeroVec);
+void AtomInfo::AppendTrajectoryStep(const unsigned int _step)
+{
+  if (WorldTime::getTime() == _step)
+    NOTIFY(TrajectoryChanged);
+  AtomicPosition.insert( std::make_pair(_step, zeroVec) );
+  AtomicVelocity.insert( std::make_pair(_step, zeroVec) );
+  AtomicForce.insert( std::make_pair(_step, zeroVec) );
   LOG(5,"AtomInfo::AppendTrajectoryStep() called, size is ("
       << AtomicPosition.size() << ","
@@ -110,10 +102,11 @@
 }
 
-void AtomInfo::removeTrajectoryStep()
-{
-  NOTIFY(TrajectoryChanged);
-  AtomicPosition.pop_back();
-  AtomicVelocity.pop_back();
-  AtomicForce.pop_back();
+void AtomInfo::removeTrajectoryStep(const unsigned int _step)
+{
+  if (WorldTime::getTime() == _step)
+    NOTIFY(TrajectoryChanged);
+  AtomicPosition.erase(_step);
+  AtomicVelocity.erase(_step);
+  AtomicForce.erase(_step);
   LOG(5,"AtomInfo::removeTrajectoryStep() called, size is ("
       << AtomicPosition.size() << ","
@@ -141,27 +134,19 @@
 const double& AtomInfo::operator[](size_t i) const
 {
-  ASSERT(AtomicPosition.size() > WorldTime::getTime(),
-      "AtomInfo::operator[]() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[WorldTime::getTime()][i];
+  return atStep(i, WorldTime::getTime());
 }
 
 const double& AtomInfo::at(size_t i) const
 {
-  ASSERT(AtomicPosition.size() > WorldTime::getTime(),
-      "AtomInfo::at() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[WorldTime::getTime()].at(i);
+  return atStep(i, WorldTime::getTime());
 }
 
 const double& AtomInfo::atStep(size_t i, unsigned int _step) const
 {
-  ASSERT(AtomicPosition.size() > _step,
-      "AtomInfo::atStep() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[_step].at(i);
+  ASSERT(!AtomicPosition.empty(),
+      "AtomInfo::operator[]() - AtomicPosition is empty.");
+  VectorTrajectory_t::const_iterator iter =
+      AtomicPosition.lower_bound(_step);
+  return iter->second[i];
 }
 
@@ -170,27 +155,45 @@
   OBSERVE;
   NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(AtomicPosition.size() > WorldTime::getTime(),
-      "AtomInfo::set() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].at(i) = value;
+  VectorTrajectory_t::iterator iter = AtomicPosition.find(WorldTime::getTime());
+  if (iter !=  AtomicPosition.end()) {
+    iter->second[i] = value;
+  } else {
+    Vector newPos;
+    newPos[i] = value;
+#ifndef NDEBUG
+    std::pair<VectorTrajectory_t::iterator, bool> inserter =
+#endif
+        AtomicPosition.insert( std::make_pair(WorldTime::getTime(), newPos) );
+    ASSERT( inserter.second,
+        "AtomInfo::set() - time step "+toString(WorldTime::getTime())
+        +" present after all?");
+  }
+}
+
+/** Helps to determine whether the current step really exists or getPosition() has just
+ * delivered the one closest to it in the past.
+ *
+ * \param _step step to check
+ * \param true - step exists, false - step does not exist, getPosition() delivers closest
+ */
+bool AtomInfo::isStepPresent(const unsigned int _step) const
+{
+  VectorTrajectory_t::const_iterator iter =
+      AtomicPosition.find(_step);
+  return iter != AtomicPosition.end();
 }
 
 const Vector& AtomInfo::getPosition() const
 {
-  ASSERT(AtomicPosition.size() > WorldTime::getTime(),
-      "AtomInfo::getPosition() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[WorldTime::getTime()];
+  return getPositionAtStep(WorldTime::getTime());
 }
 
 const Vector& AtomInfo::getPositionAtStep(const unsigned int _step) const
 {
-  ASSERT(_step < AtomicPosition.size(),
-      "AtomInfo::getPositionAtStep() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[_step];
+  ASSERT(!AtomicPosition.empty(),
+      "AtomInfo::operator[]() - AtomicPosition is empty.");
+  VectorTrajectory_t::const_iterator iter =
+      AtomicPosition.lower_bound(_step);
+  return iter->second;
 }
 
@@ -207,115 +210,89 @@
 {
   const element *elem = World::getInstance().getPeriode()->FindElement(Z);
-  if (elem != NULL) {
-    OBSERVE;
-    NOTIFY(AtomObservable::ElementChanged);
-    AtomicElement = Z;
-  }
-}
-
-//Vector& AtomInfo::getAtomicVelocity()
-//{
-//  return AtomicVelocity[0];
-//}
-
-//Vector& AtomInfo::getAtomicVelocity(const int _step)
-//{
-//  ASSERT(_step < AtomicVelocity.size(),
-//      "AtomInfo::getAtomicVelocity() - Access out of range.");
-//  return AtomicVelocity[_step];
-//}
+  setType(elem);
+}
 
 const Vector& AtomInfo::getAtomicVelocity() const
 {
-  ASSERT(AtomicVelocity.size() > 0,
-      "AtomInfo::getAtomicVelocity() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicVelocity[WorldTime::getTime()];
+  return getAtomicVelocityAtStep(WorldTime::getTime());
 }
 
 const Vector& AtomInfo::getAtomicVelocityAtStep(const unsigned int _step) const
 {
-  ASSERT(_step < AtomicVelocity.size(),
-      "AtomInfo::getAtomicVelocity() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicVelocity[_step];
+  ASSERT(!AtomicVelocity.empty(),
+      "AtomInfo::operator[]() - AtomicVelocity is empty.");
+  VectorTrajectory_t::const_iterator iter =
+      AtomicVelocity.lower_bound(_step);
+  // special, we only interpolate between present time steps not into the future
+  if (_step > AtomicVelocity.begin()->first)
+    return zeroVec;
+  else
+    return iter->second;
 }
 
 void AtomInfo::setAtomicVelocity(const Vector &_newvelocity)
 {
+  setAtomicVelocityAtStep(WorldTime::getTime(), _newvelocity);
+}
+
+void AtomInfo::setAtomicVelocityAtStep(const unsigned int _step, const Vector &_newvelocity)
+{
   OBSERVE;
-  NOTIFY(AtomObservable::VelocityChanged);
-  ASSERT(WorldTime::getTime() < AtomicVelocity.size(),
-      "AtomInfo::setAtomicVelocity() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicVelocity[WorldTime::getTime()] = _newvelocity;
-}
-
-void AtomInfo::setAtomicVelocityAtStep(const unsigned int _step, const Vector &_newvelocity)
-{
-  OBSERVE;
+  VectorTrajectory_t::iterator iter = AtomicVelocity.find(_step);
+  if (iter !=  AtomicVelocity.end()) {
+    iter->second = _newvelocity;
+  } else {
+#ifndef NDEBUG
+    std::pair<VectorTrajectory_t::iterator, bool> inserter =
+#endif
+        AtomicVelocity.insert( std::make_pair(_step, _newvelocity) );
+    ASSERT( inserter.second,
+        "AtomInfo::set() - time step "+toString(_step)
+        +" present after all?");
+  }
   if (WorldTime::getTime() == _step)
     NOTIFY(AtomObservable::VelocityChanged);
-  const unsigned int size = AtomicVelocity.size();
-  ASSERT(_step <= size,
-      "AtomInfo::setAtomicVelocityAtStep() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(size)+"].");
-  if(_step < size) {
-    AtomicVelocity[_step] = _newvelocity;
-  } else if (_step == size) {
-    UpdateSteps();
-    AtomicVelocity[_step] = _newvelocity;
-  }
 }
 
 const Vector& AtomInfo::getAtomicForce() const
 {
-  ASSERT(WorldTime::getTime() < AtomicForce.size(),
-      "AtomInfo::getAtomicForce() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicForce[WorldTime::getTime()];
+  return getAtomicForceAtStep(WorldTime::getTime());
 }
 
 const Vector& AtomInfo::getAtomicForceAtStep(const unsigned int _step) const
 {
-  ASSERT(_step < AtomicForce.size(),
-      "AtomInfo::getAtomicForce() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicForce[_step];
+  ASSERT(!AtomicForce.empty(),
+      "AtomInfo::operator[]() - AtomicForce is empty.");
+  VectorTrajectory_t::const_iterator iter =
+      AtomicForce.lower_bound(_step);
+  // special, we only interpolate between present time steps not into the future
+  if (_step > AtomicForce.begin()->first)
+    return zeroVec;
+  else
+    return iter->second;
 }
 
 void AtomInfo::setAtomicForce(const Vector &_newforce)
 {
+  setAtomicForceAtStep(WorldTime::getTime(), _newforce);
+}
+
+void AtomInfo::setAtomicForceAtStep(const unsigned int _step, const Vector &_newforce)
+{
   OBSERVE;
-  NOTIFY(AtomObservable::ForceChanged);
-  ASSERT(WorldTime::getTime() < AtomicForce.size(),
-      "AtomInfo::setAtomicForce() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicForce[WorldTime::getTime()] = _newforce;
-}
-
-void AtomInfo::setAtomicForceAtStep(const unsigned int _step, const Vector &_newforce)
-{
-  OBSERVE;
+  VectorTrajectory_t::iterator iter = AtomicForce.find(_step);
+  if (iter !=  AtomicForce.end()) {
+    iter->second = _newforce;
+  } else {
+#ifndef NDEBUG
+    std::pair<VectorTrajectory_t::iterator, bool> inserter =
+#endif
+        AtomicForce.insert( std::make_pair(_step, _newforce) );
+    ASSERT( inserter.second,
+        "AtomInfo::set() - time step "+toString(_step)
+        +" present after all?");
+  }
   if (WorldTime::getTime() == _step)
     NOTIFY(AtomObservable::ForceChanged);
-  const unsigned int size = AtomicForce.size();
-  ASSERT(_step <= size,
-      "AtomInfo::setAtomicForce() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(AtomicPosition.size())+"].");
-  if(_step < size) {
-    AtomicForce[_step] = _newforce;
-  } else if (_step == size) {
-    UpdateSteps();
-    AtomicForce[_step] = _newforce;
-  }
 }
 
@@ -334,42 +311,29 @@
 void AtomInfo::setPosition(const Vector& _vector)
 {
+  setPositionAtStep(WorldTime::getTime(), _vector);
+}
+
+void AtomInfo::setPositionAtStep(unsigned int _step, const Vector& _vector)
+{
   OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::setPosition() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()] = _vector;
-  //cout << "AtomInfo::setPosition: " << getType()->symbol << " at " << getPosition() << endl;
-}
-
-void AtomInfo::setPositionAtStep(unsigned int _step, const Vector& _vector)
-{
-  OBSERVE;
+  VectorTrajectory_t::iterator iter = AtomicPosition.find(_step);
+  if (iter !=  AtomicPosition.end()) {
+    iter->second = _vector;
+  } else {
+#ifndef NDEBUG
+    std::pair<VectorTrajectory_t::iterator, bool> inserter =
+#endif
+        AtomicPosition.insert( std::make_pair(_step, _vector) );
+    ASSERT( inserter.second,
+        "AtomInfo::set() - time step "+toString(_step)
+        +" present after all?");
+  }
   if (WorldTime::getTime() == _step)
     NOTIFY(AtomObservable::PositionChanged);
-  const unsigned int size = AtomicPosition.size();
-  ASSERT(_step <= size,
-      "AtomInfo::setPosition() - Access out of range: "
-      +toString(_step)
-      +" not in [0,"+toString(size)+"].");
-  if(_step < size) {
-    AtomicPosition[_step] = _vector;
-  } else if (_step == size) {
-    UpdateSteps();
-    AtomicPosition[_step] = _vector;
-  }
-  //cout << "AtomInfo::setPosition: " << getType()->symbol << " at " << getPosition() << endl;
 }
 
 const VectorInterface& AtomInfo::operator+=(const Vector& b)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::operator+=() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()] += b;
+  setPosition(getPosition()+b);
   return *this;
 }
@@ -377,11 +341,5 @@
 const VectorInterface& AtomInfo::operator-=(const Vector& b)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::operator-=() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()] -= b;
+  setPosition(getPosition()-b);
   return *this;
 }
@@ -389,9 +347,5 @@
 Vector const AtomInfo::operator+(const Vector& b) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::operator+() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  Vector a(AtomicPosition[WorldTime::getTime()]);
+  Vector a(getPosition());
   a += b;
   return a;
@@ -400,9 +354,5 @@
 Vector const AtomInfo::operator-(const Vector& b) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::operator-() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  Vector a(AtomicPosition[WorldTime::getTime()]);
+  Vector a(getPosition());
   a -= b;
   return a;
@@ -411,47 +361,25 @@
 double AtomInfo::distance(const Vector &point) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::distance() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[WorldTime::getTime()].distance(point);
+  return getPosition().distance(point);
 }
 
 double AtomInfo::DistanceSquared(const Vector &y) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::DistanceSquared() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return AtomicPosition[WorldTime::getTime()].DistanceSquared(y);
+  return getPosition().DistanceSquared(y);
 }
 
 double AtomInfo::distance(const VectorInterface &_atom) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::distance() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return _atom.distance(AtomicPosition[WorldTime::getTime()]);
+  return _atom.distance(getPosition());
 }
 
 double AtomInfo::DistanceSquared(const VectorInterface &_atom) const
 {
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::DistanceSquared() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return _atom.DistanceSquared(AtomicPosition[WorldTime::getTime()]);
+  return _atom.DistanceSquared(getPosition());
 }
 
 VectorInterface &AtomInfo::operator=(const Vector& _vector)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::operator=() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()] = _vector;
+  setPosition(_vector);
   return *this;
 }
@@ -459,66 +387,38 @@
 void AtomInfo::ScaleAll(const double *factor)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::ScaleAll() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].ScaleAll(factor);
+  Vector temp(getPosition());
+  temp.ScaleAll(factor);
+  setPosition(temp);
 }
 
 void AtomInfo::ScaleAll(const Vector &factor)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::ScaleAll() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].ScaleAll(factor);
+  Vector temp(getPosition());
+  temp.ScaleAll(factor);
+  setPosition(temp);
 }
 
 void AtomInfo::Scale(const double factor)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::Scale() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].Scale(factor);
+  Vector temp(getPosition());
+  temp.Scale(factor);
+  setPosition(temp);
 }
 
 void AtomInfo::Zero()
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::Zero() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].Zero();
+  setPosition(zeroVec);
 }
 
 void AtomInfo::One(const double one)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::One() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].One(one);
+  setPosition(Vector(one,one,one));
 }
 
 void AtomInfo::LinearCombinationOfVectors(const Vector &x1, const Vector &x2, const Vector &x3, const double * const factors)
 {
-  OBSERVE;
-  NOTIFY(AtomObservable::PositionChanged);
-  ASSERT(WorldTime::getTime() < AtomicPosition.size(),
-      "AtomInfo::LinearCombinationOfVectors() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  AtomicPosition[WorldTime::getTime()].LinearCombinationOfVectors(x1,x2,x3,factors);
+  Vector newPos;
+  newPos.LinearCombinationOfVectors(x1,x2,x3,factors);
+  setPosition(newPos);
 }
 
@@ -528,33 +428,44 @@
 double AtomInfo::getKineticEnergy(const unsigned int _step) const
 {
-  ASSERT(_step < AtomicPosition.size(),
-      "AtomInfo::getKineticEnergy() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return getMass() * AtomicVelocity[_step].NormSquared();
+  return getMass() * getAtomicVelocityAtStep(_step).NormSquared();
 }
 
 Vector AtomInfo::getMomentum(const unsigned int _step) const
 {
-  ASSERT(_step < AtomicPosition.size(),
-      "AtomInfo::getMomentum() - Access out of range: "
-      +toString(WorldTime::getTime())
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  return getMass()*AtomicVelocity[_step];
-}
-
-/** Extends the trajectory STL vector to the new size.
- * Does nothing if \a MaxSteps is smaller than current size.
+  return getMass() * getAtomicVelocityAtStep(_step);
+}
+
+/** Decrease the trajectory if given \a MaxSteps is smaller.
+ * Does nothing if \a MaxSteps is larger than current size.
+ *
  * \param MaxSteps
  */
 void AtomInfo::ResizeTrajectory(size_t MaxSteps)
 {
-  for (;AtomicPosition.size() <= (unsigned int)(MaxSteps);)
-    UpdateSteps();
+  // mind the reverse ordering due to std::greater, latest time steps are at beginning
+  VectorTrajectory_t::iterator positer = AtomicPosition.lower_bound(MaxSteps);
+  if (positer != AtomicPosition.begin()) {
+    if (positer->first == MaxSteps)
+      --positer;
+    AtomicPosition.erase(AtomicPosition.begin(), positer);
+  }
+  VectorTrajectory_t::iterator veliter = AtomicVelocity.lower_bound(MaxSteps);
+  if (veliter != AtomicVelocity.begin()) {
+    if (veliter->first == MaxSteps)
+      --veliter;
+    AtomicVelocity.erase(AtomicVelocity.begin(), veliter);
+  }
+  VectorTrajectory_t::iterator forceiter = AtomicForce.lower_bound(MaxSteps);
+  if (forceiter != AtomicForce.begin()) {
+    if (forceiter->first == MaxSteps)
+      --forceiter;
+    AtomicForce.erase(AtomicForce.begin(), forceiter);
+  }
 }
 
 size_t AtomInfo::getTrajectorySize() const
 {
-  return AtomicPosition.size();
+  // mind greater comp for map here: first element is latest in time steps!
+  return AtomicPosition.begin()->first+1;
 }
 
@@ -562,4 +473,22 @@
 {
   return getType()->getMass();
+}
+
+/** Helper function to either insert or assign, depending on the element being
+ * present already.
+ *
+ * \param _trajectory vector of Vectors to assign
+ * \param dest step to insert/assign to
+ * \param _newvalue new Vector value
+ */
+void assignTrajectoryElement(
+    std::map<unsigned int, Vector, std::greater<unsigned int> > &_trajectory,
+    const unsigned int dest,
+    const Vector &_newvalue)
+{
+  std::pair<std::map<unsigned int, Vector, std::greater<unsigned int> >::iterator, bool> inserter =
+      _trajectory.insert( std::make_pair(dest, _newvalue) );
+  if (!inserter.second)
+    inserter.first->second = _newvalue;
 }
 
@@ -579,17 +508,19 @@
   }
 
-  ASSERT(dest < AtomicPosition.size(),
-      "AtomInfo::CopyStepOnStep() - destination outside of current trajectory array: "
-      +toString(dest)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  ASSERT(src < AtomicPosition.size(),
-      "AtomInfo::CopyStepOnStep() - source outside of current trajectory array: "
-      +toString(src)
-      +" not in [0,"+toString(AtomicPosition.size())+").");
-  for (int n=NDIM;n--;) {
-    AtomicPosition.at(dest)[n] = AtomicPosition.at(src)[n];
-    AtomicVelocity.at(dest)[n] = AtomicVelocity.at(src)[n];
-    AtomicForce.at(dest)[n] = AtomicForce.at(src)[n];
-  }
+  VectorTrajectory_t::iterator positer = AtomicPosition.find(src);
+  ASSERT( positer != AtomicPosition.end(),
+      "AtomInfo::CopyStepOnStep() - step "
+      +toString(src)+" to copy from not present in AtomicPosition.");
+  VectorTrajectory_t::iterator veliter = AtomicVelocity.find(src);
+  ASSERT( veliter != AtomicVelocity.end(),
+      "AtomInfo::CopyStepOnStep() - step "
+      +toString(src)+" to copy from not present in AtomicVelocity.");
+  VectorTrajectory_t::iterator forceiter = AtomicForce.find(src);
+  ASSERT( forceiter != AtomicForce.end(),
+      "AtomInfo::CopyStepOnStep() - step "
+      +toString(src)+" to copy from not present in AtomicForce.");
+  assignTrajectoryElement(AtomicPosition, dest, positer->second);
+  assignTrajectoryElement(AtomicVelocity, dest, veliter->second);
+  assignTrajectoryElement(AtomicForce, dest, forceiter->second);
 };
 
@@ -656,24 +587,4 @@
 };
 
-//const AtomInfo& operator*=(AtomInfo& a, const double m)
-//{
-//  a.Scale(m);
-//  return a;
-//}
-//
-//AtomInfo const operator*(const AtomInfo& a, const double m)
-//{
-//  AtomInfo copy(a);
-//  copy *= m;
-//  return copy;
-//}
-//
-//AtomInfo const operator*(const double m, const AtomInfo& a)
-//{
-//  AtomInfo copy(a);
-//  copy *= m;
-//  return copy;
-//}
-
 std::ostream & AtomInfo::operator << (std::ostream &ost) const
 {
Index: src/Atom/atom_atominfo.hpp
===================================================================
--- src/Atom/atom_atominfo.hpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom_atominfo.hpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -56,5 +56,5 @@
    * real functions, \sa AppendTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void UpdateSteps()=0;
+  virtual void UpdateStep(const unsigned int _step)=0;
 
   /** Pops the last step in all trajectory vectors.
@@ -64,5 +64,5 @@
    * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void removeSteps()=0;
+  virtual void removeStep(const unsigned int _step)=0;
 
   /** DEPRECATED: Getter for element indicated by AtomicElement.
@@ -276,4 +276,5 @@
 
   // operations for trajectories
+  bool isStepPresent(const unsigned int _step) const;
   void ResizeTrajectory(size_t MaxSteps);
   size_t getTrajectorySize() const;
@@ -297,16 +298,19 @@
    * vectors.
    */
-  void AppendTrajectoryStep();
+  void AppendTrajectoryStep(const unsigned int _step);
 
   /** Function used by this and inheriting classes to decrease the trajectory
    * vectors by one.
    */
-  void removeTrajectoryStep();
+  void removeTrajectoryStep(const unsigned int _step);
 
   // make these protected only such that deriving atom class still has full
   // access needed for clone and alike
-  std::vector<Vector> AtomicPosition;       //!< coordinate vector of atom, giving last position within cell
-  std::vector<Vector> AtomicVelocity;       //!< velocity vector of atom, giving last velocity within cell
-  std::vector<Vector> AtomicForce;       //!< Force vector of atom, giving last force within cell
+
+  //!> typedef for a vector of Vectors with inverse sorting to make lower_bound return present or last past step
+  typedef std::map<unsigned int, Vector, std::greater<unsigned int> > VectorTrajectory_t;
+  VectorTrajectory_t AtomicPosition;       //!< coordinate vector of atom, giving last position within cell
+  VectorTrajectory_t AtomicVelocity;       //!< velocity vector of atom, giving last velocity within cell
+  VectorTrajectory_t AtomicForce;       //!< Force vector of atom, giving last force within cell
 
 private:
Index: src/Atom/atom_bondedparticle.cpp
===================================================================
--- src/Atom/atom_bondedparticle.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom_bondedparticle.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -52,5 +52,5 @@
 BondedParticle::BondedParticle()
 {
-  ListOfBonds.push_back(BondList());
+  ListOfBonds.insert( std::make_pair(0, emptyList) );
 };
 
@@ -59,5 +59,9 @@
 BondedParticle::~BondedParticle()
 {
-  removeAllBonds();
+  for(BondTrajectory_t::iterator iter = ListOfBonds.begin(); !ListOfBonds.empty();
+      iter = ListOfBonds.begin()) {
+    removeAllBonds(iter->first);
+    ListOfBonds.erase(iter);
+  }
 };
 
@@ -220,11 +224,10 @@
 }
 
-/** Removes all bonds in all timesteps and their instances, too.
+/** Removes all bonds in current timestep and their instances, too.
  *
  */
 void BondedParticle::removeAllBonds()
 {
-  for (size_t index = 0; index < ListOfBonds.size(); ++index)
-    removeAllBonds(index);
+  removeAllBonds(WorldTime::getTime());
 }
 
@@ -236,15 +239,17 @@
 {
   //LOG(3,"INFO: Clearing all bonds of " << *this << ": " << ListOfBonds[_step]);
-  for (BondList::iterator iter = (ListOfBonds[_step]).begin();
-      !(ListOfBonds[_step]).empty();
-      iter = (ListOfBonds[_step]).begin()) {
-    //LOG(3,"INFO: Clearing bond (" << *iter << ") " << *(*iter) << " of list " << &ListOfBonds);
-    atom * const Other = (*iter)->GetOtherAtom(this);
-    ASSERT( Other != NULL,
-        "BondedParticle::removeAllBonds() - cannot find bond partner for "
-        +toString(**iter)+".");
-    Other->UnregisterBond(_step, *iter);
-    UnregisterBond(_step, *iter);
-  }
+  BondTrajectory_t::iterator listiter = ListOfBonds.find(_step);
+  if (listiter != ListOfBonds.end())
+    for (BondList::iterator iter = listiter->second.begin();
+        !listiter->second.empty();
+        iter = listiter->second.begin()) {
+      //LOG(3,"INFO: Clearing bond (" << *iter << ") " << *(*iter) << " of list " << &ListOfBonds);
+      atom * const Other = (*iter)->GetOtherAtom(this);
+      ASSERT( Other != NULL,
+          "BondedParticle::removeAllBonds() - cannot find bond partner for "
+          +toString(**iter)+".");
+      Other->UnregisterBond(_step, *iter);
+      UnregisterBond(_step, *iter);
+    }
 }
 
@@ -260,7 +265,8 @@
     if (Binder->Contains(this)) {
       //LOG(3,"INFO: Registering bond "<< *Binder << " with atom " << *this << " at step " << _step);
-      if (ListOfBonds.size() <= _step)
-        ListOfBonds.resize(_step+1);
-      ListOfBonds[_step].push_back(Binder);
+      std::pair< BondTrajectory_t::iterator, bool> inserter =
+          ListOfBonds.insert( std::make_pair( _step, BondList(1, Binder)) );
+      if (!inserter.second)
+        inserter.first->second.push_back(Binder);
       if (WorldTime::getTime() == _step)
         NOTIFY(AtomObservable::BondsAdded);
@@ -290,16 +296,19 @@
       OBSERVE;
       //LOG(0,"INFO: Unregistering bond "<< *Binder << " from list " << &ListOfBonds << " of atom " << *this << " at step " << step);
+      BondTrajectory_t::iterator listiter = ListOfBonds.find(_step);
+      if (listiter != ListOfBonds.end()) {
 #ifndef NDEBUG
-      BondList::const_iterator iter =
-          std::find(ListOfBonds[_step].begin(), ListOfBonds[_step].end(), Binder);
-      ASSERT( iter != ListOfBonds[_step].end(),
-          "BondedParticle::UnregisterBond() - "+toString(*Binder)+" not contained at "
-          +toString(_step));
+        BondList::const_iterator iter =
+            std::find(listiter->second.begin(), listiter->second.end(), Binder);
+        ASSERT( iter != listiter->second.end(),
+            "BondedParticle::UnregisterBond() - "+toString(*Binder)+" not contained at "
+            +toString(_step));
 #endif
-      Binder->removeAtom(this);
-      ListOfBonds[_step].remove(Binder);
-      if (WorldTime::getTime() == _step)
-        NOTIFY(AtomObservable::BondsRemoved);
-      status = true;
+        Binder->removeAtom(this);
+        listiter->second.remove(Binder);
+        if (WorldTime::getTime() == _step)
+          NOTIFY(AtomObservable::BondsRemoved);
+        status = true;
+      }
     } else {
       ELOG(1, *Binder << " does not contain " << *this << ".");
@@ -328,13 +337,12 @@
 {
   int step = -1;
-  int tempstep = 0;
-  for(std::vector<BondList>::const_iterator iter = ListOfBonds.begin();
-      iter != ListOfBonds.end();
-      ++iter,++tempstep) {
-    for (BondList::const_iterator bonditer = iter->begin();
-        bonditer != iter->end();
+  for(BondTrajectory_t::const_iterator listiter = ListOfBonds.begin();
+      listiter != ListOfBonds.end();
+      ++listiter) {
+    for (BondList::const_iterator bonditer = listiter->second.begin();
+        bonditer != listiter->second.end();
         ++bonditer) {
       if ((*bonditer) == Binder) {
-        step = tempstep;
+        step = listiter->first;
         break;
       }
Index: src/Atom/atom_bondedparticleinfo.cpp
===================================================================
--- src/Atom/atom_bondedparticleinfo.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom_bondedparticleinfo.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -57,13 +57,13 @@
 {}
 
-void BondedParticleInfo::AppendTrajectoryStep()
+void BondedParticleInfo::AppendTrajectoryStep(const unsigned int _step)
 {
-  ListOfBonds.push_back(BondList());
+  ListOfBonds.insert( std::make_pair(_step, emptyList) );
   LOG(5,"BondedParticleInfo::AppendTrajectoryStep() called, size is " << ListOfBonds.size());
 }
 
-void BondedParticleInfo::removeTrajectoryStep()
+void BondedParticleInfo::removeTrajectoryStep(const unsigned int _step)
 {
-  ListOfBonds.pop_back();
+  ListOfBonds.erase(_step);
   LOG(5,"BondedParticleInfo::removeTrajectoryStep() called, size is " << ListOfBonds.size());
 }
@@ -71,45 +71,13 @@
 const BondList& BondedParticleInfo::getListOfBonds() const
 {
-  if(WorldTime::getTime() < ListOfBonds.size())
-    return ListOfBonds[WorldTime::getTime()];
-  else
-    return emptyList;
+  return getListOfBondsAtStep(WorldTime::getTime());
 }
-
-//BondList& BondedParticleInfo::getListOfBonds()
-//{
-//  // todo: here we actually need a container on whose destruction notifiy is emitted, i.e.
-//  // similar or simply an ObservedContainer.
-//  OBSERVE;
-//  NOTIFY(AtomObservable::BondsAdded);
-//  const unsigned int size = ListOfBonds.size();
-//  ASSERT(WorldTime::getTime() <= size,
-//      "BondedParticleInfo::getBondsAtStep() - Access out of range: "
-//      +toString(WorldTime::getTime())
-//      +" not in [0,"+toString(size)+"].");
-//  if (WorldTime::getTime() == size) {
-//    UpdateSteps();
-//  }
-//  return ListOfBonds[WorldTime::getTime()];
-//}
 
 const BondList& BondedParticleInfo::getListOfBondsAtStep(unsigned int _step) const
 {
-  if(_step < ListOfBonds.size())
-    return ListOfBonds[_step];
-  else
-    return emptyList;
+  BondTrajectory_t::const_iterator iter =
+    ListOfBonds.find(_step);
+  if (iter != ListOfBonds.end())
+    return iter->second;
+  return emptyList;
 }
-
-//BondList& BondedParticleInfo::getListOfBondsAtStep(unsigned int _step)
-//{
-//  const unsigned int size = ListOfBonds.size();
-//  ASSERT(_step <= size,
-//      "BondedParticleInfo::getBondsAtStep() - Access out of range: "
-//      +toString(_step)
-//      +" not in [0,"+toString(size)+"].");
-//  if (_step == size) {
-//    UpdateSteps();
-//  }
-//  return ListOfBonds[_step];
-//}
Index: src/Atom/atom_bondedparticleinfo.hpp
===================================================================
--- src/Atom/atom_bondedparticleinfo.hpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/atom_bondedparticleinfo.hpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -49,5 +49,13 @@
    * real functions, \sa AppendTrajectoryStep(), by all necessary subclasses.
    */
-  virtual void UpdateSteps()=0;
+  virtual void UpdateStep(const unsigned int _step)=0;
+
+  /** Pops the last step in all trajectory vectors.
+   *
+   * This allows to decrease all trajectories contained in different classes
+   * by one consistently. This is implemented by the topmost class which calls
+   * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses.
+   */
+  virtual void removeStep(const unsigned int _step)=0;
 
   /** Const accessor to ListOfBonds of WorldTime::CurrentTime.
@@ -87,12 +95,13 @@
    * vector.
    */
-  void AppendTrajectoryStep();
+  void AppendTrajectoryStep(const unsigned int _step);
 
   /** Function used by this and inheriting classes to reduce the ListOfBonds
    * vector by one.
    */
-  void removeTrajectoryStep();
+  void removeTrajectoryStep(const unsigned int _step);
 
-  std::vector<BondList> ListOfBonds; //!< list of all bonds
+  typedef std::map<unsigned int, BondList> BondTrajectory_t;
+  BondTrajectory_t ListOfBonds; //!< list of all bonds
   static BondList emptyList;  //!< empty list to return when step is not present
 };
Index: src/Atom/unittests/AtomObserverUnitTest.cpp
===================================================================
--- src/Atom/unittests/AtomObserverUnitTest.cpp	(revision 7a7b3408459dae333637248d2b3e0bebed301975)
+++ src/Atom/unittests/AtomObserverUnitTest.cpp	(revision 8cc22fe4af9577450a3d00a92ea000018b14b366)
@@ -130,5 +130,6 @@
 void AtomObserverTest::AtomElementTest()
 {
-  atoms[0]->setType(1);
+  CPPUNIT_ASSERT( atoms[0]->getType()->getAtomicNumber() != 2 );
+  atoms[0]->setType(2);
 
   // check for update
