Index: src/Actions/FragmentationAction/FragmentationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Actions/FragmentationAction/FragmentationAction.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -75,7 +75,9 @@
   LOG(0, "STATUS: Fragmenting molecular system with current connection matrix maximum bond distance "
       << params.distance.get() << " up to "
-      << params.order.get() << " order. Fragment files begin with "
-      << params.prefix.get() << " and are stored as: "
-      << params.types.get() << "." << std::endl);
+      << params.order.get() << " order. ");
+  if (params.types.get().size() != 0)
+    LOG(0, "STATUS: Fragment files begin with "
+        << params.prefix.get() << " and are stored as: "
+        << params.types.get() << "." << std::endl);
 
   // check for selected atoms
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -60,5 +60,4 @@
 #include "Fragmentation/Automation/FragmentationResults.hpp"
 #include "Fragmentation/Automation/MPQCFragmentController.hpp"
-#include "Fragmentation/Automation/parseKeySetFile.hpp"
 #include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
 #include "Fragmentation/Automation/VMGFragmentController.hpp"
@@ -224,24 +223,17 @@
  *
  * @param fragmentData MPQCData resulting from the jobs, associated to job id
- * @param KeySetFilename filename with keysets to associate forces correctly
+ * @param MatrixNrLookup map with enumerated jobids
+ * @param KeySet KeySets of all (non-hydrogen) atoms
+ * @param ForceKeySet KeySets of all atoms except those added by saturation
  * @param NoAtoms total number of atoms
- * @param full_sample summed up charge from fragments on return
  */
 bool printReceivedMPQCResults(
     const std::map<JobId_t, MPQCData> &fragmentData,
-    const std::string &KeySetFilename,
+    const std::map< JobId_t, size_t > MatrixNrLookup,
+    KeySetsContainer KeySet,
+    const KeySetsContainer &ForceKeySet,
     size_t NoAtoms)
 {
-  // create a vector of all job ids
-  std::vector<JobId_t> jobids;
-  std::transform(fragmentData.begin(),fragmentData.end(),
-      std::back_inserter(jobids),
-      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
-  );
-
-  // create lookup from job nr to fragment number
-  size_t FragmentCounter = 0;
-  const std::map< JobId_t, size_t > MatrixNrLookup=
-      createMatrixNrLookup(jobids, FragmentCounter);
+  size_t FragmentCounter = MatrixNrLookup.size();
 
   // place results into maps
@@ -253,11 +245,5 @@
   if (!Energy.InitialiseIndices()) return false;
 
-  if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
-
-  // initialise keysets
-  KeySetsContainer KeySet;
-  parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);
-  KeySetsContainer ForceKeySet;
-  parseKeySetFile(ForceKeySet, KeySetFilename, FragmentCounter, HydrogenKeySets);
+  if (!Force.ParseIndices(ForceKeySet)) return false;
 
   // combine all found data
@@ -295,4 +281,74 @@
 
   return true;
