Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Makefile.am	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -205,5 +205,6 @@
  	UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp \
  	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp \
- 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp
+ 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp \
+ 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
 #  UIElements/Views/Qt4/dialoglight.cpp
              
@@ -237,5 +238,6 @@
 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp \
  	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.hpp \
- 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp
+ 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp \
+ 	UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
 
 QTUIUI_UIFILES = \
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -78,5 +78,4 @@
 GLMoleculeObject::~GLMoleculeObject()
 {
-   delete m_mesh;
 }
 
@@ -234,2 +233,11 @@
   }
 }
+
+
+void GLMoleculeObject::setSelected(bool value)
+{
+  if (value != m_selected){
+    m_selected = value;
+    emit selectionChanged();
+  }
+}
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -73,5 +73,5 @@
 
    bool selected() const { return m_selected; }
-   void setSelected(bool value) { m_selected = value; }
+   void setSelected(bool value);
 
    void initialize(QGLView *view, QGLPainter *painter);
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -195,5 +195,4 @@
       case World::SelectionChanged:
         setSelected(World::getInstance().isSelected(_atom));
-        emit selectionChanged();
         break;
       default:
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -0,0 +1,114 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * GLMoleculeObject_molecule.cpp
+ *
+ *  Created on: Mar 30, 2012
+ *      Author: ankele
+ */
+
+
+
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "GLMoleculeObject_molecule.hpp"
+
+#include <Qt3D/qglbuilder.h>
+#include <Qt3D/qglscenenode.h>
+#include <Qt3D/qglsphere.h>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Assert.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Observer/Notification.hpp"
+
+#include "Atom/atom.hpp"
+#include "molecule.hpp"
+#include "Descriptors/AtomIdDescriptor.hpp"
+#include "Element/element.hpp"
+#include "LinearAlgebra/Vector.hpp"
+#include "World.hpp"
+
+static QGLSceneNode * createMolecule(QObject *parent)
+{
+  // create an empty mesh...
+  QGLBuilder builder;
+  QGLSceneNode *n = builder.finalizedSceneNode();
+  n->setParent(parent);
+  return n;
+}
+
+GLMoleculeObject_molecule::GLMoleculeObject_molecule(QObject *parent, const molecule *molref) :
+  GLMoleculeObject(createMolecule(parent), parent),
+  Observer(std::string("GLMoleculeObject_molecule")+toString(molref->getId())),
+  _molecule(molref)
+{
+  // sign on as observer (obtain non-const instance before)
+  /*molref->signOn(this, AtomObservable::IndexChanged);
+  molref->signOn(this, AtomObservable::PositionChanged);
+  molref->signOn(this, AtomObservable::ElementChanged);
+  molref->signOn(this, AtomObservable::BondsAdded);*/
+  World::getInstance().signOn(this, World::SelectionChanged);
+  setPosition(QVector3D(0,0,0));
+  setScale(5.0f);
+  QGLMaterial *selectionmaterial = getMaterial(65536); // 65536 is the selection material
+  setMaterial(selectionmaterial);
+  setSelectionMaterial(selectionmaterial);
+}
+
+GLMoleculeObject_molecule::~GLMoleculeObject_molecule()
+{
+  /*_atom->signOff(this, AtomObservable::IndexChanged);
+  _atom->signOff(this, AtomObservable::PositionChanged);
+  _atom->signOff(this, AtomObservable::ElementChanged);
+  _atom->signOff(this, AtomObservable::BondsAdded);*/
+  World::getInstance().signOff(this, World::SelectionChanged);
+}
+
+void GLMoleculeObject_molecule::update(Observable *publisher)
+{
+#ifdef LOG_OBSERVER
+  observerLog().addMessage() << "++ Update of Observer " << observerLog().getName(this) << " from atom "+toString(_atom->getId())+".";
+#endif
+}
+
+void GLMoleculeObject_molecule::subjectKilled(Observable *publisher)
+{}
+
+void GLMoleculeObject_molecule::recieveNotification(Observable *publisher, Notification_ptr notification)
+{
+  if (publisher == dynamic_cast<const Observable*>(_molecule)){
+    // notofication from atom
+#ifdef LOG_OBSERVER
+    observerLog().addMessage() << "++ Update of Observer "<< observerLog().getName(this)
+          << " received notification from molecule " << _molecule->getId() << " for channel "
+          << notification->getChannelNo() << ".";
+#endif
+  }else{
+    // notification from world
+#ifdef LOG_OBSERVER
+    observerLog().addMessage() << "++ Update of Observer "<< observerLog().getName(this)
+          << " received notification from world for channel "
+          << notification->getChannelNo() << ".";
+#endif
+    switch (notification->getChannelNo()) {
+      case World::SelectionChanged:
+        setSelected(World::getInstance().isSelected(_molecule));
+        break;
+      default:
+        break;
+    }
+  }
+}
+
Index: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
+++ src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -0,0 +1,45 @@
+/*
+ * GLMoleculeObject_molecule.hpp
+ *
+ *  Created on: Mar 30, 2012
+ *      Author: ankele
+ */
+
+#ifndef GLMOLECULEOBJECT_MOLECULE_HPP_
+#define GLMOLECULEOBJECT_MOLECULE_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "GLMoleculeObject.hpp"
+
+#include "CodePatterns/Observer/Observer.hpp"
+
+#include "GLMoleculeObject_bond.hpp"
+
+class atom;
+class bond;
+class molecule;
+
+class GLMoleculeObject_molecule : public GLMoleculeObject, public Observer
+{
+  Q_OBJECT
+public:
+  GLMoleculeObject_molecule(QObject *parent, const molecule *molref);
+  virtual ~GLMoleculeObject_molecule();
+
+  // Observer functions
+  void update(Observable *publisher);
+  void subjectKilled(Observable *publisher);
+  void recieveNotification(Observable *publisher, Notification_ptr notification);
+
+private:
+
+  const molecule *_molecule;
+};
+
+
+
+#endif /* GLMOLECULEOBJECT_MOLECULE_HPP_ */
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -25,4 +25,5 @@
 #include "GLMoleculeObject_atom.hpp"
 #include "GLMoleculeObject_bond.hpp"
