Index: configure.ac
===================================================================
--- configure.ac	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ configure.ac	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -164,12 +164,4 @@
 AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
 
-# add replacement/saturation hydrogen or not 
-AC_ARG_ENABLE([hydrogen],AS_HELP_STRING([--enable-hydrogen],[Adding saturation hydrogen (default is yes)]),
-              [enable_hydrogen=$enableval], [enable_hydrogen=yes])
-if test x"$enable_hydrogen" = xyes; then
-  AC_DEFINE(ADDHYDROGEN,1, ["Adding saturation hydrogen"])
-  AC_SUBST(ADDHYDROGEN)
-fi
-
 # use CppUnit TestRunner or not
 AC_ARG_ENABLE([ecut],AS_HELP_STRING([--enable-ecut],[Use ECut TestRunnerClient (default is no)]),
Index: src/Actions/FragmentationAction/FragmentationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Actions/FragmentationAction/FragmentationAction.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -26,4 +26,5 @@
 #include "CodePatterns/Verbose.hpp"
 #include "Fragmentation/Fragmentation.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Graph/DepthFirstSearchAnalysis.hpp"
 #include "molecule.hpp"
@@ -63,5 +64,5 @@
     start = clock();
     if (mol->hasBondStructure()) {
-      Fragmentation Fragmenter(mol);
+      Fragmentation Fragmenter(mol, params.DoSaturation ? DoSaturate : DontSaturate);
       Fragmenter.setOutputTypes(params.types);
       ExitFlag = Fragmenter.FragmentMolecule(params.order, params.prefix, DFS);
Index: src/Actions/FragmentationAction/FragmentationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.def	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Actions/FragmentationAction/FragmentationAction.def	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -13,9 +13,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (std::string)(double)(int)(std::vector<std::string>)
-#define paramtokens ("fragment-molecule")("distance")("order")("output-types")
-#define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("type(s) of parsers that output fragment config files")
-#define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("pcp tremolo xyz")
-#define paramreferences (prefix)(distance)(order)(types)
+#define paramtypes (std::string)(double)(int)(bool)(std::vector<std::string>)
+#define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("output-types")
+#define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files")
+#define paramdefaults (NODEFAULT)(NODEFAULT)(NODEFAULT)("1")("pcp tremolo xyz")
+#define paramreferences (prefix)(distance)(order)(DoSaturation)(types)
 
 #undef statetypes
Index: src/Actions/GraphAction/DepthFirstSearchAction.cpp
===================================================================
--- src/Actions/GraphAction/DepthFirstSearchAction.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Actions/GraphAction/DepthFirstSearchAction.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -25,4 +25,5 @@
 #include "CodePatterns/Log.hpp"
 #include "CodePatterns/Verbose.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Graph/CyclicStructureAnalysis.hpp"
 #include "Graph/DepthFirstSearchAnalysis.hpp"
@@ -63,5 +64,5 @@
       LocalBackEdgeStack = new std::deque<bond *>; // no need to have it Subgraphs->Leaf->BondCount size
       DFS.PickLocalBackEdges(ListOfAtoms, LocalBackEdgeStack);
-      CyclicStructureAnalysis CycleAnalysis;
+      CyclicStructureAnalysis CycleAnalysis(params.DoSaturation ? DoSaturate : DontSaturate);
       CycleAnalysis(LocalBackEdgeStack);
       delete(LocalBackEdgeStack);
Index: src/Actions/GraphAction/DepthFirstSearchAction.def
===================================================================
--- src/Actions/GraphAction/DepthFirstSearchAction.def	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Actions/GraphAction/DepthFirstSearchAction.def	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -12,9 +12,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (double)
-#define paramtokens ("depth-first-search")
-#define paramdescriptions ("maximum distance to look for neighbors")
-#undef paramdefaults
-#define paramreferences (distance)
+#define paramtypes (double)(bool)
+#define paramtokens ("depth-first-search")("DoSaturate")
+#define paramdescriptions ("maximum distance to look for neighbors")("whether to treat hydrogen special or not")
+#define paramdefaults (NODEFAULT)("1")
+#define paramreferences (distance)(DoSaturation)
 
 #undef statetypes
Index: src/Fragmentation/BondsPerShortestPath.cpp
===================================================================
--- src/Fragmentation/BondsPerShortestPath.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/BondsPerShortestPath.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -101,6 +101,7 @@
  * \param _RootKeyNr index of root node
  * \param RestrictedKeySet Restricted vertex set to use in context of molecule
- */
-void BondsPerShortestPath::FillSPListandLabelVertices(int _RootKeyNr, KeySet &RestrictedKeySet)
+ * \param saturation this tells whether to treat hydrogen special or not.
+ */
+void BondsPerShortestPath::FillSPListandLabelVertices(int _RootKeyNr, KeySet &RestrictedKeySet, const enum HydrogenSaturation saturation)
 {
   // Actually, we should construct a spanning tree vom the root atom and select all edges therefrom and put them into
@@ -146,8 +147,6 @@
         OtherWalker = (*Runner)->GetOtherAtom(Walker);
         if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end())
-  #ifdef ADDHYDROGEN
-         && (OtherWalker->getType()->getAtomicNumber() != 1)
-  #endif
-                                                              ) {  // skip hydrogens and restrict to fragment
+            // skip hydrogens if desired and restrict to fragment
+            && ((saturation == DontSaturate) || (OtherWalker->getType()->getAtomicNumber() != 1))) {
           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)
Index: src/Fragmentation/BondsPerShortestPath.hpp
===================================================================
--- src/Fragmentation/BondsPerShortestPath.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/BondsPerShortestPath.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -13,4 +13,6 @@
 #include <config.h>
 #endif
+
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 
 #include <list>
@@ -31,5 +33,5 @@
   void SetSPList(atom *_Root);
   void ResetSPList();
-  void FillSPListandLabelVertices(int _RootKeyNr, KeySet &RestrictedKeySet);
+  void FillSPListandLabelVertices(int _RootKeyNr, KeySet &RestrictedKeySet, const enum HydrogenSaturation saturation);
   void OutputSPList();
   int CountNumbersInBondsList();
Index: src/Fragmentation/Fragmentation.cpp
===================================================================
--- src/Fragmentation/Fragmentation.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/Fragmentation.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -45,7 +45,10 @@
 /** Constructor of class Fragmentation.
  *
- */
-Fragmentation::Fragmentation(molecule *_mol) :
-  mol(_mol)
+ * \param _mol molecule for internal use (looking up atoms)
+ * \param _saturation whether to treat hydrogen special and saturate dangling bonds or not
+ */
+Fragmentation::Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation) :
+  mol(_mol),
+  saturation(_saturation)
 {}
 
