Index: src/Descriptors/MoleculeIdDescriptor.cpp
===================================================================
--- src/Descriptors/MoleculeIdDescriptor.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/Descriptors/MoleculeIdDescriptor.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,40 @@
+/*
+ * MoleculeIdDescriptor.cpp
+ *
+ *  Created on: Feb 5, 2010
+ *      Author: crueger
+ */
+
+#include "MoleculeIdDescriptor.hpp"
+#include "MoleculeIdDescriptor_impl.hpp"
+
+#include "molecule.hpp"
+
+using namespace std;
+
+
+MoleculeIdDescriptor_impl::MoleculeIdDescriptor_impl(moleculeId_t _id) :
+  id(_id)
+{}
+
+MoleculeIdDescriptor_impl::~MoleculeIdDescriptor_impl()
+{}
+
+bool MoleculeIdDescriptor_impl::predicate(std::pair<moleculeId_t,molecule*> molecule) {
+  return molecule.first==id;
+}
+
+MoleculeDescriptor MoleculeById(moleculeId_t id){
+  return MoleculeDescriptor(MoleculeDescriptor::impl_ptr(new MoleculeIdDescriptor_impl(id)));
+}
+
+molecule *MoleculeIdDescriptor_impl::find(){
+  World::MoleculeSet molecules = getMolecules();
+  World::MoleculeSet::iterator res = molecules.find(id);
+  return (res!=molecules.end())?((*res).second):0;
+}
+
+vector<molecule*> MoleculeIdDescriptor_impl::findAll(){
+  molecule *res = find();
+  return (res)?(vector<molecule*>(1,res)):(vector<molecule*>());
+}
Index: src/Descriptors/MoleculeIdDescriptor.hpp
===================================================================
--- src/Descriptors/MoleculeIdDescriptor.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/Descriptors/MoleculeIdDescriptor.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,16 @@
+/*
+ * MoleculeIdDescriptor.hpp
+ *
+ *  Created on: Feb 5, 2010
+ *      Author: crueger
+ */
+
+#ifndef MOLECULEIDDESCRIPTOR_HPP_
+#define MOLECULEIDDESCRIPTOR_HPP_
+
+#include "defs.hpp"
+#include "Descriptors/MoleculeDescriptor.hpp"
+
+MoleculeDescriptor MoleculeById(moleculeId_t id);
+
+#endif /* MOLECULEIDDESCRIPTOR_HPP_ */
Index: src/Descriptors/MoleculeIdDescriptor_impl.hpp
===================================================================
--- src/Descriptors/MoleculeIdDescriptor_impl.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/Descriptors/MoleculeIdDescriptor_impl.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,21 @@
+#ifndef MOLECULEIDDESCRIPTOR_IMPL_HPP
+#define MOLECULEIDDESCRIPTOR_IMPL_HPP
+
+#include "Descriptors/MoleculeDescriptor_impl.hpp"
+
+class MoleculeIdDescriptor_impl : public MoleculeDescriptor_impl
+{
+public:
+  MoleculeIdDescriptor_impl(moleculeId_t _id);
+  virtual ~MoleculeIdDescriptor_impl();
+
+  bool predicate(std::pair<moleculeId_t,molecule*> molecule);
+
+protected:
+  virtual molecule *find();
+  virtual std::vector<molecule*> findAll();
+private:
+  moleculeId_t id;
+};
+
+#endif //MOLECULEIDDESCRIPTOR_IMPL_HPP
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/Makefile.am	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -32,6 +32,15 @@
 LEGACYHEADER = Legacy/oldmenu.hpp
 
-DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp Descriptors/AtomIdDescriptor.cpp Descriptors/AtomTypeDescriptor.cpp Descriptors/MoleculeDescriptor.cpp
-DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp Descriptors/AtomIdDescriptor.hpp Descriptors/AtomTypeDescriptor.hpp Descriptors/MoleculeDescriptor.hpp
+DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp \
+				   Descriptors/AtomIdDescriptor.cpp \
+				   Descriptors/AtomTypeDescriptor.cpp \
+				   Descriptors/MoleculeDescriptor.cpp \
+				   Descriptors/MoleculeIdDescriptor.cpp
+				   
+DESCRIPTORHEADER = Descriptors/AtomDescriptor.hpp \
+				   Descriptors/AtomIdDescriptor.hpp \
+				   Descriptors/AtomTypeDescriptor.hpp \
+				   Descriptors/MoleculeDescriptor.hpp \
+				   Descriptors/MoleculeIdDescriptor.hpp
 
 SOURCE = ${ANALYSISSOURCE} ${ATOMSOURCE} ${PARSERSOURCE} ${PATTERNSOURCE} ${UISOURCE} ${DESCRIPTORSOURCE} ${LEGACYSOURCE} bond.cpp bondgraph.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp errorlogger.cpp graph.cpp helpers.cpp info.cpp leastsquaremin.cpp linkedcell.cpp lists.cpp log.cpp logger.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp World.cpp WorldIterators.cpp
Index: src/Parser/TremoloParser.hpp
===================================================================
--- src/Parser/TremoloParser.hpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/Parser/TremoloParser.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -18,5 +18,5 @@
 
 private:
-  map<string, string> moreData;
+  map<std::string, std::string> moreData;
 };
 
Index: src/World.cpp
===================================================================
--- src/World.cpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/World.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -159,4 +159,6 @@
 /******************************* IDManagement *****************************/
 
+// Atoms
+
 atomId_t World::getNextAtomId(){
   // see if we can reuse some Id
@@ -199,4 +201,7 @@
   }
 }
+
+// Molecules
+
 /******************************* Iterators ********************************/
 
Index: src/World.hpp
===================================================================
--- src/World.hpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/World.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -151,6 +151,20 @@
   // Atoms
 