+}
+
+/** Print MPQCData from received results.
+ *
+ * @param fragmentData MPQCData resulting from the jobs, associated to job id
+ * @param KeySetFilename filename with keysets to associate forces correctly
+ * @param NoAtoms total number of atoms
+ */
+bool printReceivedMPQCResults(
+    const std::map<JobId_t, MPQCData> &fragmentData,
+    const std::string &KeySetFilename,
+    size_t NoAtoms)
+{
+  // create a vector of all job ids
+  std::vector<JobId_t> jobids;
+  std::transform(fragmentData.begin(),fragmentData.end(),
+      std::back_inserter(jobids),
+      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
+  );
+
+  // create lookup from job nr to fragment number
+  size_t FragmentCounter = 0;
+  const std::map< JobId_t, size_t > MatrixNrLookup =
+      createMatrixNrLookup(jobids, FragmentCounter);
+
+  // initialise keysets
+  KeySetsContainer KeySet;
+  parseKeySetFile(KeySet, KeySetFilename, FragmentCounter, NonHydrogenKeySets);
+  KeySetsContainer ForceKeySet;
+  parseKeySetFile(ForceKeySet, KeySetFilename, FragmentCounter, HydrogenKeySets);
+
+  return printReceivedMPQCResults(
+      fragmentData,
+      MatrixNrLookup,
+      KeySet,
+      ForceKeySet,
+      NoAtoms);
+}
+
+/** Print MPQCData from received results.
+ *
+ * @param fragmentData MPQCData resulting from the jobs, associated to job id
+ * @param KeySet KeySets of all (non-hydrogen) atoms
+ * @param ForceKeySet KeySets of all atoms except those added by saturation
+ * @param NoAtoms total number of atoms
+ */
+bool printReceivedMPQCResults(
+    const std::map<JobId_t, MPQCData> &fragmentData,
+    const KeySetsContainer &KeySet,
+    const KeySetsContainer &ForceKeySet,
+    size_t NoAtoms)
+{
+  // create a vector of all job ids
+  std::vector<JobId_t> jobids;
+  std::transform(fragmentData.begin(),fragmentData.end(),
+      std::back_inserter(jobids),
+      boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
+  );
+
+  // create lookup from job nr to fragment number
+  size_t FragmentCounter = 0;
+  const std::map< JobId_t, size_t > MatrixNrLookup =
+      createMatrixNrLookup(jobids, FragmentCounter);
+
+  return printReceivedMPQCResults(
+      fragmentData,
+      MatrixNrLookup,
+      KeySet,
+      ForceKeySet,
+      NoAtoms);
 }
 
@@ -382,6 +438,5 @@
 bool appendToHomologyFile(
     const boost::filesystem::path &homology_file,
-    const FragmentationResults &results,
-    const std::string &KeySetFilename)
+    const FragmentationResults &results)
 {
   /// read homology container (if present)
@@ -479,31 +534,4 @@
   // TODO: Have io_service run in second thread and merge with current again eventually
 
-  // check some things prior to work
-  enum OutputType_t {
-    ToFiles,
-    ToJobs,
-    ToNone
-  };
-  enum OutputType_t outputtype = ToNone;
-  if (params.jobfiles.get().size() != 0) {
-    // we got no job files, hence we use FragmentJobQueue
-    if (params.path.get().size() == 0) {
-      ELOG(1, "Missing path to fragment files.");
-      return Action::failure;
-    }
-    outputtype = ToFiles;
-
-    // parse in fragment-jobs if given
-    if(!FragmentJobQueue::getInstance().addJobsFromFiles(
-        params.jobfiles.get(),
-        params.level.get()))
-      return Action::failure;
-  } else {
-    if (params.path.get().size() != 0) {
-      ELOG(2, "Path to fragment given although we use FragmentJobQueue.");
-    }
-    outputtype = ToJobs;
-  }
-
   size_t Exitflag = 0;
   std::map<JobId_t, MPQCData> fragmentData;
@@ -537,7 +565,6 @@
   FragmentationChargeDensity summedChargeDensity(
       fragmentData,
-      params.path.get());
+      FragmentJobQueue::getInstance().getKeySets());
   const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid();
-
   LOG(1, "INFO: There are " << fragmentData.size() << " short-range and "
       << full_sample.size() << " level-wise long-range jobs.");
@@ -587,5 +614,6 @@
       fragmentData,
       longrangeData,
-      params.path.get());
+      FragmentJobQueue::getInstance().getKeySets(),
+      FragmentJobQueue::getInstance().getFullKeySets());
   results(
       fragmentData,
@@ -593,8 +621,5 @@
       fullsolutionData,
       full_sample);
-  {
-    LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
-    printReceivedFullResults(results);
-  }
+  printReceivedFullResults(results);
 
   // append all keysets to homology file
@@ -603,5 +628,5 @@
     if (homology_file.string() != "") {
       LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << ".");