@@ -90,9 +93,15 @@
 
   DoLog(0) && (Log() << Verbose(0) << endl);
-#ifdef ADDHYDROGEN
-  DoLog(0) && (Log() << Verbose(0) << "I will treat hydrogen special and saturate dangling bonds with it." << endl);
-#else
-  DoLog(0) && (Log() << Verbose(0) << "Hydrogen is treated just like the rest of the lot." << endl);
-#endif
+  switch (saturation) {
+    case DoSaturate:
+      DoLog(0) && (Log() << Verbose(0) << "I will treat hydrogen special and saturate dangling bonds with it." << endl);
+      break;
+    case DontSaturate:
+      DoLog(0) && (Log() << Verbose(0) << "Hydrogen is treated just like the rest of the lot." << endl);
+      break;
+    default:
+      ASSERT(0, "Fragmentation::FragmentMolecule() - there is a saturation setting which I have no idea about.");
+      break;
+  }
 
   // ++++++++++++++++++++++++++++ INITIAL STUFF: Bond structure analysis, file parsing, ... ++++++++++++++++++++++++++++++++++++++++++
@@ -151,5 +160,5 @@
     AtomMask[mol->getAtomCount()] = true;   // last plus one entry is used as marker that we have been through this loop once already in CheckOrderAtSite()
     // ===== 6b. fill RootStack for each subgraph (second adaptivity check) =====
