Index: configure.ac
===================================================================
--- configure.ac	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ configure.ac	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -191,5 +191,5 @@
 AS_IF([test x"$enable_jobmarket" != x"no"],[
   # JobMarket library (needs newer ax_jobmarket.m4 and smaller fixes)
-  AM_PATH_JOBMARKET([1.1.2], $have_debug,[
+  AM_PATH_JOBMARKET([1.1.3], $have_debug,[
     # the following is only required if we have JobMarket
     BOOST_ASIO
Index: src/Actions/FragmentationAction/FragmentationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Actions/FragmentationAction/FragmentationAction.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -39,4 +39,7 @@
 #include "CodePatterns/Log.hpp"
 #include "Fragmentation/Exporters/ExportGraph_ToFiles.hpp"
+#ifdef HAVE_JOBMARKET
+#include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
+#endif
 #include "Fragmentation/Fragmentation.hpp"
 #include "Fragmentation/Graph.hpp"
@@ -167,12 +170,24 @@
   }
 
-  // store molecule's fragment to file
   {
     const enum HydrogenSaturation saturation =  params.DoSaturation.get() ? DoSaturate : DontSaturate;
     const enum HydrogenTreatment treatment =  params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen;
-    ExportGraph_ToFiles exporter(TotalGraph, treatment, saturation);
-    exporter.setPrefix(params.prefix.get());
-    exporter.setOutputTypes(params.types.get());
-    exporter();
+    if (params.types.get().size() != 0) {
+      // store molecule's fragment to file
+      ExportGraph_ToFiles exporter(TotalGraph, treatment, saturation);
+      exporter.setPrefix(params.prefix.get());
+      exporter.setOutputTypes(params.types.get());
+      exporter();
+    } else {
+#ifdef HAVE_JOBMARKET
+      // store molecule's fragment in FragmentJobQueue
+      ExportGraph_ToJobs exporter(TotalGraph, treatment, saturation);
+      exporter.setLevel(params.level.get());
+      exporter();
+#else
+      ELOG(1, "No output file types specified and JobMarket support is not compiled in.");
+      return Action::failure;
+#endif
+    }
   }
 
Index: src/Actions/FragmentationAction/FragmentationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAction.def	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Actions/FragmentationAction/FragmentationAction.def	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -13,4 +13,5 @@
 #include "Parameters/Validators/DummyValidator.hpp"
 #include "Parameters/Validators/GenericValidators.hpp"
+#include "Parameters/Validators/RangeValidator.hpp"
 #include "Parameters/Validators/STLVectorValidator.hpp"
 #include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
@@ -20,9 +21,9 @@
 // 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)(double)(unsigned int)(bool)(bool)(std::vector<std::string>)
-#define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types")
-#define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files")
-#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))(PARAM_DEFAULT(std::vector<std::string>(1, std::string("pcp"))))
-#define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types)
+#define paramtypes (std::string)(double)(unsigned int)(bool)(bool)(std::vector<std::string>)(unsigned int)
+#define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types")("grid-level")
+#define paramdescriptions ("prefix of each fragment file")("distance in space")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files")("resolution of density sampling multigrid")
+#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))
+#define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types)(level)
 #define paramvalids \
 (DummyValidator< std::string >()) \
@@ -31,5 +32,6 @@
 (DummyValidator< bool >()) \
 (DummyValidator< bool >()) \
-(STLVectorValidator< std::vector<std::string> >(1, 10, ParserTypeValidator()))
+(STLVectorValidator< std::vector<std::string> >(0, 10, ParserTypeValidator())) \
+(RangeValidator< unsigned int >(1, 10))
 
 #undef statetypes
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -57,4 +57,5 @@
 #include "Fragmentation/Automation/extractJobIds.hpp"
 #include "Fragmentation/Automation/FragmentationChargeDensity.hpp"
+#include "Fragmentation/Automation/FragmentJobQueue.hpp"
 #include "Fragmentation/Automation/FragmentationResults.hpp"
 #include "Fragmentation/Automation/MPQCFragmentController.hpp"
@@ -478,21 +479,47 @@
   // 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;
   {
+    const size_t NumberJobs = FragmentJobQueue::getInstance().size();
     MPQCFragmentController mpqccontroller(io_service);
     mpqccontroller.setHost(params.host.get());
     mpqccontroller.setPort(params.port.get());
-    mpqccontroller.setLevel(params.level.get());
     // Phase One: obtain ids
-    std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
-    mpqccontroller.requestIds(jobfiles.size());
-
-    // Phase Two: create and add MPQCJobs
-    if (!mpqccontroller.addJobsFromFiles(params.executable.get().string(), jobfiles))
-      return Action::failure;
+    mpqccontroller.requestIds(NumberJobs);
+
+    // Phase Two: add MPQCJobs and send
+    mpqccontroller.addJobsFromQueue();
+    mpqccontroller.run();
 
     // Phase Three: calculate result
-    mpqccontroller.waitforResults(jobfiles.size());
+    mpqccontroller.waitforResults(NumberJobs);
     mpqccontroller.getResults(fragmentData);
 
@@ -572,5 +599,5 @@
 
   // append all keysets to homology file
-  if (Exitflag == 0) {
+  if ((Exitflag == 0) && (!params.homology_file.get().empty())) {
     const boost::filesystem::path &homology_file = params.homology_file.get();
     if (homology_file.string() != "") {
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -24,5 +24,5 @@
 #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"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT(""))
+#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 paramvalids \
Index: src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def
===================================================================
--- src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Actions/FragmentationAction/StoreSaturatedFragmentAction.def	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -20,5 +20,5 @@
 #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 paramdefaults (NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(NOPARAM_DEFAULT)
 #define paramreferences (prefix)(DoSaturation)(types)
 #define paramvalids \
Index: src/Fragmentation/Automation/FragmentJobQueue.cpp
===================================================================
--- src/Fragmentation/Automation/FragmentJobQueue.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Fragmentation/Automation/FragmentJobQueue.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -0,0 +1,99 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * FragmentJobQueue.cpp
+ *
+ *  Created on: Mar 4, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Fragmentation/Automation/FragmentJobQueue.hpp"
+
+#include <boost/filesystem.hpp>
+#include <fstream>
+
+#include "CodePatterns/Assert.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Singleton_impl.hpp"
+
+#include "Box.hpp"
+#include "Helpers/defs.hpp"
+#include "Jobs/MPQCJob.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+#include "World.hpp"
+
+
+void FragmentJobQueue::parsejob(const std::string &filename, const unsigned int level)
+{
+  std::ifstream file;
+  file.open(filename.c_str());
+  ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");
+  std::string output((std::istreambuf_iterator<char>(file)),
+      std::istreambuf_iterator<char>());
+  double begin[NDIM] = { 0., 0., 0. };
+  RealSpaceMatrix M = World::getInstance().getDomain().getM();
+  M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
+  const double size = M.at(0,0);
+  double end[NDIM] = { size, size, size };
+  ASSERT( M.determinant() == size*size*size,
+      "parsejob() - current domain matrix "+toString(M)+" is not cubic.");
+  FragmentJob::ptr testJob( new MPQCJob(JobId::IllegalJob, output, begin, end, level) );
+  jobs.push_back(testJob);
+  file.close();
+  LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");
+}
+
+bool FragmentJobQueue::addJobsFromFiles(
+    const std::vector< boost::filesystem::path > &jobfiles, const unsigned int level)
+{
+  for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles.begin();
+      iter != jobfiles .end(); ++iter) {
+    const std::string &filename = (*iter).string();
+    if (boost::filesystem::exists(filename)) {
+      LOG(1, "INFO: Creating MPQCCommandJob with filename'"+filename+"'.");
+      parsejob(filename, level);
+    } else {
+      ELOG(1, "Fragment job "+filename+" does not exist.");
+      return false;
+    }
+  }
+
+  return true;
+}
+
+void FragmentJobQueue::clear()
+{
+  jobs.clear();
+  KeySets.clear();
+  FullKeySets.clear();
+}
+
+CONSTRUCT_SINGLETON(FragmentJobQueue)
+
Index: src/Fragmentation/Automation/FragmentJobQueue.hpp
===================================================================
--- src/Fragmentation/Automation/FragmentJobQueue.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
+++ src/Fragmentation/Automation/FragmentJobQueue.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -0,0 +1,126 @@
+/*
+ * FragmentJobQueue.hpp
+ *
+ *  Created on: Mar 4, 2013
+ *      Author: heber
+ */
+
+#ifndef FRAGMENTJOBQUEUE_HPP_
+#define FRAGMENTJOBQUEUE_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <boost/filesystem/path.hpp>
+#include <string>
+#include <vector>
+
+#include "CodePatterns/Singleton.hpp"
+
+#include "Fragmentation/KeySetsContainer.hpp"
+#include "Jobs/MPQCJob.hpp"
+
+/** FragmentJobQueue is a static instance to contain all present fragment
+ * as FragmentJob's and to allow their transfer from FragmentationAction
+ * to FragmentationAutomationAction.
+ *
+ * \note All contained jobs do not have yet a valid id!
+ */
+class FragmentJobQueue : public Singleton<FragmentJobQueue>
+{
+  friend class Singleton<FragmentJobQueue>;
+private:
+  /** Private default constructor for class FragmentJobQueue.
+   */
+  FragmentJobQueue()
+  {}
+
+  /** Private destructor for class FragmentJobQueue.
+   */
+  ~FragmentJobQueue()
+  {}
+
+public:
+
+  /** Pushes a vector of jobs into the queue.
+   *
+   * \param _jobs new jobs to push
+   * \param KeySet KeySet of all (non-hydrogen) atoms
+   * \param FullKeySet KeySet of all atoms except saturation hydrogens
+   */
+  void addJobs(
+      std::vector<FragmentJob::ptr> &_jobs,
+      const KeySetsContainer &_KeySets,
+      const KeySetsContainer &_FullKeySets);
+
+  /** Returns ref to jobs.
+   *
+   * \param vector with all jobs
+   */
+  const std::vector<FragmentJob::ptr>& getJobs() const { return jobs; }
+
+  /** Getter for the number of jobs contained.
+   *
+   * \return number of jobs in queue
+   */
+  size_t size() const { return jobs.size(); }
+
+  /** Parses multiple files.
+   *
+   * \param jobfiles vector of filenames to parse
+   * \param level level for density sampling grid
+   */
+  bool addJobsFromFiles(
+      const std::vector< boost::filesystem::path > &jobfiles,
+      const unsigned int level);
+
+  /** Getter for the container of all KeySets to the jobs.
+   *
+   * \return const ref to container
+   */
+  const KeySetsContainer& getKeySets() const { return KeySets; }
+
+  /** Getter for the container of all FullKeySets to the jobs.
+   *
+   * \return const ref to container
+   */
+  const KeySetsContainer& getFullKeySets() const { return FullKeySets; }
+
+  /* Empties contained jobs and all KeySets.
+   *
+   */
+  void clear();
+
+private:
+  /** Creates a MPQCJob with argument \a filename.
+   *
+   * \note job is created with invalid id.
+   *
+   * @param filename filename being argument to job
+   * @param level level for density sampling grid
+   */
+  void parsejob(const std::string &filename, const unsigned int level);
+
+private:
+  //!> container for all present jobs
+  std::vector<FragmentJob::ptr> jobs;
+  //!> container for all KeySet's without hydrogens to the jobs
+  KeySetsContainer KeySets;
+  //!> container for all KeySet's with all except saturation hydrogen to the jobs
+  KeySetsContainer FullKeySets;
+};
+
+inline
+void FragmentJobQueue::addJobs(
+    std::vector<FragmentJob::ptr> &_jobs,
+    const KeySetsContainer &_KeySets,
+    const KeySetsContainer &_FullKeySets)
+{
+  jobs.insert(jobs.end(), _jobs.begin(), _jobs.end());
+  KeySets.insert(_KeySets);
+  FullKeySets.insert(_FullKeySets);
+}
+
+#endif /* FRAGMENTJOBQUEUE_HPP_ */
Index: src/Fragmentation/Automation/MPQCFragmentController.cpp
===================================================================
--- src/Fragmentation/Automation/MPQCFragmentController.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Automation/MPQCFragmentController.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -45,61 +45,28 @@
 #include "Box.hpp"
 #include "Helpers/defs.hpp"
+#include "Fragmentation/Automation/FragmentJobQueue.hpp"
 #include "Jobs/MPQCJob.hpp"
 #include "LinearAlgebra/RealSpaceMatrix.hpp"
 #include "World.hpp"
 
-bool MPQCFragmentController::addJobsFromFiles(
-    const std::string &executable,
-    const std::vector< boost::filesystem::path > &jobfiles)
+bool MPQCFragmentController::addJobsFromQueue()
 {
-  std::vector<FragmentJob::ptr> jobs;
-  for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles.begin();
-      iter != jobfiles .end(); ++iter) {
-    const std::string &filename = (*iter).string();
-    if (boost::filesystem::exists(filename)) {
-      const JobId_t next_id = getAvailableId();
-      LOG(1, "INFO: Creating MPQCCommandJob with filename'"
-          +filename+"', and id "+toString(next_id)+".");
-      parsejob(jobs, executable, filename, next_id);
-    } else {
-      ELOG(1, "Fragment job "+filename+" does not exist.");
-      return false;
-    }
+  // give them all valid ids
+  std::vector<FragmentJob::ptr> newjobs = FragmentJobQueue::getInstance().getJobs();
+  for (std::vector<FragmentJob::ptr>::iterator jobiter = newjobs.begin();
+      jobiter != newjobs.end();
+      ++jobiter) {
+    changeJobId((*jobiter), getAvailableId());
   }
-  addJobs(jobs);
+  // add the jobs
+  addJobs(newjobs);
+
+  return (newjobs.size() != 0);
+}
+
+void MPQCFragmentController::run()
+{
+  // take jobs from queue and add them
   sendJobs(host, port);
   RunService("Adding MPQCJobs");
-
-  return true;
 }
-
-/** Creates a MPQCCommandJob with argument \a filename.
- *
- * @param jobs created job is added to this vector
- * @param command mpqc command to execute
- * @param filename filename being argument to job
- * @param nextid id for this job
- */
-void MPQCFragmentController::parsejob(
-    std::vector<FragmentJob::ptr> &jobs,
-    const std::string &command,
-    const std::string &filename,
-    const JobId_t nextid)
-{
-  std::ifstream file;
-  file.open(filename.c_str());
-  ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");
-  std::string output((std::istreambuf_iterator<char>(file)),
-      std::istreambuf_iterator<char>());
-  double begin[NDIM] = { 0., 0., 0. };
-  RealSpaceMatrix M = World::getInstance().getDomain().getM();
-  M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
-  const double size = M.at(0,0);
-  double end[NDIM] = { size, size, size };
-  ASSERT( M.determinant() == size*size*size,
-      "parsejob() - current domain matrix "+toString(M)+" is not cubic.");
-  FragmentJob::ptr testJob( new MPQCJob(nextid, output, begin, end, level) );
-  jobs.push_back(testJob);
-  file.close();
-  LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");
-}
Index: src/Fragmentation/Automation/MPQCFragmentController.hpp
===================================================================
--- src/Fragmentation/Automation/MPQCFragmentController.hpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Automation/MPQCFragmentController.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -34,29 +34,28 @@
 public:
   MPQCFragmentController(boost::asio::io_service &io_service) :
-    SpecificFragmentController(io_service),
-    level(5)
+    SpecificFragmentController(io_service)
   {}
   virtual ~MPQCFragmentController()
   {}
 
-  bool addJobsFromFiles(
-      const std::string &executable,
-      const std::vector< boost::filesystem::path > &jobfiles);
+  /** Command Controller to fill its hold of jobs from FragmentJobQueue.
+   *
+   * \return true - jobs obtained, false - queue empty
+   */
+  bool addJobsFromQueue();
+
+  /** Get results map of calculated jobs.
+   *
+   * \param fragmentData contains map of results on output
+   */
   void getResults(std::map<JobId_t, MPQCData> &fragmentData) {
     SpecificFragmentController::getResults<MPQCData>(fragmentData);
   }
 
-  void setLevel(const size_t _level) { level = _level; }
-
-private:
-  void parsejob(
-      std::vector<FragmentJob::ptr> &jobs,
-      const std::string &command,
-      const std::string &filename,
-      const JobId_t nextid);
-
-private:
-  //!> resolution of sampled electron density as \f$2^{\mathrm{level}}\f$
-  size_t level;
+  /** Runs the service.
+   *
+   * Here, we finalize each job's id and push them to the server.
+   */
+  void run();
 };
 
Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Automation/Makefile.am	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -6,4 +6,5 @@
 	Fragmentation/Automation/FragmentationChargeDensity.cpp \
 	Fragmentation/Automation/FragmentationResults.cpp \
+	Fragmentation/Automation/FragmentJobQueue.cpp \
 	Fragmentation/Automation/MPQCFragmentController.cpp \
 	Fragmentation/Automation/parseKeySetFile.cpp \
@@ -21,4 +22,5 @@
 	Fragmentation/Automation/FragmentationChargeDensity.hpp \
 	Fragmentation/Automation/FragmentationResults.hpp \
+	Fragmentation/Automation/FragmentJobQueue.hpp \
 	Fragmentation/Automation/MPQCFragmentController.hpp \
 	Fragmentation/Automation/parseKeySetFile.hpp \
Index: src/Fragmentation/Exporters/ExportGraph.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Exporters/ExportGraph.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -81,10 +81,4 @@
     BondFragments.ListOfMolecules.erase(iter);
   }
-}
-
-void ExportGraph::operator()()
-{
-  if (BondFragments.ListOfMolecules.size() == 0)
-    prepareMolecule();
 }
 
Index: src/Fragmentation/Exporters/ExportGraph.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph.hpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Exporters/ExportGraph.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -46,5 +46,5 @@
   typedef boost::shared_ptr<SaturatedFragment> SaturatedFragment_ptr;
 
-  virtual void operator()();
+  virtual void operator()()=0;
 
   /** Returns a saturated fragment for immediate use only.
Index: src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -103,5 +103,5 @@
 void ExportGraph_ToFiles::operator()()
 {
-  LOG(1, "INFO: Writing " << TotalGraph.size() << " possible bond fragmentation configs");
+  LOG(1, "INFO: Writing " << TotalGraph.size() << " possible bond fragmentation configs.");
   size_t FragmentCounter = 0;
   char *FragmentNumber = NULL;
Index: src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -33,8 +33,21 @@
 #endif
 
+// boost asio required before MemDebug due to placement new
+#include <boost/asio.hpp>
+
 #include "CodePatterns/MemDebug.hpp"
 
 #include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
 
+#include <algorithm>
+
+#include "Box.hpp"
+#include "Fragmentation/KeySet.hpp"
+#include "Fragmentation/Automation/FragmentJobQueue.hpp"
+#include "Fragmentation/Automation/MPQCFragmentController.hpp"
+#include "Helpers/defs.hpp"
+#include "Jobs/MPQCJob.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+#include "Parser/FormatParserStorage.hpp"
 #include "World.hpp"
 
@@ -43,5 +56,6 @@
     const enum HydrogenTreatment _treatment,
     const enum HydrogenSaturation _saturation) :
-    ExportGraph(_graph, _treatment, _saturation)
+    ExportGraph(_graph, _treatment, _saturation),
+    level(5)
 {}
 
@@ -51,4 +65,62 @@
 void ExportGraph_ToJobs::operator()()
 {
-  ExportGraph::operator()();
+  std::vector<FragmentJob::ptr> jobs;
+  KeySetsContainer KeySets;
+  KeySetsContainer FullKeySets;
+  jobs.reserve(TotalGraph.size());
+  LOG(1, "INFO: Creating " << TotalGraph.size() << " possible bond fragmentation jobs.");
+
+  // gather info about the domain
+  double begin[NDIM] = { 0., 0., 0. };
+  RealSpaceMatrix M = World::getInstance().getDomain().getM();
+  M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
+  const double size = M.at(0,0);
+  double end[NDIM] = { size, size, size };
+  const ParserTypes jobtype =
+      FormatParserStorage::getInstance().getTypeFromName("mpqc");
+
+  // 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(2, "INFO: Creating bond fragment job for set " << set << ".");
+    // store config in stream
+    {
+      std::stringstream output;
+      // save to stream
+      CurrentFragment->OutputConfig(output, jobtype);
+      // create job and insert
+      FragmentJob::ptr testJob( new MPQCJob(JobId::IllegalJob, output.str(), begin, end, level) );
+      jobs.push_back(testJob);
+
+      // order is the same as the number of non-hydrogen atoms
+      const KeySet &keyset = CurrentFragment->getKeySet();
+      const size_t order = keyset.size();
+      const KeySet &fullmolecule = CurrentFragment->getFullMolecule();
+      const KeySet &saturationhydrogens = CurrentFragment->getSaturationHydrogens();
+      KeySetsContainer::IntVector indices(keyset.begin(), keyset.end());
+      KeySetsContainer::IntVector forceindices(fullmolecule.begin(), fullmolecule.end());
+      {
+        // replace all saturated hydrogen indices by "-1"
+        for (KeySetsContainer::IntVector::iterator iter = forceindices.begin();
+            iter != forceindices.end();
+            ++iter)
+          if (saturationhydrogens.find(*iter) != saturationhydrogens.end())
+            *iter = -1;
+      }
+      KeySets.insert(indices, order);
+      FullKeySets.insert(forceindices, order);
+    }
+    // store force index reference file
+    // explicitly release fragment
+    CurrentFragment.reset();
+  }
+  if (CurrentFragment == NULL) {
+    ELOG(1, "Some error while obtaining the next fragment occured.");
+    return;
+  }
+
+  // push final jobs
+  FragmentJobQueue::getInstance().addJobs(jobs, KeySets, FullKeySets);
 }
Index: src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -28,4 +28,12 @@
 {
 public:
+  /** Constructor for ExportGraph_ToJobs.
+   *
+   * 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
+   */
   ExportGraph_ToJobs(
       const Graph &_graph,
@@ -36,4 +44,13 @@
 	void operator()();
 
+  /** Sets the level for the sampling of the density.
+   *
+   * \param _level level to set
+   */
+  void setLevel(const size_t _level) { level = _level; }
+
+private:
+  //!> resolution of sampled electron density as \f$2^{\mathrm{level}}\f$
+  size_t level;
 };
 
Index: src/Fragmentation/KeySetsContainer.cpp
===================================================================
--- src/Fragmentation/KeySetsContainer.cpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/KeySetsContainer.cpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -233,2 +233,34 @@
   return true;
 }
+
+void KeySetsContainer::clear()
+{
+  KeySets.clear();
+  OrderSet.clear();
+  AtomCounter.clear();
+  FragmentCounter = 0;
+  Order = 0;
+  FragmentsPerOrder.clear();
+}
+
+void KeySetsContainer::insert(const KeySetsContainer &other)
+{
+  KeySets.reserve(KeySets.size()+other.KeySets.size());
+  AtomCounter.reserve(AtomCounter.size()+other.AtomCounter.size());
+  for (ArrayOfIntVectors::const_iterator iter = other.KeySets.begin();
+      iter != other.KeySets.end(); ++iter)
+    insert(*iter, iter->size());
+}
+
+void KeySetsContainer::insert(const IntVector &indices, const size_t order)
+{
+  KeySets.push_back(indices);
+  AtomCounter.push_back(indices.size());
+  if (order > OrderSet.size() )
+    OrderSet.resize(order);
+  OrderSet[order-1].push_back(FragmentCounter);
+  if (order > FragmentsPerOrder.size())
+    FragmentsPerOrder.resize(order);
+  ++(FragmentsPerOrder[order-1]);
+  ++FragmentCounter;
+}
Index: src/Fragmentation/KeySetsContainer.hpp
===================================================================
--- src/Fragmentation/KeySetsContainer.hpp	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/KeySetsContainer.hpp	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -45,4 +45,10 @@
   }
 
+  void clear();
+
+  void insert(const KeySetsContainer &other);
+
+  void insert(const IntVector &set, const size_t order);
+
 private:
   friend class boost::serialization::access;
Index: src/Fragmentation/Makefile.am
===================================================================
--- src/Fragmentation/Makefile.am	(revision dd0c8ff580ba75fc5f2bb4e7d0bdfce0f61abdec)
+++ src/Fragmentation/Makefile.am	(revision ac9ca46967e95fa2cebeb516a6755eef363225d5)
@@ -72,4 +72,12 @@
 libMolecuilderFragmentation_getFromKeyset_la_includedir = $(includedir)/MoleCuilder/Fragmentation/
 libMolecuilderFragmentation_getFromKeysetStub_la_includedir = $(includedir)/MoleCuilder/Fragmentation/
+libMolecuilderFragmentation_la_CPPFLAGS = $(AM_CPPFLAGS)
+libMolecuilderFragmentation_la_LDFLAGS = $(AM_LDFLAGS)
+libMolecuilderFragmentation_la_LIBADD =
+if CONDJOBMARKET
+libMolecuilderFragmentation_la_CPPFLAGS += ${JobMarket_CFLAGS}
+libMolecuilderFragmentation_la_LDFLAGS += $(JobMarket_LDFLAGS)
+libMolecuilderFragmentation_la_LIBADD += $(JobMarket_LIBS)
+endif
 
 nobase_libMolecuilderFragmentation_la_include_HEADERS = ${FRAGMENTATIONHEADER}