-      if (!appendToHomologyFile(homology_file, results, params.path.get()))
+      if (!appendToHomologyFile(homology_file, results))
         Exitflag = 1;
     }
@@ -630,8 +655,12 @@
     printReceivedMPQCResults(
         fragmentData,
-        params.path.get(),
-        getNoAtomsFromAdjacencyFile(params.path.get()));
+        FragmentJobQueue::getInstance().getKeySets(),
+        FragmentJobQueue::getInstance().getFullKeySets(),
+        World::getInstance().getAllAtoms().size()));
   }
 #endif
+
+  // now clear all present jobs as we are done
+  FragmentJobQueue::getInstance().clear();
 
   return (Exitflag == 0) ? Action::success : Action::failure;
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -14,19 +14,14 @@
 #include "Parameters/Validators/Ops_Validator.hpp"
 #include "Parameters/Validators/RangeValidator.hpp"
-#include "Parameters/Validators/STLVectorValidator.hpp"
-#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
-#include "Parameters/Validators/Specific/FilePresentValidator.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::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)
-#define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("homology-file")
-#define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("path to file containing homology containerto append to")
-#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))
-#define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(homology_file)
+#define paramtypes (std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)(boost::filesystem::path)
+#define paramtokens ("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("homology-file")
+#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("path to file containing homology containerto append to")
+#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(NOPARAM_DEFAULT)(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))
+#define paramreferences (host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(homology_file)
 #define paramvalids \