-  class AtomIterator {
+  class AtomIterator :
+    public std::iterator<std::iterator_traits<AtomSet::iterator>::difference_type,
+                         std::iterator_traits<AtomSet::iterator>::value_type,
+                         std::iterator_traits<AtomSet::iterator>::pointer,
+                         std::iterator_traits<AtomSet::iterator>::reference>
+  {
   public:
+
+    typedef AtomSet::iterator _Iter;
+    typedef _Iter::value_type value_type;
+    typedef _Iter::difference_type difference_type;
+    typedef _Iter::pointer pointer;
+    typedef _Iter::reference reference;
+    typedef _Iter::iterator_category iterator_category;
+
+
     AtomIterator();
     AtomIterator(AtomDescriptor, World*);
@@ -191,6 +205,19 @@
   // Molecules
 
-  class MoleculeIterator {
+  class MoleculeIterator :
+    public std::iterator<std::iterator_traits<MoleculeSet::iterator>::difference_type,
+                         std::iterator_traits<MoleculeSet::iterator>::value_type,
+                         std::iterator_traits<MoleculeSet::iterator>::pointer,
+                         std::iterator_traits<MoleculeSet::iterator>::reference>
+  {
   public:
+
+    typedef MoleculeSet::iterator _Iter;
+    typedef _Iter::value_type value_type;
+    typedef _Iter::difference_type difference_type;
+    typedef _Iter::pointer pointer;
+    typedef _Iter::reference reference;
+    typedef _Iter::iterator_category iterator_category;
+
     MoleculeIterator();
     MoleculeIterator(MoleculeDescriptor, World*);
Index: src/atom.cpp
===================================================================
--- src/atom.cpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/atom.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -306,5 +306,5 @@
 }
 
-int atom::getId() {
+atomId_t atom::getId() {
   return id;
 }
Index: src/atom.hpp
===================================================================
--- src/atom.hpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/atom.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -79,5 +79,5 @@
   void setWorld(World*);
 
-  virtual int getId();
+  virtual atomId_t getId();
   virtual bool changeId(atomId_t newId);
 
Index: src/unittests/AtomDescriptorTest.cpp
===================================================================
--- src/unittests/AtomDescriptorTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/unittests/AtomDescriptorTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,158 @@
+/*
+ * DescriptorUnittest.cpp
+ *
+ *  Created on: Feb 9, 2010
+ *      Author: crueger
+ */
+
+#include "AtomDescriptorTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <iostream>
+
+#include <Descriptors/AtomDescriptor.hpp>
+#include <Descriptors/AtomIdDescriptor.hpp>
+
+#include "World.hpp"
+#include "atom.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( AtomDescriptorTest );
+
+// set up and tear down
+void AtomDescriptorTest::setUp(){
+  World::get();
+  for(int i=0;i<ATOM_COUNT;++i){
+    atoms[i]= World::get()->createAtom();
+    atomIds[i]= atoms[i]->getId();
+  }
+}
+
+void AtomDescriptorTest::tearDown(){
+  World::destroy();
+}
+
+// some helper functions
+static bool hasAllAtoms(std::vector<atom*> atoms,atomId_t ids[ATOM_COUNT], std::set<atomId_t> excluded = std::set<atomId_t>()){
+  for(int i=0;i<ATOM_COUNT;++i){
+    atomId_t id = ids[i];
+    if(!excluded.count(id)){
+      std::vector<atom*>::iterator iter;
+      bool res=false;
+      for(iter=atoms.begin();iter!=atoms.end();++iter){
+        res |= (*iter)->getId() == id;
+      }
+      if(!res) {
+        cout << "Atom " << id << " missing in returned list" << endl;
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
+static bool hasNoDuplicateAtoms(std::vector<atom*> atoms){
+  std::set<atomId_t> found;
+  std::vector<atom*>::iterator iter;
+  for(iter=atoms.begin();iter!=atoms.end();++iter){
+    int id = (*iter)->getId();
+    if(found.count(id))
+      return false;
+    found.insert(id);
+  }
+  return true;
+}
+
+
+void AtomDescriptorTest::AtomBaseSetsTest(){
+  std::vector<atom*> allAtoms = World::get()->getAllAtoms(AllAtoms());
+  CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(allAtoms,atomIds));
+  CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(allAtoms));
+
+  std::vector<atom*> noAtoms = World::get()->getAllAtoms(NoAtoms());
+  CPPUNIT_ASSERT_EQUAL( true , noAtoms.empty());
+}
+void AtomDescriptorTest::AtomIdTest(){
+  // test Atoms from boundaries and middle of the set
+  atom* testAtom;
+  testAtom = World::get()->getAtom(AtomById(atomIds[0]));
+  CPPUNIT_ASSERT(testAtom);
+  CPPUNIT_ASSERT_EQUAL( atomIds[0], testAtom->getId());
+  testAtom = World::get()->getAtom(AtomById(atomIds[ATOM_COUNT/2]));
+  CPPUNIT_ASSERT(testAtom);
+  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtom->getId());
+  testAtom = World::get()->getAtom(AtomById(atomIds[ATOM_COUNT-1]));
+  CPPUNIT_ASSERT(testAtom);
+  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT-1], testAtom->getId());
+
+  // find some ID that has not been created
+  atomId_t outsideId=0;
+  bool res = false;
+  for(outsideId=0;!res;++outsideId) {
+    res = true;
+    for(int i = 0; i < ATOM_COUNT; ++i){
+      res &= atomIds[i]!=outsideId;
+    }
+  }
+  // test from outside of set
+  testAtom = World::get()->getAtom(AtomById(outsideId));
+  CPPUNIT_ASSERT(!testAtom);
+}
+void AtomDescriptorTest::AtomCalcTest(){
+  // test some elementary set operations
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()||NoAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()||AllAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()&&AllAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()&&NoAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(!AllAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(!NoAtoms());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
+  }
+
+  // exclude and include some atoms
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()&&(!AtomById(atomIds[ATOM_COUNT/2])));
+    std::set<atomId_t> excluded;
+    excluded.insert(atomIds[ATOM_COUNT/2]);
+    CPPUNIT_ASSERT_EQUAL( true , hasAllAtoms(testAtoms,atomIds,excluded));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateAtoms(testAtoms));
+    CPPUNIT_ASSERT_EQUAL( (size_t)(ATOM_COUNT-1), testAtoms.size());
+  }
+
+  {
+    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()||(AtomById(atomIds[ATOM_COUNT/2])));
+    CPPUNIT_ASSERT_EQUAL( (size_t)1, testAtoms.size());
+    CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtoms[0]->getId());
+  }
+}
Index: src/unittests/AtomDescriptorTest.hpp
===================================================================
--- src/unittests/AtomDescriptorTest.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/unittests/AtomDescriptorTest.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,40 @@
+/*
+ * AtomDescriptorTest.hpp
+ *
+ *  Created on: Feb 9, 2010
+ *      Author: crueger
+ */
+
+#ifndef ATOMDESCRIPTORTEST_HPP_
+#define ATOMDESCRIPTORTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "defs.hpp"
+
+#define ATOM_COUNT (10)
+
+class atom;
+
+class AtomDescriptorTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( AtomDescriptorTest );
+  CPPUNIT_TEST ( AtomBaseSetsTest );
+  CPPUNIT_TEST ( AtomIdTest );
+  CPPUNIT_TEST ( AtomCalcTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void AtomBaseSetsTest();
+  void AtomIdTest();
+  void AtomCalcTest();
+
+private:
+  atom *atoms [ATOM_COUNT];
+  atomId_t atomIds [ATOM_COUNT];
+};
+
+#endif /* ATOMDESCRIPTORTEST_HPP_ */
Index: c/unittests/DescriptorUnittest.cpp
===================================================================
--- src/unittests/DescriptorUnittest.cpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ 	(revision )
@@ -1,158 +1,0 @@
-/*
- * DescriptorUnittest.cpp
- *
- *  Created on: Feb 9, 2010
- *      Author: crueger
- */
-
-#include "DescriptorUnittest.hpp"
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-#include <iostream>
-
-#include <Descriptors/AtomDescriptor.hpp>
-#include <Descriptors/AtomIdDescriptor.hpp>
-
-#include "World.hpp"
-#include "atom.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( DescriptorUnittest );
-
-// set up and tear down
-void DescriptorUnittest::setUp(){
-  World::get();
-  for(int i=0;i<ATOM_COUNT;++i){
-    atoms[i]= World::get()->createAtom();
-    atomIds[i] = atoms[i]->getId();
-  }
-}
-void DescriptorUnittest::tearDown(){
-  World::destroy();
-}
-
-// some helper functions
-bool hasAll(std::vector<atom*> atoms,int ids[ATOM_COUNT], std::set<int> excluded = std::set<int>()){
-  for(int i=0;i<ATOM_COUNT;++i){
-    int id = ids[i];
-    if(!excluded.count(id)){
-      std::vector<atom*>::iterator iter;
-      bool res=false;
-      for(iter=atoms.begin();iter!=atoms.end();++iter){
-        res |= (*iter)->getId() == id;
-      }
-      if(!res) {
-        cout << "Atom " << id << " missing in returned list" << endl;
-        return false;
-      }
-    }
-  }
-  return true;
-}
-
-bool hasNoDuplicates(std::vector<atom*> atoms){
-  std::set<int> found;
-  std::vector<atom*>::iterator iter;
-  for(iter=atoms.begin();iter!=atoms.end();++iter){
-    int id = (*iter)->getId();
-    if(found.count(id))
-      return false;
-    found.insert(id);
-  }
-  return true;
-}
-
-
-void DescriptorUnittest::AtomBaseSetsTest(){
-  std::vector<atom*> allAtoms = World::get()->getAllAtoms(AllAtoms());
-  CPPUNIT_ASSERT_EQUAL( true , hasAll(allAtoms,atomIds));
-  CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicates(allAtoms));
-
-  std::vector<atom*> noAtoms = World::get()->getAllAtoms(NoAtoms());
-  CPPUNIT_ASSERT_EQUAL( true , noAtoms.empty());
-}
-void DescriptorUnittest::AtomIdTest(){
-  // test Atoms from boundaries and middle of the set
-  atom* testAtom;
-  testAtom = World::get()->getAtom(AtomById(atomIds[0]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[0], testAtom->getId());
-  testAtom = World::get()->getAtom(AtomById(atomIds[ATOM_COUNT/2]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtom->getId());
-  testAtom = World::get()->getAtom(AtomById(atomIds[ATOM_COUNT-1]));
-  CPPUNIT_ASSERT(testAtom);
-  CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT-1], testAtom->getId());
-
-  // find some ID that has not been created
-  int outsideId =-1;
-  bool res = false;
-  while(!res) {
-    ++outsideId;
-    res = true;
-    for(int i = 0; i < ATOM_COUNT; ++i){
-      res &= atomIds[i]!=outsideId;
-    }
-  }
-  // test from outside of set
-  testAtom = World::get()->getAtom(AtomById(outsideId));
-  CPPUNIT_ASSERT(!testAtom);
-}
-void DescriptorUnittest::AtomCalcTest(){
-  // test some elementary set operations
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()||NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAll(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicates(testAtoms));
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()||AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAll(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicates(testAtoms));
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()&&AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()&&NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(!AllAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , testAtoms.empty());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(!NoAtoms());
-    CPPUNIT_ASSERT_EQUAL( true , hasAll(testAtoms,atomIds));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicates(testAtoms));
-  }
-
-  // exclude and include some atoms
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(AllAtoms()&&(!AtomById(atomIds[ATOM_COUNT/2])));
-    std::set<int> excluded;
-    excluded.insert(atomIds[ATOM_COUNT/2]);
-    CPPUNIT_ASSERT_EQUAL( true , hasAll(testAtoms,atomIds,excluded));
-    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicates(testAtoms));
-    CPPUNIT_ASSERT_EQUAL( (size_t)(ATOM_COUNT-1), testAtoms.size());
-  }
-
-  {
-    std::vector<atom*> testAtoms = World::get()->getAllAtoms(NoAtoms()||(AtomById(atomIds[ATOM_COUNT/2])));
-    CPPUNIT_ASSERT_EQUAL( (size_t)1, testAtoms.size());
-    CPPUNIT_ASSERT_EQUAL( atomIds[ATOM_COUNT/2], testAtoms[0]->getId());
-  }
-}
Index: c/unittests/DescriptorUnittest.hpp
===================================================================
--- src/unittests/DescriptorUnittest.hpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- * DescriptorUnittest.hpp
- *
- *  Created on: Feb 9, 2010
- *      Author: crueger
- */
-
-#ifndef DESCRIPTORUNITTEST_HPP_
-#define DESCRIPTORUNITTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#define ATOM_COUNT (10)
-
-class atom;
-
-class DescriptorUnittest : public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( DescriptorUnittest );
-  CPPUNIT_TEST ( AtomBaseSetsTest );
-  CPPUNIT_TEST ( AtomIdTest );
-  CPPUNIT_TEST ( AtomCalcTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void AtomBaseSetsTest();
-  void AtomIdTest();
-  void AtomCalcTest();
-
-private:
-  atom *atoms [ATOM_COUNT];
-  int atomIds [ATOM_COUNT];
-};
-
-#endif /* DESCRIPTORUNITTEST_HPP_ */
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/unittests/Makefile.am	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -12,5 +12,8 @@
   AnalysisCorrelationToSurfaceUnitTest \
   AnalysisPairCorrelationUnitTest \