-    Subgraphs->next->FillRootStackForSubgraphs(RootStack, AtomMask, (FragmentCounter = 0));
+    Subgraphs->next->FillRootStackForSubgraphs(RootStack, AtomMask, (FragmentCounter = 0), saturation);
 
     // ===== 7. fill the bond fragment list =====
@@ -359,5 +368,5 @@
       FragmentLowerOrdersList[RootNr][0] = new Graph;
       FragmentSearch.PrepareForPowersetGeneration(1., FragmentLowerOrdersList[RootNr][0], Walker);
-      NumMoleculesOfOrder[RootNr] = PSG(CompleteMolecule);
+      NumMoleculesOfOrder[RootNr] = PSG(CompleteMolecule, saturation);
 
       // output resulting number
@@ -487,7 +496,5 @@
       DoeLog(2) && (eLog()<< Verbose(2) << "Unable to parse file, incrementing all." << endl);
       for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-    #ifdef ADDHYDROGEN
-        if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen
-    #endif
+        if ((saturation == DontSaturate) || ((*iter)->getType()->getAtomicNumber() != 1)) // skip hydrogen
         {
           AtomMask[(*iter)->getNr()] = true;  // include all (non-hydrogen) atoms
@@ -502,7 +509,5 @@
   } else { // global increase of Bond Order
     for(molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
-  #ifdef ADDHYDROGEN
-      if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen
-  #endif
+      if ((saturation == DontSaturate) || ((*iter)->getType()->getAtomicNumber() != 1)) // skip hydrogen
       {
         AtomMask[(*iter)->getNr()] = true;  // include all (non-hydrogen) atoms
@@ -670,7 +675,4 @@
   atom *FatherOfRunner = NULL;
 
-#ifdef ADDHYDROGEN
-  molecule::const_iterator runner;
-#endif
   // we increment the iter just before skipping the hydrogen
   for (molecule::const_iterator iter = Leaf->begin(); iter != Leaf->end();) {
@@ -700,9 +702,8 @@
         } else {
 //          Log() << Verbose(0) << ", who has no son in this fragment molecule." << endl;
-#ifdef ADDHYDROGEN
           //Log() << Verbose(3) << "Adding Hydrogen to " << (*iter)->Name << " and a bond in between." << endl;
-          if(!Leaf->AddHydrogenReplacementAtom((*BondRunner), (*iter), FatherOfRunner, OtherFather, IsAngstroem))
-            exit(1);
-#endif
+          if (saturation == DoSaturate)
+            if (!Leaf->AddHydrogenReplacementAtom((*BondRunner), (*iter), FatherOfRunner, OtherFather, IsAngstroem))
+              exit(1);
           //NumBonds[(*iter)->getNr()] += Binder->BondDegree;
         }
@@ -715,9 +716,9 @@
     }
     ++iter;
-#ifdef ADDHYDROGEN
-    while ((iter != Leaf->end()) && ((*iter)->getType()->getAtomicNumber() == 1)){ // skip added hydrogen
-      iter++;
-    }
-#endif
+    if (saturation == DoSaturate) {
+      while ((iter != Leaf->end()) && ((*iter)->getType()->getAtomicNumber() == 1)){ // skip added hydrogen
+        iter++;
+      }
+    }
   }
 };
Index: src/Fragmentation/Fragmentation.hpp
===================================================================
--- src/Fragmentation/Fragmentation.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/Fragmentation.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -18,4 +18,5 @@
 #include "Graph/DepthFirstSearchAnalysis.hpp"
 
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Fragmentation/fragmentation_helpers.hpp"
 
@@ -31,5 +32,5 @@
 {
 public:
-  Fragmentation(molecule *_mol);
+  Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation);
   ~Fragmentation();
 
@@ -58,4 +59,6 @@
   //!> pointer to molecule that is fragmented
   molecule *mol;
+  //!> whether to saturate dangling bonds with hydrogen and hence treat hydrogen special
+  const enum HydrogenSaturation saturation;
   //!> list of parser types for which a configuration file per fragment is stored
   std::vector<std::string> typelist;