+#include "GLMoleculeObject_molecule.hpp"
 
 #include "CodePatterns/MemDebug.hpp"
@@ -74,5 +75,8 @@
         Runner != molecules.end();
         Runner++) {
+
       // create molecule
+      moleculeInserted(*Runner);
+
       for (molecule::const_iterator atomiter = (*Runner)->begin();
           atomiter != (*Runner)->end();
@@ -133,4 +137,39 @@
   AtomsinSceneMap.erase(iter);
   delete atomObject;
+  emit changeOccured();
+}
+
+/** Adds a molecule to the scene.
+ *
+ * @param _molecule molecule to add
+ */
+void GLWorldScene::moleculeInserted(const molecule*_molecule)
+{
+  LOG(3, "INFO: GLWorldScene: Received signal moleculeInserted for atom "+toString(_molecule->getId())+".");
+  GLMoleculeObject_molecule *molObject = new GLMoleculeObject_molecule(this, _molecule);
+  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_molecule->getId());
+  ASSERT(iter == MoleculesinSceneMap.end(),
+      "GLWorldScene::moleculeInserted() - same molecule "+_molecule->getName()+" added again.");
+  MoleculesinSceneMap.insert( make_pair(_molecule->getId(), molObject) );
+  connect (molObject, SIGNAL(changed()), this, SIGNAL(changed()));
+  connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
+  connect (molObject, SIGNAL(selectionChanged()), this, SIGNAL(changed()));
+  emit changeOccured();
+}
+
+/** Removes a molecule from the scene.
+ *
+ * @param _molecule molecule to remove
+ */
+void GLWorldScene::moleculeRemoved(const molecule *_molecule)
+{
+  LOG(3, "INFO: GLWorldScene: Received signal moleculeRemoved for atom "+toString(_molecule->getId())+".");
+  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_molecule->getId());
+  ASSERT(iter != MoleculesinSceneMap.end(),
+      "GLWorldScene::moleculeRemoved() - molecule "+_molecule->getName()+" not on display.");
+  GLMoleculeObject_molecule *molObject = iter->second;
+  molObject->disconnect();
+  MoleculesinSceneMap.erase(iter);
+  delete molObject;
   emit changeOccured();
 }
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -23,6 +23,8 @@
 
 #include "GLMoleculeObject_bond.hpp"
