Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision 16bd376fd9b011d5e40fc688f849c8418b4ad1f9)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision 026bef57c11cf9d09d87056dab378f0b357f2a4c)
@@ -78,5 +78,8 @@
 GLMoleculeObject_atom::AtomBondsChannels(getAtomBondsChannels());
 
-GLMoleculeObject_atom::GLMoleculeObject_atom(QGLSceneNode *mesh[], QObject *parent, const atomId_t _id) :
+GLMoleculeObject_atom::GLMoleculeObject_atom(
+    QGLSceneNode *mesh[],
+    QObject *parent,
+    const atomId_t _id) :
   GLMoleculeObject(mesh, parent),
   Observer(std::string("GLMoleculeObject_atom")+toString(_id)),
@@ -86,8 +89,28 @@
   owner(NULL)
 {
-  boost::function<void()> subjectKilled =
-      boost::bind(&GLMoleculeObject_atom::countsubjectKilled, this);
+  boost::function<void(const atomId_t)> subjectKilled =
+      boost::bind(&GLMoleculeObject_atom::countsubjectKilled, this, _id);
   initObservedValues(ObservedValues, _id, atomref, subjectKilled);
 
+  init(_id);
+}
+
+GLMoleculeObject_atom::GLMoleculeObject_atom(
+    QGLSceneNode *mesh[],
+    QObject *parent,
+    const atomId_t _id,
+    std::vector<boost::any> _ObservedValues) :
+  GLMoleculeObject(mesh, parent),
+  Observer(std::string("GLMoleculeObject_atom")+toString(_id)),
+  atomref(getAtom(_id)),
+  ObservedValues(_ObservedValues),
+  subjectKilledCount(0),
+  owner(NULL)
+{
+  init(_id);
+}
+
+void GLMoleculeObject_atom::init(const atomId_t _id)
+{
   setObjectId(_id);
   resetPosition();
@@ -317,5 +340,5 @@
   deactivateObserver();
 
-  countsubjectKilled();
+  countsubjectKilled(getAtomIndex());
 }
 
@@ -348,5 +371,5 @@
 }
 
-void GLMoleculeObject_atom::countsubjectKilled()
+void GLMoleculeObject_atom::countsubjectKilled(const atomId_t)
 {
   ++subjectKilledCount;
@@ -360,5 +383,5 @@
     const atomId_t _id,
     const atom * const _atomref,
-    const boost::function<void()> &_subjectKilled)
+    const boost::function<void(const atomId_t)> &_subjectKilled)
 {
   /* This is an old note from when the code was still part of cstor's initializer body.
@@ -399,5 +422,5 @@
       boost::bind(&GLMoleculeObject_atom::updateBonds, AtomIndexGetter));
 
-  _ObservedValues[AtomPosition] = new ObservedValue_wCallback<Vector>(
+  _ObservedValues[AtomPosition] = new ObservedValue_wCallback<Vector, atomId_t>(
       _atomref,
       AtomPositionUpdater,
@@ -405,6 +428,7 @@
       AtomPositionUpdater(),
       AtomPositionChannels,
-      _subjectKilled);
-  _ObservedValues[AtomElement] = new ObservedValue_wCallback<atomicNumber_t>(
+      _subjectKilled,
+      AtomIndexGetter);
+  _ObservedValues[AtomElement] = new ObservedValue_wCallback<atomicNumber_t, atomId_t>(
       _atomref,
       AtomElementUpdater,
@@ -412,6 +436,7 @@
       AtomElementUpdater(),
       AtomElementChannels,
-      _subjectKilled);
-  _ObservedValues[AtomBonds] = new ObservedValue_wCallback<ListOfBonds_t>(
+      _subjectKilled,
+      AtomIndexGetter);
+  _ObservedValues[AtomBonds] = new ObservedValue_wCallback<ListOfBonds_t, atomId_t>(
       _atomref,
       AtomBondsUpdater,
@@ -419,5 +444,6 @@
       AtomBondsUpdater(),
       AtomBondsChannels,
-      _subjectKilled);
+      _subjectKilled,
+      AtomIndexGetter);
 }
 
@@ -426,7 +452,7 @@
 {
   delete boost::any_cast<ObservedValue_wCallback<atomId_t> *>(_ObservedValues[AtomIndex]);
-  delete boost::any_cast<ObservedValue_wCallback<Vector> *>(_ObservedValues[AtomPosition]);
-  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(_ObservedValues[AtomElement]);
-  delete boost::any_cast<ObservedValue_wCallback<ListOfBonds_t> *>(_ObservedValues[AtomBonds]);
+  delete boost::any_cast<ObservedValue_wCallback<Vector, atomId_t> *>(_ObservedValues[AtomPosition]);
+  delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t, atomId_t> *>(_ObservedValues[AtomElement]);
+  delete boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, atomId_t> *>(_ObservedValues[AtomBonds]);
   _ObservedValues.clear();
 }
@@ -439,14 +465,14 @@
 Vector GLMoleculeObject_atom::getAtomPosition() const
 {
-  return boost::any_cast<ObservedValue_wCallback<Vector> *>(ObservedValues[AtomPosition])->get();
+  return boost::any_cast<ObservedValue_wCallback<Vector, atomId_t> *>(ObservedValues[AtomPosition])->get();
 }
 
 atomicNumber_t GLMoleculeObject_atom::getAtomElement() const
 {
-  return boost::any_cast<ObservedValue_wCallback<atomicNumber_t> *>(ObservedValues[AtomElement])->get();
+  return boost::any_cast<ObservedValue_wCallback<atomicNumber_t, atomId_t> *>(ObservedValues[AtomElement])->get();
 }
 
 GLMoleculeObject_atom::ListOfBonds_t GLMoleculeObject_atom::getAtomBonds() const
 {
-  return boost::any_cast<ObservedValue_wCallback<ListOfBonds_t> *>(ObservedValues[AtomBonds])->get();
-}
+  return boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, atomId_t> *>(ObservedValues[AtomBonds])->get();
+}