Index: src/Fragmentation/HydrogenSaturation_enum.hpp
===================================================================
--- src/Fragmentation/HydrogenSaturation_enum.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
+++ src/Fragmentation/HydrogenSaturation_enum.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -0,0 +1,22 @@
+/*
+ * HydrogenSaturation_enum.hpp
+ *
+ *  Created on: Oct 26, 2011
+ *      Author: heber
+ */
+
+#ifndef HYDROGENSATURATION_ENUM_HPP_
+#define HYDROGENSATURATION_ENUM_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+enum HydrogenSaturation {
+  DontSaturate, //!< don't saturate and don't treat hydrogen special in any way
+  DoSaturate,   //!< do saturate dangling bonds and hence also treat hydrogen special (neglect it)
+};
+
+
+#endif /* HYDROGENSATURATION_ENUM_HPP_ */
Index: src/Fragmentation/PowerSetGenerator.cpp
===================================================================
--- src/Fragmentation/PowerSetGenerator.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/PowerSetGenerator.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -172,8 +172,9 @@
  * with SP of 2, then those with SP of 3, then those with SP of 4 and so on.
  * \param RestrictedKeySet Restricted vertex set to use in context of molecule
+ * \param saturation whether to treat hydrogen special or not
  * \return number of inserted fragments
  * \note ShortestPathList in FragmentSearch structure is probably due to NumberOfAtomsSPLevel and SP not needed anymore
  */
-int PowerSetGenerator::operator()(KeySet &RestrictedKeySet)
+int PowerSetGenerator::operator()(KeySet &RestrictedKeySet, const enum HydrogenSaturation saturation)
 {
   int Counter = FragmentSearch->FragmentCounter; // mark current value of counter
@@ -185,5 +186,5 @@
 
   // do a BFS search to fill the SP lists and label the found vertices
-  BondsPerSPList.FillSPListandLabelVertices(FragmentSearch->getRoot()->GetTrueFather()->getNr(), RestrictedKeySet);
+  BondsPerSPList.FillSPListandLabelVertices(FragmentSearch->getRoot()->GetTrueFather()->getNr(), RestrictedKeySet, saturation);
 
   // outputting all list for debugging
Index: src/Fragmentation/PowerSetGenerator.hpp
===================================================================
--- src/Fragmentation/PowerSetGenerator.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Fragmentation/PowerSetGenerator.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -18,4 +18,5 @@
 
 #include "Fragmentation/BondsPerShortestPath.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 
 class bond;
@@ -29,5 +30,5 @@
 
   void SPFragmentGenerator(int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder);
-  int operator()(KeySet &RestrictedKeySet);
+  int operator()(KeySet &RestrictedKeySet, const enum HydrogenSaturation saturation);
   void RemoveAllTouchedFromSnakeStack(int verbosity, KeySet *FragmentSet, int *&TouchedList, int &TouchedIndex);
   int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex);
Index: src/Graph/BreadthFirstSearchAdd.cpp
===================================================================
--- src/Graph/BreadthFirstSearchAdd.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Graph/BreadthFirstSearchAdd.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -32,7 +32,8 @@
 
 
-BreadthFirstSearchAdd::BreadthFirstSearchAdd(atom *&_Root, int _BondOrder, bool _IsAngstroem) :
+BreadthFirstSearchAdd::BreadthFirstSearchAdd(atom *&_Root, int _BondOrder, bool _IsAngstroem, const enum HydrogenSaturation _saturation) :
   BondOrder(_BondOrder),
   Root(_Root),
+  saturation(_saturation),
   IsAngstroem(_IsAngstroem)
 {
@@ -100,8 +101,7 @@
         AddedBondList[Binder] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder);
       } else {
-#ifdef ADDHYDROGEN
-        if (!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem))
-        exit(1);
-#endif
+        if (saturation == DoSaturate)
+          if (!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem))
+            exit(1);
       }
     }