+  atomsCalculationTest \
+  AtomDescriptorTest \
   BondGraphUnitTest \
+  CacheableTest \
   GSLMatrixSymmetricUnitTest \
   GSLMatrixUnitTest \
@@ -20,6 +23,10 @@
   ListOfBondsUnitTest \
   LogUnitTest \
+  manipulateAtomsTest \
   MemoryUsageObserverUnitTest \
   MemoryAllocatorUnitTest \
+  MoleculeDescriptorTest \
+  ObserverTest \
+  ParserUnitTest \
   StackClassUnitTest \
   TesselationUnitTest \
@@ -27,12 +34,7 @@
   Tesselation_InOutsideUnitTest \
   VectorUnitTest \
-  ObserverTest \
-  CacheableTest \
-  DescriptorUnittest \
-  ParserUnitTest \
-  manipulateAtomsTest \
-  atomsCalculationTest \
-  ${MENUTESTS}  
-    
+  ${MENUTESTS}
+  
+
   
 check_PROGRAMS = $(TESTS) 
@@ -44,9 +46,14 @@
 TESTSOURCES = \
   ActOnAllUnitTest.cpp \
+  ActionSequenceTest.cpp \
   analysisbondsunittest.cpp \
   AnalysisCorrelationToPointUnitTest.cpp \
   AnalysisCorrelationToSurfaceUnitTest.cpp  \
   AnalysisPairCorrelationUnitTest.cpp \
