Index: src/Fragmentation/Makefile.am
===================================================================
--- src/Fragmentation/Makefile.am	(revision d9a032dc6846bb5d2cf9a7b5a184c2a68e344dcd)
+++ src/Fragmentation/Makefile.am	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
@@ -9,5 +9,6 @@
 	Fragmentation/HessianMatrix.cpp \
 	Fragmentation/KeySetsContainer.cpp \
-	Fragmentation/MatrixContainer.cpp
+	Fragmentation/MatrixContainer.cpp \
+	Fragmentation/UniqueFragments.cpp
 
 FRAGMENTATIONHEADER = \
@@ -19,5 +20,6 @@
 	Fragmentation/HessianMatrix.hpp \
 	Fragmentation/KeySetsContainer.hpp \
-	Fragmentation/MatrixContainer.hpp
+	Fragmentation/MatrixContainer.hpp \
+	Fragmentation/UniqueFragments.hpp
 
 
Index: src/Fragmentation/UniqueFragments.cpp
===================================================================
--- src/Fragmentation/UniqueFragments.cpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
+++ src/Fragmentation/UniqueFragments.cpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
@@ -0,0 +1,260 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * UniqueFragments.cpp
+ *
+ *  Created on: Oct 18, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "UniqueFragments.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+#include "atom.hpp"
+#include "Bond/bond.hpp"
+#include "Element/element.hpp"
+#include "graph.hpp"
+
+/** Constructor of class UniqueFragments.
+ *
+ */
+UniqueFragments::UniqueFragments()
+{}
+
+/** Destructor of class UniqueFragments.
+ *
+ */
+UniqueFragments::~UniqueFragments()
+{}
+
+/** Checking whether KeySet is not already present in Graph, if so just adds factor.
+ */
+void UniqueFragments::InsertFragmentIntoGraph()
+{
+  GraphTestPair testGraphInsert;
+
+  testGraphInsert = Leaflet->insert(GraphPair (*FragmentSet,std::pair<int,double>(FragmentCounter,TEFactor)));  // store fragment number and current factor
+  if (testGraphInsert.second) {
+    DoLog(2) && (Log() << Verbose(2) << "KeySet " << FragmentCounter << " successfully inserted." << endl);
+    FragmentCounter++;
+  } else {
+    DoLog(2) && (Log() << Verbose(2) << "KeySet " << FragmentCounter << " failed to insert, present fragment is " << ((*(testGraphInsert.first)).second).first << endl);
+    ((*(testGraphInsert.first)).second).second += TEFactor;  // increase the "created" counter
+    DoLog(2) && (Log() << Verbose(2) << "New factor is " << ((*(testGraphInsert.first)).second).second << "." << endl);
+  }
+};
+
+/** Allocates memory for UniqueFragments::BondsPerSPList.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ * \sa UniqueFragments::FreeSPList()
+ */
+void UniqueFragments::InitialiseSPList(int Order)
+{
+  BondsPerSPList.resize(Order);
+  BondsPerSPCount = new int[Order];
+  for (int i=Order;i--;) {
+    BondsPerSPCount[i] = 0;
+  }
+};
+
+/** Free's memory for for UniqueFragments::BondsPerSPList.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ * \sa UniqueFragments::InitialiseSPList()
+ */
+void UniqueFragments::FreeSPList(int Order)
+{
+  delete[](BondsPerSPCount);
+};
+
+/** Sets FragmenSearch to initial value.
+ * Sets UniqueFragments::ShortestPathList entries to zero, UniqueFragments::BondsPerSPCount to zero (except zero level to 1) and
+ * adds initial bond UniqueFragments::Root to UniqueFragments::Root to UniqueFragments::BondsPerSPList
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ * \sa UniqueFragments::FreeSPList()
+ */
+void UniqueFragments::SetSPList(int Order)
+{
+  // prepare Label and SP arrays of the BFS search
+  ShortestPathList[Root->getNr()] = 0;
+
+  // prepare root level (SP = 0) and a loop bond denoting Root
+  for (int i=Order;i--;)
+    BondsPerSPCount[i] = 0;
+  BondsPerSPCount[0] = 1;
+  bond *Binder = new bond(Root, Root);
+  BondsPerSPList[0].push_back(Binder);
+};
+
+/** Resets UniqueFragments::ShortestPathList and cleans bonds from UniqueFragments::BondsPerSPList.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ * \sa UniqueFragments::InitialiseSPList()
+ */
+void UniqueFragments::ResetSPList(int Order)
+{
+  DoLog(0) && (Log() << Verbose(0) << "Free'ing all found lists. and resetting index lists" << endl);
+  for(int i=Order;i--;) {
+    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": ");
+    for (UniqueFragments::BondsPerSP::const_iterator iter = BondsPerSPList[i].begin();
+        iter != BondsPerSPList[i].end();
+        ++iter) {
+      // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->getNr() << " and " << Binder->rightatom->getNr() << "." << endl; // make sure numbers are local
+      ShortestPathList[(*iter)->leftatom->getNr()] = -1;
+      ShortestPathList[(*iter)->rightatom->getNr()] = -1;
+    }
+    // delete added bonds
+    for (UniqueFragments::BondsPerSP::iterator iter = BondsPerSPList[i].begin();
+        iter != BondsPerSPList[i].end();
+        ++iter) {
+      delete(*iter);
+    }
+    BondsPerSPList[i].clear();
+    // also start and end node
+    DoLog(0) && (Log() << Verbose(0) << "cleaned." << endl);
+  }
+};
+
+
+/** Fills the Bonds per Shortest Path List and set the vertex labels.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ * \param RestrictedKeySet Restricted vertex set to use in context of molecule
+ */
+void UniqueFragments::FillSPListandLabelVertices(int Order, KeySet &RestrictedKeySet)
+{
+  // Actually, we should construct a spanning tree vom the root atom and select all edges therefrom and put them into
+  // according shortest path lists. However, we don't. Rather we fill these lists right away, as they do form a spanning
+  // tree already sorted into various SP levels. That's why we just do loops over the depth (CurrentSP) and breadth
+  // (EdgeinSPLevel) of this tree ...
+  // In another picture, the bonds always contain a direction by rightatom being the one more distant from root and hence
+  // naturally leftatom forming its predecessor, preventing the BFS"seeker" from continuing in the wrong direction.
+  int AtomKeyNr = -1;
+  atom *Walker = NULL;
+  atom *OtherWalker = NULL;
+  atom *Predecessor = NULL;
+  bond *Binder = NULL;
+  int RootKeyNr = Root->GetTrueFather()->getNr();
+  int RemainingWalkers = -1;
+  int SP = -1;
+
+  DoLog(0) && (Log() << Verbose(0) << "Starting BFS analysis ..." << endl);
+  for (SP = 0; SP < (Order-1); SP++) {
+    DoLog(1) && (Log() << Verbose(1) << "New SP level reached: " << SP << ", creating new SP list with " << BondsPerSPCount[SP] << " item(s)");
+    if (SP > 0) {
+      DoLog(0) && (Log() << Verbose(0) << ", old level closed with " << BondsPerSPCount[SP-1] << " item(s)." << endl);
+      BondsPerSPCount[SP] = 0;
+    } else
+      DoLog(0) && (Log() << Verbose(0) << "." << endl);
+
+    RemainingWalkers = BondsPerSPCount[SP];
+    for (BondsPerSP::const_iterator CurrentEdge = BondsPerSPList[SP].begin();
+        CurrentEdge != BondsPerSPList[SP].end();
+        ++CurrentEdge) { /// start till end of this SP level's list
+      RemainingWalkers--;
+      Walker = (*CurrentEdge)->rightatom;    // rightatom is always the one more distant
+      Predecessor = (*CurrentEdge)->leftatom;    // ... and leftatom is predecessor
+      AtomKeyNr = Walker->getNr();
+      DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl);
+      // check for new sp level
+      // go through all its bonds
+      DoLog(1) && (Log() << Verbose(1) << "Going through all bonds of Walker." << endl);
+      const BondList& ListOfBonds = Walker->getListOfBonds();
+      for (BondList::const_iterator Runner = ListOfBonds.begin();
+          Runner != ListOfBonds.end();
+          ++Runner) {
+        OtherWalker = (*Runner)->GetOtherAtom(Walker);
+        if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end())
+  #ifdef ADDHYDROGEN
+         && (OtherWalker->getType()->getAtomicNumber() != 1)
+  #endif
+                                                              ) {  // skip hydrogens and restrict to fragment
+          DoLog(2) && (Log() << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker->getNr() << " in bond " << *(*Runner) << "." << endl);
+          // set the label if not set (and push on root stack as well)
+          if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()->getNr() > RootKeyNr)) { // only pass through those with label bigger than Root's
+            ShortestPathList[OtherWalker->getNr()] = SP+1;
+            DoLog(3) && (Log() << Verbose(3) << "Set Shortest Path to " << ShortestPathList[OtherWalker->getNr()] << "." << endl);
+            // add the bond in between to the SP list
+            Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
+            BondsPerSPList[SP+1].push_back(Binder);
+            BondsPerSPCount[SP+1]++;
+            DoLog(3) && (Log() << Verbose(3) << "Added its bond to SP list, having now " << BondsPerSPCount[SP+1] << " item(s)." << endl);
+          } else {
+            if (OtherWalker != Predecessor)
+              DoLog(3) && (Log() << Verbose(3) << "Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << "." << endl);
+            else
+              DoLog(3) && (Log() << Verbose(3) << "This is my predecessor " << *Predecessor << "." << endl);
+          }
+        } else Log() << Verbose(2) << "Is not in the restricted keyset or skipping hydrogen " << *OtherWalker << "." << endl;
+      }
+    }
+  }
+};
+
+/** prints the Bonds per Shortest Path list in UniqueFragments.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ */
+void UniqueFragments::OutputSPList(int Order)
+{
+  DoLog(0) && (Log() << Verbose(0) << "Printing all found lists." << endl);
+  for(int i=1;i<Order;i++) {    // skip the root edge in the printing
+    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << "." << endl);
+    for (UniqueFragments::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin();
+        Binder != BondsPerSPList[i].end();
+        ++Binder) {
+      DoLog(2) && (Log() << Verbose(2) << *Binder << endl);
+    }
+  }
+};
+
+/** Simply counts all bonds in all UniqueFragments::BondsPerSPList lists.
+ * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
+ */
+int UniqueFragments::CountNumbersInBondsList(int Order)
+{
+  int SP = -1;  // the Root <-> Root edge must be subtracted!
+  for(int i=Order;i--;) { // sum up all found edges
+    for (UniqueFragments::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin();
+        Binder != BondsPerSPList[i].end();
+        ++Binder) {
+      SP++;
+    }
+  }
+  return SP;
+};
+
+/** Initialization for UniqueFragments.
+ *
+ * \param _Root ref to atom to start from (with graph algorithms, hence root node)
+ * \param AtomCount number of nodes/atoms
+ */
+void UniqueFragments::Init(atom *_Root, size_t AtomCount)
+{
+  // initialise the fragments structure
+  FragmentCounter = 0;
+  FragmentSet = new KeySet;
+  Root = _Root;
+  ShortestPathList = new int[AtomCount];
+  for (int i=AtomCount;i--;) {
+    ShortestPathList[i] = -1;
+  }
+}
+
+/** Removes some allocated memory.
+ *
+ */
+void UniqueFragments::Cleanup()
+{
+  delete[](ShortestPathList);
+  delete(FragmentSet);
+}
Index: src/Fragmentation/UniqueFragments.hpp
===================================================================
--- src/Fragmentation/UniqueFragments.hpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
+++ src/Fragmentation/UniqueFragments.hpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
@@ -0,0 +1,64 @@
+/*
+ * UniqueFragments.hpp
+ *
+ *  Created on: Oct 18, 2011
+ *      Author: heber
+ */
+
+#ifndef UNIQUEFRAGMENTS_HPP_
+#define UNIQUEFRAGMENTS_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <list>
+#include <vector>
+
+#include "graph.hpp"
+
+class atom;
+class bond;
+class config;
+
+/** Structure containing all values in power set combination generation.
+ */
+class UniqueFragments
+{
+public:
+  UniqueFragments();
+  ~UniqueFragments();
+
+  typedef std::list<bond*> BondsPerSP;
+  typedef std::vector< BondsPerSP > AllSPBonds;
+
+  config *configuration;
+  atom *Root;
+  Graph *Leaflet;
+  KeySet *FragmentSet;
+  int ANOVAOrder;
+  int FragmentCounter;
+  int CurrentIndex;
+  double TEFactor;
+  int *ShortestPathList;
+  bool **UsedList;
+  AllSPBonds BondsPerSPList;
+  int *BondsPerSPCount;
+
+  void InsertFragmentIntoGraph(); // Insert a KeySet into a Graph
+  void InitialiseSPList(int Order);
+  void FreeSPList(int Order);
+  void SetSPList(int Order);
+  void ResetSPList(int Order);
+  void FillSPListandLabelVertices(int Order, KeySet &RestrictedKeySet);
+  void OutputSPList(int Order);
+  int CountNumbersInBondsList(int Order);
+  void Init(atom *_Root, size_t AtomCount);
+  void Cleanup();
+
+private:
+};
+
+
+#endif /* UNIQUEFRAGMENTS_HPP_ */
Index: src/Fragmentation/fragmentation_helpers.cpp
===================================================================
--- src/Fragmentation/fragmentation_helpers.cpp	(revision d9a032dc6846bb5d2cf9a7b5a184c2a68e344dcd)
+++ src/Fragmentation/fragmentation_helpers.cpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
@@ -546,194 +546,4 @@
 };
 