@@ -118,8 +118,7 @@
       AddedBondList[Binder] = Mol->CopyBond(AddedAtomList[Walker->getNr()], AddedAtomList[OtherAtom->getNr()], Binder);
     } else { // if it's root bond it has to broken (otherwise we would not create the fragments)
-#ifdef ADDHYDROGEN
-      if(!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem))
-      exit(1);
-#endif
+      if (saturation == DoSaturate)
+        if(!Mol->AddHydrogenReplacementAtom(Binder, AddedAtomList[Walker->getNr()], Walker, OtherAtom, IsAngstroem))
+          exit(1);
     }
   }
Index: src/Graph/BreadthFirstSearchAdd.hpp
===================================================================
--- src/Graph/BreadthFirstSearchAdd.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Graph/BreadthFirstSearchAdd.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -18,4 +18,5 @@
 
 #include "Bond/GraphEdge.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Helpers/defs.hpp"
 #include "types.hpp"
@@ -28,5 +29,5 @@
 {
 public:
-  BreadthFirstSearchAdd(atom *&_Root, int _BondOrder, bool _IsAngstroem);
+  BreadthFirstSearchAdd(atom *&_Root, int _BondOrder, bool _IsAngstroem, const enum HydrogenSaturation _saturation);
   ~BreadthFirstSearchAdd();
 
@@ -71,4 +72,8 @@
   std::map<bond *, bond *> AddedBondList; //!< maps from father bond to son
 
+  //!> whether to treat hydrogen special or not
+  const enum HydrogenSaturation saturation;
+
+  //!> is angstroem our unit of length
   bool IsAngstroem;
 };
Index: src/Graph/CyclicStructureAnalysis.cpp
===================================================================
--- src/Graph/CyclicStructureAnalysis.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Graph/CyclicStructureAnalysis.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -31,5 +31,6 @@
 #include "molecule.hpp"
 
-CyclicStructureAnalysis::CyclicStructureAnalysis()
+CyclicStructureAnalysis::CyclicStructureAnalysis(const enum HydrogenSaturation _saturation) :
+  saturation(_saturation)
 {}
 
