Index: src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp
===================================================================
--- src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
+++ src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
@@ -0,0 +1,103 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2013 University of Bonn. 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/>.
+ */
+
+/*
+ * StoreSaturatedFragmentAction.cpp
+ *
+ *  Created on: Feb 26, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Atom/atom.hpp"
+#include "CodePatterns/Log.hpp"
+#include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp"
+#include "Fragmentation/Graph.hpp"
+#include "World.hpp"
+
+#include <boost/filesystem.hpp>
+#include <algorithm>
+#include <iostream>
+#include <string>
+
+#include "Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "StoreSaturatedFragmentAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr FragmentationStoreSaturatedFragmentAction::performCall() {
+  World &world = World::getInstance();
+
+  // check for selected atoms
+  if (world.beginAtomSelection() == world.endAtomSelection()) {
+    ELOG(1, "There are not atoms selected for storing.");
+    return Action::failure;
+  }
+
+  // create single graph from selected atoms
+  Graph TotalGraph;
+  KeySet SelectedAtoms;
+  for (World::AtomSelectionConstIterator iter = world.beginAtomSelection();
+      iter != world.endAtomSelection();
+      ++iter) {
+    LOG(3, "DEBUG: Adding atom " << *iter->second << " to fragment.");
+    SelectedAtoms.insert( iter->second->getId() );
+  }
+  TotalGraph.insert( GraphPair( SelectedAtoms, NumberValuePair(1, 0.)) );
+
+  // store molecule's fragment to file
+  {
+    const enum HydrogenSaturation saturation =  params.DoSaturation.get() ? DoSaturate : DontSaturate;
+    ExportGraph_ToFiles exporter(TotalGraph, IncludeHydrogen, saturation);
+    exporter.setPrefix(params.prefix.get());
+    exporter.setOutputTypes(params.types.get());
+    exporter();
+  }
+
+  return Action::success;
+}
+
+Action::state_ptr FragmentationStoreSaturatedFragmentAction::performUndo(Action::state_ptr _state) {
+  return Action::success;
+}
+
+Action::state_ptr FragmentationStoreSaturatedFragmentAction::performRedo(Action::state_ptr _state){
+  return Action::success;
+}
+
+bool FragmentationStoreSaturatedFragmentAction::canUndo() {
+  return true;
+}
+
+bool FragmentationStoreSaturatedFragmentAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def
===================================================================
--- src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
+++ src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
@@ -0,0 +1,42 @@
+/*
+ * StoreSaturatedFragmentAction.def
+ *
+ *  Created on: Feb 26, 2013
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include <string>
+#include <vector>
+
+#include "Parameters/Validators/DummyValidator.hpp"
+#include "Parameters/Validators/STLVectorValidator.hpp"
+#include "Parameters/Validators/Specific/ParserTypeValidator.hpp"
+
+// i.e. there is an integer with variable name Z that can be found in
+// ValueStorage by the token "Z" -> first column: int, Z, "Z"
+// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
+#define paramtypes (std::string)(bool)(std::vector<std::string>)
+#define paramtokens ("store-saturated-fragment")("DoSaturate")("output-types")
+#define paramdescriptions ("name of fragment file")("do saturate dangling bonds with hydrogen")("type(s) of parsers that output fragment config files")
+#define paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(std::vector<std::string>(1, std::string("pcp"))))
+#define paramreferences (prefix)(DoSaturation)(types)
+#define paramvalids \
+(DummyValidator< std::string >()) \
+(DummyValidator< bool >()) \
+(STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator()))
+
+#undef statetypes
+#undef statereferences
+
+// some defines for all the names, you may use ACTION, STATE and PARAMS
+#define CATEGORY Fragmentation
+#define MENUNAME "fragmentation"
+#define MENUPOSITION 4
+#define ACTIONNAME StoreSaturatedFragment
+#define TOKEN "store-saturated-fragment"
+
+
+// finally the information stored in the ActionTrait specialization
+#define DESCRIPTION "store all selected atoms as a single fragment with dangling bonds satured by hydrogen"
+#undef SHORTFORM
Index: src/Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp
===================================================================
--- src/Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
+++ src/Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
@@ -0,0 +1,22 @@
+/*
+ * StoreSaturatedFragmentAction.hpp
+ *
+ *  Created on: Feb 26, 2013
+ *      Author: heber
+ */
+
+#ifndef STORESATURATEDFRAGMENTACTION_HPP_
+#define STORESATURATEDFRAGMENTACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "StoreSaturatedFragmentAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* STORESATURATEDFRAGMENTACTION_HPP_ */
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision d5b90b345dcd1931f7bfd85129e8e73c9f7fdc90)
+++ src/Actions/GlobalListOfActions.hpp	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
@@ -121,4 +121,5 @@
   (SelectionNotShapeByName) \
   (FragmentationFragmentation) \
+  (FragmentationStoreSaturatedFragment) \
   (FillRegularGrid) \
   (FillSurface) \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision d5b90b345dcd1931f7bfd85129e8e73c9f7fdc90)
+++ src/Actions/Makefile.am	(revision 5589e7e18abfdfbb10e92c1f7c654f21e9d14cbd)
@@ -211,9 +211,12 @@
 
 FRAGMENTATIONACTIONSOURCE = \
-  Actions/FragmentationAction/FragmentationAction.cpp
+  Actions/FragmentationAction/FragmentationAction.cpp \
+  Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp
 FRAGMENTATIONACTIONHEADER = \
-  Actions/FragmentationAction/FragmentationAction.hpp
+  Actions/FragmentationAction/FragmentationAction.hpp \
+  Actions/FragmentationAction/StoreSaturatedFragmentAction.hpp
 FRAGMENTATIONACTIONDEFS = \
-  Actions/FragmentationAction/FragmentationAction.def
+  Actions/FragmentationAction/FragmentationAction.def \
+  Actions/FragmentationAction/StoreSaturatedFragmentAction.def
 
 if CONDJOBMARKET