-/** Allocates memory for UniqueFragments::BondsPerSPList.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- * \sa FreeSPList()
- */
-void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  FragmentSearch.BondsPerSPList.resize(Order);
-  FragmentSearch.BondsPerSPCount = new int[Order];
-  for (int i=Order;i--;) {
-    FragmentSearch.BondsPerSPCount[i] = 0;
-  }
-};
-
-/** Free's memory for for UniqueFragments::BondsPerSPList.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments\
- * \sa InitialiseSPList()
- */
-void FreeSPList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  delete[](FragmentSearch.BondsPerSPCount);
-};
-
-/** Sets FragmenSearch to initial value.
- * Sets UniqueFragments::ShortestPathList entries to zero, UniqueFragments::BondsPerSPCount to zero (except zero level to 1) and
- * adds initial bond UniqueFragments::Root to UniqueFragments::Root to UniqueFragments::BondsPerSPList
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- * \sa FreeSPList()
- */
-void SetSPList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  // prepare Label and SP arrays of the BFS search
-  FragmentSearch.ShortestPathList[FragmentSearch.Root->getNr()] = 0;
-
-  // prepare root level (SP = 0) and a loop bond denoting Root
-  for (int i=Order;i--;)
-    FragmentSearch.BondsPerSPCount[i] = 0;
-  FragmentSearch.BondsPerSPCount[0] = 1;
-  bond *Binder = new bond(FragmentSearch.Root, FragmentSearch.Root);
-  FragmentSearch.BondsPerSPList[0].push_back(Binder);
-};
-
-/** Resets UniqueFragments::ShortestPathList and cleans bonds from UniqueFragments::BondsPerSPList.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- * \sa InitialiseSPList()
- */
-void ResetSPList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  DoLog(0) && (Log() << Verbose(0) << "Free'ing all found lists. and resetting index lists" << endl);
-  for(int i=Order;i--;) {
-    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": ");
-    for (UniqueFragments::BondsPerSP::const_iterator iter = FragmentSearch.BondsPerSPList[i].begin();
-        iter != FragmentSearch.BondsPerSPList[i].end();
-        ++iter) {
-      // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->getNr() << " and " << Binder->rightatom->getNr() << "." << endl; // make sure numbers are local
-      FragmentSearch.ShortestPathList[(*iter)->leftatom->getNr()] = -1;
-      FragmentSearch.ShortestPathList[(*iter)->rightatom->getNr()] = -1;
-    }
-    // delete added bonds
-    for (UniqueFragments::BondsPerSP::iterator iter = FragmentSearch.BondsPerSPList[i].begin();
-        iter != FragmentSearch.BondsPerSPList[i].end();
-        ++iter) {
-      delete(*iter);
-    }
-    FragmentSearch.BondsPerSPList[i].clear();
-    // also start and end node
-    DoLog(0) && (Log() << Verbose(0) << "cleaned." << endl);
-  }
-};
-
-
-/** Fills the Bonds per Shortest Path List and set the vertex labels.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- * \param *mol molecule with atoms and bonds
- * \param RestrictedKeySet Restricted vertex set to use in context of molecule
- */
-void FillSPListandLabelVertices(int Order, struct UniqueFragments &FragmentSearch, molecule *mol, KeySet RestrictedKeySet)
-{
-  // Actually, we should construct a spanning tree vom the root atom and select all edges therefrom and put them into
-  // according shortest path lists. However, we don't. Rather we fill these lists right away, as they do form a spanning
-  // tree already sorted into various SP levels. That's why we just do loops over the depth (CurrentSP) and breadth
-  // (EdgeinSPLevel) of this tree ...
-  // In another picture, the bonds always contain a direction by rightatom being the one more distant from root and hence
-  // naturally leftatom forming its predecessor, preventing the BFS"seeker" from continuing in the wrong direction.
-  int AtomKeyNr = -1;
-  atom *Walker = NULL;
-  atom *OtherWalker = NULL;
-  atom *Predecessor = NULL;
-  bond *Binder = NULL;
-  int RootKeyNr = FragmentSearch.Root->GetTrueFather()->getNr();
-  int RemainingWalkers = -1;
-  int SP = -1;
-
-  DoLog(0) && (Log() << Verbose(0) << "Starting BFS analysis ..." << endl);
-  for (SP = 0; SP < (Order-1); SP++) {
-    DoLog(1) && (Log() << Verbose(1) << "New SP level reached: " << SP << ", creating new SP list with " << FragmentSearch.BondsPerSPCount[SP] << " item(s)");
-    if (SP > 0) {
-      DoLog(0) && (Log() << Verbose(0) << ", old level closed with " << FragmentSearch.BondsPerSPCount[SP-1] << " item(s)." << endl);
-      FragmentSearch.BondsPerSPCount[SP] = 0;
-    } else
-      DoLog(0) && (Log() << Verbose(0) << "." << endl);
-
-    RemainingWalkers = FragmentSearch.BondsPerSPCount[SP];
-    for (UniqueFragments::BondsPerSP::const_iterator CurrentEdge = FragmentSearch.BondsPerSPList[SP].begin();
-        CurrentEdge != FragmentSearch.BondsPerSPList[SP].end();
-        ++CurrentEdge) { /// start till end of this SP level's list
-      RemainingWalkers--;
-      Walker = (*CurrentEdge)->rightatom;    // rightatom is always the one more distant
-      Predecessor = (*CurrentEdge)->leftatom;    // ... and leftatom is predecessor
-      AtomKeyNr = Walker->getNr();
-      DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl);
-      // check for new sp level
-      // go through all its bonds
-      DoLog(1) && (Log() << Verbose(1) << "Going through all bonds of Walker." << endl);
-      const BondList& ListOfBonds = Walker->getListOfBonds();
-      for (BondList::const_iterator Runner = ListOfBonds.begin();
-          Runner != ListOfBonds.end();
-          ++Runner) {
-        OtherWalker = (*Runner)->GetOtherAtom(Walker);
-        if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end())
-  #ifdef ADDHYDROGEN
-         && (OtherWalker->getType()->getAtomicNumber() != 1)
-  #endif
-                                                              ) {  // skip hydrogens and restrict to fragment
-          DoLog(2) && (Log() << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker->getNr() << " in bond " << *(*Runner) << "." << endl);
-          // set the label if not set (and push on root stack as well)
-          if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()->getNr() > RootKeyNr)) { // only pass through those with label bigger than Root's
-            FragmentSearch.ShortestPathList[OtherWalker->getNr()] = SP+1;
-            DoLog(3) && (Log() << Verbose(3) << "Set Shortest Path to " << FragmentSearch.ShortestPathList[OtherWalker->getNr()] << "." << endl);
-            // add the bond in between to the SP list
-            Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
-            FragmentSearch.BondsPerSPList[SP+1].push_back(Binder);
-            FragmentSearch.BondsPerSPCount[SP+1]++;
-            DoLog(3) && (Log() << Verbose(3) << "Added its bond to SP list, having now " << FragmentSearch.BondsPerSPCount[SP+1] << " item(s)." << endl);
-          } else {
-            if (OtherWalker != Predecessor)
-              DoLog(3) && (Log() << Verbose(3) << "Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << "." << endl);
-            else
-              DoLog(3) && (Log() << Verbose(3) << "This is my predecessor " << *Predecessor << "." << endl);
-          }
-        } else Log() << Verbose(2) << "Is not in the restricted keyset or skipping hydrogen " << *OtherWalker << "." << endl;
-      }
-    }
-  }
-};
-
-/** prints the Bonds per Shortest Path list in UniqueFragments.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- */
-void OutputSPList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  DoLog(0) && (Log() << Verbose(0) << "Printing all found lists." << endl);
-  for(int i=1;i<Order;i++) {    // skip the root edge in the printing
-    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << "." << endl);
-    for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin();
-        Binder != FragmentSearch.BondsPerSPList[i].end();
-        ++Binder) {
-      DoLog(2) && (Log() << Verbose(2) << *Binder << endl);
-    }
-  }
-};
-
-/** Simply counts all bonds in all UniqueFragments::BondsPerSPList lists.
- * \param *out output stream
- * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
- * \param FragmentSearch UniqueFragments
- */
-int CountNumbersInBondsList(int Order, struct UniqueFragments &FragmentSearch)
-{
-  int SP = -1;  // the Root <-> Root edge must be subtracted!
-  for(int i=Order;i--;) { // sum up all found edges
-    for (UniqueFragments::BondsPerSP::const_iterator Binder = FragmentSearch.BondsPerSPList[i].begin();
-        Binder != FragmentSearch.BondsPerSPList[i].end();
-        ++Binder) {
-      SP++;
-    }
-  }
-  return SP;
-};
 
 bool KeyCompare::operator() (const KeySet SubgraphA, const KeySet SubgraphB) const