@@ -101,29 +102,25 @@
       if ((*Runner) != BackEdge) { // only walk along DFS spanning tree (otherwise we always find SP of one being backedge Binder)
         OtherAtom = (*Runner)->GetOtherAtom(Walker);
-#ifdef ADDHYDROGEN
-        if (OtherAtom->getType()->getAtomicNumber() != 1) {
-#endif
-        LOG(2, "INFO: Current OtherAtom is: " << OtherAtom->getName() << " for bond " << *(*Runner) << "." << endl);
-        if (ColorList[OtherAtom->getNr()] == GraphEdge::white) {
-          TouchedStack.push_front(OtherAtom);
-          ColorList[OtherAtom->getNr()] = GraphEdge::lightgray;
-          PredecessorList[OtherAtom->getNr()] = Walker; // Walker is the predecessor
-          ShortestPathList[OtherAtom->getNr()] = ShortestPathList[Walker->getNr()] + 1;
-          LOG(2, "INFO: Coloring OtherAtom " << OtherAtom->getName() << " lightgray, its predecessor is " << Walker->getName() << " and its Shortest Path is " << ShortestPathList[OtherAtom->getNr()] << " egde(s) long." << endl);
-          //if (ShortestPathList[OtherAtom->getNr()] < MinimumRingSize[Walker->GetTrueFather()->getNr()]) { // Check for maximum distance
-          LOG(3, "ACCEPT: Putting OtherAtom into queue." << endl);
-          BFSStack.push_front(OtherAtom);
-          //}
+        if ((saturation == DontSaturate) || (OtherAtom->getType()->getAtomicNumber() != 1)) {
+          LOG(2, "INFO: Current OtherAtom is: " << OtherAtom->getName() << " for bond " << *(*Runner) << "." << endl);
+          if (ColorList[OtherAtom->getNr()] == GraphEdge::white) {
+            TouchedStack.push_front(OtherAtom);
+            ColorList[OtherAtom->getNr()] = GraphEdge::lightgray;
+            PredecessorList[OtherAtom->getNr()] = Walker; // Walker is the predecessor
+            ShortestPathList[OtherAtom->getNr()] = ShortestPathList[Walker->getNr()] + 1;
+            LOG(2, "INFO: Coloring OtherAtom " << OtherAtom->getName() << " lightgray, its predecessor is " << Walker->getName() << " and its Shortest Path is " << ShortestPathList[OtherAtom->getNr()] << " egde(s) long." << endl);
+            //if (ShortestPathList[OtherAtom->getNr()] < MinimumRingSize[Walker->GetTrueFather()->getNr()]) { // Check for maximum distance
+            LOG(3, "ACCEPT: Putting OtherAtom into queue." << endl);
+            BFSStack.push_front(OtherAtom);
+            //}
+          } else {
+            LOG(3, "REJECT: Not Adding, has already been visited." << endl);
+          }
+          if (OtherAtom == Root)
+            break;
         } else {
-          LOG(3, "REJECT: Not Adding, has already been visited." << endl);
+          LOG(2, "INFO: Skipping hydrogen atom " << *OtherAtom << "." << endl);
+          ColorList[OtherAtom->getNr()] = GraphEdge::black;
         }
-        if (OtherAtom == Root)
-          break;
-#ifdef ADDHYDROGEN
-      } else {
-        LOG(2, "INFO: Skipping hydrogen atom " << *OtherAtom << "." << endl);
-        ColorList[OtherAtom->getNr()] = GraphEdge::black;
-      }
-#endif
       } else {
         LOG(2, "REJECT: Bond " << *(*Runner) << " not Visiting, is the back edge." << endl);
Index: src/Graph/CyclicStructureAnalysis.hpp
===================================================================
--- src/Graph/CyclicStructureAnalysis.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/Graph/CyclicStructureAnalysis.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -18,4 +18,5 @@
 
 #include "Bond/GraphEdge.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Helpers/defs.hpp"
 #include "types.hpp"
@@ -28,5 +29,5 @@
 {
 public:
-  CyclicStructureAnalysis();
+  explicit CyclicStructureAnalysis(const enum HydrogenSaturation _saturation);
   ~CyclicStructureAnalysis();
 
@@ -58,4 +59,7 @@
   atom *Root;
 
+  //!> whether to treat hydrogen special or not
+  const enum HydrogenSaturation saturation;
+
   bool BackStepping;
   int CurrentGraphNr;
Index: src/MoleculeLeafClass.cpp
===================================================================
--- src/MoleculeLeafClass.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/MoleculeLeafClass.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -105,7 +105,8 @@
  * \param *AtomMask defines true/false per global Atom::Nr to mask in/out each nuclear site
  * \param &FragmentCounter counts through the fragments in this MoleculeLeafClass
+ * \param saturation whether to treat hydrogen special or not
  * \return true - stack is non-empty, fragmentation necessary, false - stack is empty, no more sites to update
  */
-bool MoleculeLeafClass::FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter)
+bool MoleculeLeafClass::FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter, const enum HydrogenSaturation saturation)
 {
   atom *Father = NULL;
@@ -118,11 +119,9 @@
         Father = (*iter)->GetTrueFather();
         if (AtomMask[Father->getNr()]) // apply mask
-#ifdef ADDHYDROGEN
-          if ((*iter)->getType()->getAtomicNumber() != 1) // skip hydrogen
-#endif
-          RootStack[FragmentCounter].push_front((*iter)->getNr());
+          if ((saturation == DontSaturate) || ((*iter)->getType()->getAtomicNumber() != 1)) // skip hydrogen
+            RootStack[FragmentCounter].push_front((*iter)->getNr());
       }
       if (next != NULL)
-        next->FillRootStackForSubgraphs(RootStack, AtomMask, ++FragmentCounter);
+        next->FillRootStackForSubgraphs(RootStack, AtomMask, ++FragmentCounter, saturation);
     } else {
       DoLog(1) && (Log() << Verbose(1) << "Rootstack[" << FragmentCounter << "] is NULL." << endl);
Index: src/MoleculeLeafClass.hpp
===================================================================
--- src/MoleculeLeafClass.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/MoleculeLeafClass.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -14,4 +14,5 @@
 
 #include "Fragmentation/fragmentation_helpers.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 
 class atom;
@@ -37,5 +38,5 @@
 
   bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
-  bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
+  bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter, const enum HydrogenSaturation saturation);
   bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
   void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
Index: src/molecule.hpp
===================================================================
--- src/molecule.hpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/molecule.hpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -27,4 +27,5 @@
 #include "CodePatterns/ObservedIterator.hpp"
 #include "CodePatterns/Cacheable.hpp"
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Helpers/defs.hpp"
 #include "Formula.hpp"
@@ -186,5 +187,5 @@
   void Align(Vector *n);
   void Scale(const double ** const factor);
-  void DeterminePeriodicCenter(Vector &center);
+  void DeterminePeriodicCenter(Vector &center, const enum HydrogenSaturation _saturation = DoSaturate);
   Vector * DetermineCenterOfGravity() const;
   Vector * DetermineCenterOfAll() const;
Index: src/molecule_geometry.cpp
===================================================================
--- src/molecule_geometry.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/molecule_geometry.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -363,6 +363,7 @@
 /** Determines center of molecule (yet not considering atom masses).
  * \param center reference to return vector
- */
-void molecule::DeterminePeriodicCenter(Vector &center)
+ * \param saturation whether to treat hydrogen special or not
+ */
+void molecule::DeterminePeriodicCenter(Vector &center, const enum HydrogenSaturation saturation)
 {
   const RealSpaceMatrix &matrix = World::getInstance().getDomain().getM();
@@ -378,7 +379,5 @@
     flag = true;
     for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
-#ifdef ADDHYDROGEN
-      if ((*iter)->getType()->getAtomicNumber() != 1) {
-#endif
+      if ((saturation == DontSaturate) || ((*iter)->getType()->getAtomicNumber() != 1)) {
         Testvector = inversematrix * (*iter)->getPosition();
         Translationvector.Zero();
@@ -406,19 +405,19 @@
         Center += Testvector;
         Log() << Verbose(1) << "vector is: " << Testvector << endl;
-#ifdef ADDHYDROGEN
-        // now also change all hydrogens
-        for (BondList::const_iterator Runner = ListOfBonds.begin();
-            Runner != ListOfBonds.end();
-            ++Runner) {
-          if ((*Runner)->GetOtherAtom((*iter))->getType()->getAtomicNumber() == 1) {
-            Testvector = inversematrix * (*Runner)->GetOtherAtom((*iter))->getPosition();
-            Testvector += Translationvector;
-            Testvector *= matrix;
-            Center += Testvector;
-            Log() << Verbose(1) << "Hydrogen vector is: " << Testvector << endl;
+        if (saturation == DoSaturate) {
+          // now also change all hydrogens
+          for (BondList::const_iterator Runner = ListOfBonds.begin();
+              Runner != ListOfBonds.end();
+              ++Runner) {
+            if ((*Runner)->GetOtherAtom((*iter))->getType()->getAtomicNumber() == 1) {
+              Testvector = inversematrix * (*Runner)->GetOtherAtom((*iter))->getPosition();
+              Testvector += Translationvector;
+              Testvector *= matrix;
+              Center += Testvector;
+              Log() << Verbose(1) << "Hydrogen vector is: " << Testvector << endl;
+            }
           }
         }
       }
-#endif
     }
   } while (!flag);
Index: src/moleculelist.cpp
===================================================================
--- src/moleculelist.cpp	(revision 99b0dc7573c545c2d1ab699c79e875df4d992cb9)
+++ src/moleculelist.cpp	(revision 07a47e0c167bba50906b5cc3e9289ec6e7f1c6db)
@@ -521,10 +521,8 @@
   ofstream outputFragment;
   std::string FragmentName;
-  char PathBackup[MAXSTRINGSIZE];
   bool result = true;
   bool intermediateResult = true;
   Vector BoxDimension;
   char *FragmentNumber = NULL;
-  char *path = NULL;
   int FragmentCounter = 0;
   ofstream output;