+#include "GLMoleculeObject_molecule.hpp"
 
 class atom;
+class molecule;
 
 class QGLPainter;
@@ -32,4 +34,5 @@
 class GLMoleculeObject;
 class GLMoleculeObject_atom;
+class GLMoleculeObject_molecule;
 
 /** This class contains a list of all molecules in the world.
@@ -49,4 +52,5 @@
   void changeMaterials(bool perPixel);
   QGLSceneNode* getAtom(size_t);
+  QGLSceneNode* getMolecule(size_t);
   QGLSceneNode* getBond(size_t, size_t);
 
@@ -68,4 +72,6 @@
   void atomInserted(const atom *_atom);
   void atomRemoved(const atom *_atom);
+  void moleculeInserted(const molecule *_molecule);
+  void moleculeRemoved(const molecule *_molecule);
   void bondInserted(const bond *_bond, const GLMoleculeObject_bond::SideOfBond side);
   void bondRemoved(const atomId_t leftnr, const atomId_t rightnr);
@@ -80,6 +86,8 @@
   typedef std::map< atomId_t, GLMoleculeObject_atom* > AtomNodeMap;
   typedef std::map< BondIds , GLMoleculeObject_bond* > BondNodeMap;
+  typedef std::map< moleculeId_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
   AtomNodeMap AtomsinSceneMap;
   BondNodeMap BondsinSceneMap;
+  MoleculeNodeMap MoleculesinSceneMap;
 };
 
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -42,4 +42,6 @@
   connect(this, SIGNAL(atomInserted(const atom *)), worldscene, SLOT(atomInserted(const atom *)));
   connect(this, SIGNAL(atomRemoved(const atom *)), worldscene, SLOT(atomRemoved(const atom *)));
+  connect(this, SIGNAL(moleculeInserted(const molecule *)), worldscene, SLOT(moleculeInserted(const molecule *)));
+  connect(this, SIGNAL(moleculeRemoved(const molecule *)), worldscene, SLOT(moleculeRemoved(const molecule *)));
   connect(this, SIGNAL(changed()), this, SLOT(updateGL()));
 
@@ -49,4 +51,6 @@
   World::getInstance().signOn(this, World::AtomRemoved);
   World::getInstance().signOn(this, World::AtomPositionChanged);
+  World::getInstance().signOn(this, World::MoleculeInserted);
+  World::getInstance().signOn(this, World::MoleculeRemoved);
 }
 
@@ -57,4 +61,6 @@
   World::getInstance().signOff(this, World::AtomRemoved);
   World::getInstance().signOff(this, World::AtomPositionChanged);
+  World::getInstance().signOff(this, World::MoleculeInserted);
+  World::getInstance().signOff(this, World::MoleculeRemoved);
   delete worldscene;
 }
@@ -107,4 +113,22 @@
 #endif
       emit changed();
+      break;
+    }
+    case World::MoleculeInserted:
+    {
+      const molecule *_molecule = World::getInstance().lastChanged<molecule>();
+#ifdef LOG_OBSERVER
+      observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that molecule "+toString(_molecule->getId())+" has been inserted.";
+#endif
+      emit moleculeInserted(_molecule);
+      break;
+    }
+    case World::MoleculeRemoved:
+    {
+      const molecule *_molecule = World::getInstance().lastChanged<molecule>();
+#ifdef LOG_OBSERVER
+      observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that molecule "+toString(_molecule->getId())+" has been removed.";
+#endif
+      emit moleculeRemoved(_molecule);
       break;
     }
Index: src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
===================================================================
--- src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp	(revision 42c6a471ef0ffc7ff153901aa28b1d9be1a5076a)
+++ src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp	(revision c6751895e249ac3b8b055b048e09886c9e6b6faf)
@@ -47,4 +47,6 @@
   void atomInserted(const atom *_atom);
   void atomRemoved(const atom *_atom);
+  void moleculeInserted(const molecule *_molecule);
+  void moleculeRemoved(const molecule *_molecule);
 
 protected:
