Index: src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.cpp	(revision d9dbefd0c6ed9b0c42bd614f45520fdc3a3e188d)
+++ src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.cpp	(revision d9dbefd0c6ed9b0c42bd614f45520fdc3a3e188d)
@@ -0,0 +1,96 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2016 Frederik Heber. All rights reserved.
+ *
+ *
+ *   This file is part of MoleCuilder.
+ *
+ *    MoleCuilder is free software: you can redistribute it and/or modify
+ *    it under the terms of the GNU General Public License as published by
+ *    the Free Software Foundation, either version 2 of the License, or
+ *    (at your option) any later version.
+ *
+ *    MoleCuilder is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *    GNU General Public License for more details.
+ *
+ *    You should have received a copy of the GNU General Public License
+ *    along with MoleCuilder.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * ExportGraph_ToAtomFragments.cpp
+ *
+ *  Created on: Mar 07, 2016
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+// boost asio required before MemDebug due to placement new
+#include <boost/asio.hpp>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp"
+
+#include <algorithm>
+
+#include "Fragmentation/Homology/AtomFragmentsMap.hpp"
+#include "Fragmentation/KeySet.hpp"
+#include "World.hpp"
+
+ExportGraph_ToAtomFragments::ExportGraph_ToAtomFragments(
+    const Graph &_graph,
+    const enum HydrogenTreatment _treatment,
+    const enum HydrogenSaturation _saturation,
+    const SaturatedFragment::GlobalSaturationPositions_t &_globalsaturationpositions) :
+    ExportGraph(_graph, _treatment, _saturation,_globalsaturationpositions)
+{}
+
+ExportGraph_ToAtomFragments::~ExportGraph_ToAtomFragments()
+{}
+
+void ExportGraph_ToAtomFragments::operator()()
+{
+  AtomFragmentsMap &atomfragments = AtomFragmentsMap::getInstance();
+  LOG(1, "INFO: Creating " << TotalGraph.size() << " possible fragments.");
+
+  // go through all fragments, output to stream and create job therefrom
+  ExportGraph::SaturatedFragment_ptr CurrentFragment = getNextFragment();
+  for (; (CurrentFragment != NULL) && (CurrentFragment->getKeySet() != ExportGraph::EmptySet);
+      CurrentFragment = getNextFragment()) {
+    const KeySet &set = CurrentFragment->getKeySet();
+    LOG(3, "DEBUG: Creating fragment keysets for set " << set << ".");
+    {
+      // order is the same as the number of non-hydrogen atoms
+      const KeySet &keyset = CurrentFragment->getKeySet();
+      const KeySet &fullmolecule = CurrentFragment->getFullMolecule();
+      const KeySet &saturationhydrogens = CurrentFragment->getSaturationHydrogens();
+      AtomFragmentsMap::indices_t forceindices(fullmolecule.begin(), fullmolecule.end());
+      {
+        // replace all saturated hydrogen indices by "-1"
+        for (AtomFragmentsMap::indices_t::iterator iter = forceindices.begin();
+            iter != forceindices.end();
+            ++iter)
+          if (saturationhydrogens.find(*iter) != saturationhydrogens.end())
+            *iter = -1;
+      }
+      const bool status = atomfragments.addFullKeyset(keyset, forceindices);
+      if (!status)
+        ELOG(1, "Something went wrong with insertion for keyset " << keyset);
+    }
+    // store force index reference file
+    // explicitly release fragment
+    CurrentFragment.reset();
+  }
+  if (CurrentFragment == NULL) {
+    ELOG(1, "Some error while obtaining the next fragment occured.");
+    return;
+  }
+}
Index: src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp	(revision d9dbefd0c6ed9b0c42bd614f45520fdc3a3e188d)
+++ src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp	(revision d9dbefd0c6ed9b0c42bd614f45520fdc3a3e188d)
@@ -0,0 +1,47 @@
+/*
+ * ExportGraph_ToAtomFragments.hpp
+ *
+ *  Created on: Mar 07, 2016
+ *      Author: heber
+ */
+
+#ifndef EXPORTGRAPH_TOATOMFRAGMENTS_HPP_
+#define EXPORTGRAPH_TOATOMFRAGMENTS_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
+#include "Fragmentation/Exporters/ExportGraph.hpp"
+
+/** ExportGraph_ToAtomFragments implements an ExportGraph by sending the created
+ * configurations of fragmentary systems as keysets and forcekeysets, i.e.
+ * including excluded hydrogens, to AtomFragmentsMap.
+ *
+ */
+class ExportGraph_ToAtomFragments : public ExportGraph
+{
+public:
+  /** Constructor for ExportGraph_ToAtomFragments.
+   *
+   * Sets default level.
+   *
+   * \param _graph Graph with all KeySet's
+   * \param _treatment whether hydrogen is excluded in the _graph or not
+   * \param _saturation whether we saturate dangling bonds or not
+   * \param _globalsaturationpositions possibly empty map with global information
+   *        where to place saturation hydrogens to fulfill consistency principle
+   */
+  ExportGraph_ToAtomFragments(
+      const Graph &_graph,
+      const enum HydrogenTreatment _treatment,
+      const enum HydrogenSaturation _saturation,
+      const SaturatedFragment::GlobalSaturationPositions_t &_globalsaturationpositions);
+  virtual ~ExportGraph_ToAtomFragments();
+
+	void operator()();
+};
+
+#endif /* EXPORTGRAPH_TOATOMFRAGMENTS_HPP_ */