-(STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
-(DummyValidator< std::string >()) \
 (DummyValidator< std::string >()) \
 (DummyValidator< std::string >()) \
Index: src/Actions/FragmentationAction/ParseFragmentJobsAction.cpp
===================================================================
--- src/Actions/FragmentationAction/ParseFragmentJobsAction.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Actions/FragmentationAction/ParseFragmentJobsAction.cpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -0,0 +1,88 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * ParseFragmentJobsAction.cpp
+ *
+ *  Created on: Mar 04, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "CodePatterns/Log.hpp"
+#include "Fragmentation/Automation/FragmentJobQueue.hpp"
+
+#include <boost/filesystem.hpp>
+#include <string>
+
+#include "Actions/FragmentationAction/ParseFragmentJobsAction.hpp"
+
+using namespace MoleCuilder;
+
+// and construct the stuff
+#include "ParseFragmentJobsAction.def"
+#include "Action_impl_pre.hpp"
+/** =========== define the function ====================== */
+Action::state_ptr FragmentationParseFragmentJobsAction::performCall() {
+  // check for present jobs
+  if (params.jobfiles.get().empty()) {
+    ELOG(2, "Given vector of jobfiles is empty!");
+    return Action::failure;
+  }
+
+  // parse in fragment-jobs if given
+  if(!FragmentJobQueue::getInstance().addJobsFromFiles(
+      params.jobfiles.get(),
+      params.level.get()))
+    return Action::failure;
+  size_t FragmentCounter = FragmentJobQueue::getInstance().size();
+  LOG(1, "STATUS: I parsed " << FragmentCounter << " fragment files.");
+
+  // then parse in KeySets and add on top
+  FragmentJobQueue::getInstance().addKeySetsFromFiles(params.path.get(), FragmentCounter, NonHydrogenKeySets);
+  FragmentJobQueue::getInstance().addFullKeySetsFromFiles(params.path.get(), FragmentCounter, NonHydrogenKeySets);
+
+  return Action::success;
+}
+
+Action::state_ptr FragmentationParseFragmentJobsAction::performUndo(Action::state_ptr _state) {
+  return Action::success;
+}
+
+Action::state_ptr FragmentationParseFragmentJobsAction::performRedo(Action::state_ptr _state){
+  return Action::success;
+}
+
+bool FragmentationParseFragmentJobsAction::canUndo() {
+  return true;
+}
+
+bool FragmentationParseFragmentJobsAction::shouldUndo() {
+  return true;
+}
+/** =========== end of function ====================== */
Index: src/Actions/FragmentationAction/ParseFragmentJobsAction.def
===================================================================
--- src/Actions/FragmentationAction/ParseFragmentJobsAction.def	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Actions/FragmentationAction/ParseFragmentJobsAction.def	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -0,0 +1,44 @@
+/*
+ * ParseFragmentJobsAction.def
+ *
+ *  Created on: Mar 04, 2013
+ *      Author: heber
+ */
+
+// all includes and forward declarations necessary for non-integral types below
+#include <boost/filesystem/path.hpp>
+#include <vector>
+
+#include "Parameters/Validators/RangeValidator.hpp"
+#include "Parameters/Validators/Ops_Validator.hpp"
+#include "Parameters/Validators/STLVectorValidator.hpp"
+#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
+#include "Parameters/Validators/Specific/FilePresentValidator.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::vector< boost::filesystem::path >)(boost::filesystem::path)(unsigned int)
+#define paramtokens ("fragment-jobs")("fragment-path")("grid-level")
+#define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("resolution of multigrid")
+#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))
+#define paramreferences (jobfiles)(path)(level)
+#define paramvalids \
+(STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
+(FilePresentValidator()) \
+(RangeValidator< unsigned int >(1, 10))
+
+#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 5
+#define ACTIONNAME ParseFragmentJobs
+#define TOKEN "parse-fragment-jobs"
+
+
+// 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/ParseFragmentJobsAction.hpp
===================================================================
--- src/Actions/FragmentationAction/ParseFragmentJobsAction.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
+++ src/Actions/FragmentationAction/ParseFragmentJobsAction.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -0,0 +1,22 @@
+/*
+ * ParseFragmentJobsAction.hpp
+ *
+ *  Created on: Mar 04, 2013
+ *      Author: heber
+ */
+
+#ifndef PARSEFRAGMENTJOBSACTION_HPP_
+#define PARSEFRAGMENTJOBSACTION_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Actions/Action.hpp"
+
+#include "ParseFragmentJobsAction.def"
+#include "Action_impl_header.hpp"
+
+#endif /* PARSEFRAGMENTJOBSACTION_HPP_ */
Index: src/Actions/GlobalListOfActions.hpp
===================================================================
--- src/Actions/GlobalListOfActions.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Actions/GlobalListOfActions.hpp	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -137,7 +137,10 @@
 #define GLOBALLISTOFACTIONS \
     BOOST_PP_SEQ_PUSH_BACK( \
-        GLOBALLISTOFACTIONS_initial, \
-        FragmentationFragmentationAutomation \
-      )
+        BOOST_PP_SEQ_PUSH_BACK( \
+            GLOBALLISTOFACTIONS_initial, \
+            FragmentationFragmentationAutomation \
+        ), \
+        FragmentationParseFragmentJobs \
+    )
 #else
 #define GLOBALLISTOFACTIONS \
Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Actions/Makefile.am	(revision bae7bcfcfe9b08823c3f099f8441af87980bc96f)
@@ -222,9 +222,12 @@
 if CONDJOBMARKET
 FRAGMENTATIONACTIONSOURCE += \
-  Actions/FragmentationAction/FragmentationAutomationAction.cpp
+  Actions/FragmentationAction/FragmentationAutomationAction.cpp \
+  Actions/FragmentationAction/ParseFragmentJobsAction.cpp
 FRAGMENTATIONACTIONHEADER += \
-  Actions/FragmentationAction/FragmentationAutomationAction.hpp
+  Actions/FragmentationAction/FragmentationAutomationAction.hpp \
+  Actions/FragmentationAction/ParseFragmentJobsAction.hpp
 FRAGMENTATIONACTIONDEFS += \
-  Actions/FragmentationAction/FragmentationAutomationAction.def
+  Actions/FragmentationAction/FragmentationAutomationAction.def \
+  Actions/FragmentationAction/ParseFragmentJobsAction.def
 endif
 