Index: src/Fragmentation/fragmentation_helpers.hpp
===================================================================
--- src/Fragmentation/fragmentation_helpers.hpp	(revision d9a032dc6846bb5d2cf9a7b5a184c2a68e344dcd)
+++ src/Fragmentation/fragmentation_helpers.hpp	(revision a03d25a95438c62d1f4eccba93c94bb3f6281096)
@@ -41,11 +41,5 @@
 int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex);
 void RemoveAllTouchedFromSnakeStack(int verbosity, KeySet *FragmentSet, int *&TouchedList, int &TouchedIndex);
-void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch);
-void FreeSPList(int Order, struct UniqueFragments &FragmentSearch);
-void SetSPList(int Order, struct UniqueFragments &FragmentSearch);
-void ResetSPList(int Order, struct UniqueFragments &FragmentSearch);
-void FillSPListandLabelVertices(int Order, struct UniqueFragments &FragmentSearch, molecule *mol, KeySet RestrictedKeySet);
-void OutputSPList(int Order, struct UniqueFragments &FragmentSearch);
-int CountNumbersInBondsList(int Order, struct UniqueFragments &FragmentSearch);
+
 int CombineAllOrderListIntoOne(Graph *&FragmentList, Graph ***FragmentLowerOrdersList, KeyStack &RootStack, molecule *mol);
 void FreeAllOrdersList(Graph ***FragmentLowerOrdersList, KeyStack &RootStack, molecule *mol);