+  AtomDescriptorTest.cpp \
+  atomsCalculationTest.cpp \
   bondgraphunittest.cpp \
+  CacheableTest.cpp \
+  DescriptorUnittest.cpp \
   gslmatrixsymmetricunittest.cpp \
   gslmatrixunittest.cpp \
@@ -56,18 +63,15 @@
   listofbondsunittest.cpp \
   logunittest.cpp \
+  manipulateAtomsTest.cpp \
   memoryallocatorunittest.cpp  \
   memoryusageobserverunittest.cpp \
+  MoleculeDescriptorTest.cpp \
+  ObserverTest.cpp \
+  ParserUnitTest.cpp \
   stackclassunittest.cpp \
   tesselationunittest.cpp \
   tesselation_boundarytriangleunittest.cpp \
   tesselation_insideoutsideunittest.cpp \
-  vectorunittest.cpp \
-  ObserverTest.cpp \
-  CacheableTest.cpp \
-  DescriptorUnittest.cpp \
-  ParserUnitTest.cpp \
-  manipulateAtomsTest.cpp \
-  atomsCalculationTest.cpp \
-  ActionSequenceTest.cpp
+  vectorunittest.cpp
 
 TESTHEADERS = \
@@ -119,4 +123,7 @@
 MemoryUsageObserverUnitTest_LDADD = ${ALLLIBS}
 
