Index: src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp
===================================================================
--- src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp	(revision 63fb7a963007e0f94b955d96ca949cd435eacb2a)
+++ src/Descriptors/unittests/MoleculeDescriptorUnitTest.cpp	(revision 1259df9500410b59c3a56d9cf8d54624b53f97da)
@@ -70,9 +70,13 @@
 
 // some helper functions
-static bool hasAllMolecules(std::vector<molecule*> molecules,moleculeId_t ids[MOLECULE_COUNT], std::set<moleculeId_t> excluded = std::set<moleculeId_t>()){
+static bool hasAllMolecules(
+    std::vector<const 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;
+      std::vector<const molecule*>::const_iterator iter;
       bool res=false;
       for(iter=molecules.begin();iter!=molecules.end();++iter){
@@ -88,7 +92,7 @@
 }
 
-static bool hasNoDuplicateMolecules(std::vector<molecule*> molecules){
+static bool hasNoDuplicateMolecules(std::vector<const molecule*> &molecules){
   std::set<moleculeId_t> found;
-  std::vector<molecule*>::iterator iter;
+  std::vector<const molecule*>::const_iterator iter;
   for(iter=molecules.begin();iter!=molecules.end();++iter){
     int id = (*iter)->getId();
@@ -102,9 +106,11 @@
 
 void MoleculeDescriptorTest::MoleculeBaseSetsTest(){
-  std::vector<molecule*> allMolecules = World::getInstance().getAllMolecules(AllMolecules());
+  std::vector<const molecule*> allMolecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules());
   CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(allMolecules,moleculeIds));
   CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(allMolecules));
 
-  std::vector<molecule*> noMolecules = World::getInstance().getAllMolecules(NoMolecules());
+  std::vector<const molecule*> noMolecules =
+      const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules());
   CPPUNIT_ASSERT_EQUAL( true , noMolecules.empty());
 }
@@ -142,5 +148,6 @@
   // test some elementary set operations
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()||NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()||NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -148,5 +155,6 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()||AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules()||AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -154,20 +162,24 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()&&AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(NoMolecules()&&AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()&&NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()&&NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(!AllMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(!AllMolecules());
     CPPUNIT_ASSERT_EQUAL( true , testMolecules.empty());
   }
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(!NoMolecules());
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(!NoMolecules());
     CPPUNIT_ASSERT_EQUAL( true , hasAllMolecules(testMolecules,moleculeIds));
     CPPUNIT_ASSERT_EQUAL( true , hasNoDuplicateMolecules(testMolecules));
@@ -176,5 +188,6 @@
   // exclude and include some molecules
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(AllMolecules()&&(!MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).getAllMolecules(AllMolecules()&&(!MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
     std::set<moleculeId_t> excluded;
     excluded.insert(moleculeIds[MOLECULE_COUNT/2]);
@@ -185,5 +198,6 @@
 
   {
-    std::vector<molecule*> testMolecules = World::getInstance().getAllMolecules(NoMolecules()||(MoleculeById(moleculeIds[MOLECULE_COUNT/2])));
+    std::vector<const molecule*> testMolecules =
+        const_cast<const World &>(World::getInstance()).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());
