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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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 c1a2210e3faf8cc75a971bc2c81cffdb88c35b4b)
+++ 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}