+MoleculeDescriptorTest_SOURCES = UnitTestMain.cpp MoleculeDescriptorTest.cpp MoleculeDescriptorTest.hpp
+MoleculeDescriptorTest_LDADD = ${ALLLIBS}
+
 StackClassUnitTest_SOURCES = UnitTestMain.cpp stackclassunittest.cpp stackclassunittest.hpp
 StackClassUnitTest_LDADD = ${ALLLIBS}
@@ -143,6 +150,6 @@
 CacheableTest_LDADD = ${ALLLIBS}
 
-DescriptorUnittest_SOURCES = UnitTestMain.cpp DescriptorUnittest.cpp DescriptorUnittest.hpp
-DescriptorUnittest_LDADD = ${ALLLIBS}
+AtomDescriptorTest_SOURCES = UnitTestMain.cpp AtomDescriptorTest.cpp AtomDescriptorTest.hpp
+AtomDescriptorTest_LDADD = ${ALLLIBS}
 
 ParserUnitTest_SOURCES = UnitTestMain.cpp ParserUnitTest.cpp ParserUnitTest.hpp
Index: src/unittests/MoleculeDescriptorTest.cpp
===================================================================
--- src/unittests/MoleculeDescriptorTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/unittests/MoleculeDescriptorTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,158 @@
+/*
+ * MoleculeDescriptorTest.cpp
+ *
+ *  Created on: Mar 4, 2010
+ *      Author: crueger
+ */
+
+#include "MoleculeDescriptorTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <iostream>
+
+#include <Descriptors/MoleculeDescriptor.hpp>
+#include <Descriptors/MoleculeIdDescriptor.hpp>
+
+#include "World.hpp"
+#include "molecule.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( MoleculeDescriptorTest );
+
+// set up and tear down
+void MoleculeDescriptorTest::setUp(){
+  World::get();
+  for(int i=0;i<MOLECULE_COUNT;++i){
+    molecules[i]= World::get()->createMolecule();
+    moleculeIds[i]= molecules[i]->getId();
+  }
+}
+
+void MoleculeDescriptorTest::tearDown(){
+  World::destroy();
+}
+
+// some helper functions
+static bool hasAllMolecules(std::vector<molecule*> molecules,moleculeId_t ids[MOLECULE_COUNT], std::set<moleculeId_t> excluded = std::set<moleculeId_t>()){
+  for(int i=0;i<MOLECULE_COUNT;++i){
+    moleculeId_t id = ids[i];
+    if(!excluded.count(id)){
+      std::vector<molecule*>::iterator iter;
+      bool res=false;
+      for(iter=molecules.begin();iter!=molecules.end();++iter){
+        res |= (*iter)->getId() == id;
+      }
+      if(!res) {
+        cout << "Molecule " << id << " missing in returned list" << endl;
+        return false;
+      }
+    }
+  }
+  return true;
+}
+
+static bool hasNoDuplicateMolecules(std::vector<molecule*> molecules){
+  std::set<moleculeId_t> found;
+  std::vector<molecule*>::iterator iter;
+  for(iter=molecules.begin();iter!=molecules.end();++iter){
+    int id = (*iter)->getId();
+    if(found.count(id))
+      return false;
+    found.insert(id);
+  }
+  return true;
+}
+
+
+void MoleculeDescriptorTest::MoleculeBaseSetsTest(){
+  std::vector<molecule*> allMolecules = World::get()->getAllMolecules(AllMolecules());
+  CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(allMolecules,moleculeIds));
+  CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(allMolecules));
+
+  std::vector<molecule*> noMolecules = World::get()->getAllMolecules(NoMolecules());
+  CPPUNIT_ASSERT_EQUAL( true , noMolecules.empty());
+}
+void MoleculeDescriptorTest::MoleculeIdTest(){
+  // test Molecules from boundaries and middle of the set
+  molecule* testMolecule;
+  testMolecule = World::get()->getMolecule(MoleculeById(moleculeIds[0]));
+  CPPUNIT_ASSERT(testMolecule);
+  CPPUNIT_ASSERT_EQUAL( moleculeIds[0], testMolecule->getId());
+  testMolecule = World::get()->getMolecule(MoleculeById(moleculeIds[MOLECULE_COUNT/2]));
+  CPPUNIT_ASSERT(testMolecule);
+  CPPUNIT_ASSERT_EQUAL( moleculeIds[MOLECULE_COUNT/2], testMolecule->getId());
+  testMolecule = World::get()->getMolecule(MoleculeById(moleculeIds[MOLECULE_COUNT-1]));
+  CPPUNIT_ASSERT(testMolecule);
+  CPPUNIT_ASSERT_EQUAL( moleculeIds[MOLECULE_COUNT-1], testMolecule->getId());
+
+  // find some ID that has not been created
+  moleculeId_t outsideId=0;
+  bool res = false;
+  for(outsideId=0;!res;++outsideId) {
+    res = true;
+    for(int i = 0; i < MOLECULE_COUNT; ++i){
+      res &= moleculeIds[i]!=outsideId;
+    }
+  }
+  // test from outside of set
+  testMolecule = World::get()->getMolecule(MoleculeById(outsideId));
+  CPPUNIT_ASSERT(!testMolecule);
+}
+void MoleculeDescriptorTest::MoleculeCalcTest(){
+  // test some elementary set operations
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(AllMolecules()||NoMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(NoMolecules()||AllMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(NoMolecules()&&AllMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(AllMolecules()&&NoMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(!AllMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(!NoMolecules());
+    CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
+  }
+
+  // exclude and include some molecules
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(AllMolecules()&&(!MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    std::set<moleculeId_t> excluded;
+    excluded.insert(moleculeIds[MOLECULE_COUNT/2]);
+    CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds,excluded));
+    CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
+    CPPUNIT_ASSERT_EQUAL( (size_t)(MOLECULE_COUNT-1), testMolecules.size());
+  }
+
+  {
+    std::vector<molecule*> testMolecules = World::get()->getAllMolecules(NoMolecules()||(MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    CPPUNIT_ASSERT_EQUAL( (size_t)1, testMolecules.size());
+    CPPUNIT_ASSERT_EQUAL( moleculeIds[MOLECULE_COUNT/2], testMolecules[0]->getId());
+  }
+}
Index: src/unittests/MoleculeDescriptorTest.hpp
===================================================================
--- src/unittests/MoleculeDescriptorTest.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
+++ src/unittests/MoleculeDescriptorTest.hpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -0,0 +1,40 @@
+/*
+ * MoleculeDescriptorTest.hpp
+ *
+ *  Created on: Mar 4, 2010
+ *      Author: crueger
+ */
+
+#ifndef MOLECULEDESCRIPTORTEST_HPP_
+#define MOLECULEDESCRIPTORTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "defs.hpp"
+
+#define MOLECULE_COUNT (10)
+
+class molecule;
+
+class MoleculeDescriptorTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( MoleculeDescriptorTest );
+  CPPUNIT_TEST ( MoleculeBaseSetsTest );
+  CPPUNIT_TEST ( MoleculeIdTest );
+  CPPUNIT_TEST ( MoleculeCalcTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void MoleculeBaseSetsTest();
+  void MoleculeIdTest();
+  void MoleculeCalcTest();
+
+private:
+  molecule *molecules [MOLECULE_COUNT];
+  moleculeId_t moleculeIds [MOLECULE_COUNT];
+};
+
+#endif /* MOLECULEDESCRIPTORTEST_HPP_ */
Index: src/unittests/atomsCalculationTest.cpp
===================================================================
--- src/unittests/atomsCalculationTest.cpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/unittests/atomsCalculationTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -30,5 +30,5 @@
 class AtomStub : public atom {
 public:
-  AtomStub(int _id) :
+  AtomStub(atomId_t _id) :
   atom(),
   id(_id),
@@ -36,5 +36,5 @@
   {}
 
-  virtual int getId(){
+  virtual atomId_t getId(){
     return id;
   }
@@ -46,5 +46,5 @@
   bool manipulated;
 private:
-  int id;
+  atomId_t id;
 };
 
Index: src/unittests/manipulateAtomsTest.cpp
===================================================================
--- src/unittests/manipulateAtomsTest.cpp	(revision 7dc1026fa042673a3afb826472ab3fa660390ba6)
+++ src/unittests/manipulateAtomsTest.cpp	(revision cb2146212f0e6343f8c302f924a2e8bfb3401b6e)
@@ -34,5 +34,5 @@
   {}
 
-  virtual int getId(){
+  virtual atomId_t getId(){
     return id;
   }
@@ -44,5 +44,5 @@
   bool manipulated;
 private:
-  int id;
+  atomId_t id;
 };
 
