Index: src/Fragmentation/Exporters/ExportGraph.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph.cpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph.cpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -37,12 +37,30 @@
 #include "ExportGraph.hpp"
 
+#include "CodePatterns/Info.hpp"
+#include "CodePatterns/Log.hpp"
+
+#include "Bond/bond.hpp"
+#include "Element/element.hpp"
+#include "Fragmentation/Graph.hpp"
+#include "Fragmentation/KeySet.hpp"
+#include "Fragmentation/SortIndex.hpp"
+#include "Graph/ListOfLocalAtoms.hpp"
+#include "molecule.hpp"
+#include "MoleculeListClass.hpp"
+#include "World.hpp"
+
 /** Constructor for class ExportGraph.
  *
  * @param _graph
  */
-ExportGraph::ExportGraph(const Graph &_graph) :
-	TotalGraph(_graph)
-{
-
+ExportGraph::ExportGraph(
+  const Graph &_graph,
+  const enum HydrogenTreatment _treatment,
+  const enum HydrogenSaturation _saturation) :
+  TotalGraph(_graph),
+  BondFragments(World::getPointer()),
+  treatment(_treatment),
+  saturation(_saturation)
+{
 }
 
@@ -51,3 +69,148 @@
  */
 ExportGraph::~ExportGraph()
-{}
+{
+  // remove all create molecules again from the World including their atoms
+  for (MoleculeList::iterator iter = BondFragments.ListOfMolecules.begin();
+      !BondFragments.ListOfMolecules.empty();
+      iter = BondFragments.ListOfMolecules.begin()) {
+    // remove copied atoms and molecule again
+    molecule *mol = *iter;
+    mol->removeAtomsinMolecule();
+    World::getInstance().destroyMolecule(mol);
+    BondFragments.ListOfMolecules.erase(iter);
+  }
+}
+
+void ExportGraph::operator()()
+{
+  if (BondFragments.ListOfMolecules.size() == 0)
+    prepareMolecule();
+}
+
+/** Internal helper to create from each keyset a molecule
+ *
+ */
+void ExportGraph::prepareMolecule()
+{
+  size_t count = 0;
+  for(Graph::const_iterator runner = TotalGraph.begin(); runner != TotalGraph.end(); runner++) {
+    KeySet test = (*runner).first;
+    LOG(2, "DEBUG: Fragment No." << (*runner).second.first << " with TEFactor "
+        << (*runner).second.second << ".");
+    BondFragments.insert(StoreFragmentFromKeySet(test, World::getInstance().getConfig()));
+    ++count;
+  }
+  LOG(1, "INFO: " << count << "/" << BondFragments.ListOfMolecules.size()
+      << " fragments generated from the keysets.");
+}
+
+/** Stores a fragment from \a KeySet into \a molecule.
+ * First creates the minimal set of atoms from the KeySet, then creates the bond structure from the complete
+ * molecule and adds missing hydrogen where bonds were cut.
+ * \param &Leaflet pointer to KeySet structure
+ * \param IsAngstroem whether we have Ansgtroem or bohrradius
+ * \return pointer to constructed molecule
+ */
+molecule * ExportGraph::StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem)
+{
+  Info info(__func__);
+  ListOfLocalAtoms_t SonList;
+  molecule *Leaf = World::getInstance().createMolecule();
+
+  StoreFragmentFromKeySet_Init(Leaf, Leaflet, SonList);
+  // create the bonds between all: Make it an induced subgraph and add hydrogen
+//  LOG(2, "Creating bonds from father graph (i.e. induced subgraph creation).");
+  CreateInducedSubgraphOfFragment(Leaf, SonList, IsAngstroem);
+
+  //Leaflet->Leaf->ScanForPeriodicCorrection(out);
+  return Leaf;
+}
+
+/** Initializes some value for putting fragment of \a *mol into \a *Leaf.
+ * \param *Leaf fragment molecule
+ * \param &Leaflet pointer to KeySet structure
+ * \param SonList calloc'd list which atom of \a *Leaf is a son of which atom in \a *mol
+ * \return number of atoms in fragment
+ */
+int ExportGraph::StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList)
+{
+  atom *FatherOfRunner = NULL;
+
+  // first create the minimal set of atoms from the KeySet
+  World &world = World::getInstance();
+  int size = 0;
+  for(KeySet::const_iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) {
+    FatherOfRunner = world.getAtom(AtomById(*runner));  // find the id
+    SonList.insert( std::make_pair(FatherOfRunner->getNr(), Leaf->AddCopyAtom(FatherOfRunner) ) );
+    size++;
+  }
+  return size;
+}
+
+/** Creates an induced subgraph out of a fragmental key set, adding bonds and hydrogens (if treated specially).
+ * \param *Leaf fragment molecule
+ * \param IsAngstroem whether we have Ansgtroem or bohrradius
+ * \param SonList list which atom of \a *Leaf is another atom's son
+ */
+void ExportGraph::CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem)
+{
+  bool LonelyFlag = false;
+  atom *OtherFather = NULL;
+  atom *FatherOfRunner = NULL;
+
+  // we increment the iter just before skipping the hydrogen
+  // as we use AddBond, we cannot have a const_iterator here
+  for (molecule::iterator iter = Leaf->begin(); iter != Leaf->end();) {
+    LonelyFlag = true;
+    FatherOfRunner = (*iter)->father;
+    ASSERT(FatherOfRunner,"Atom without father found");
+    if (SonList.find(FatherOfRunner->getNr()) != SonList.end())  {  // check if this, our father, is present in list
+      // create all bonds
+      const BondList& ListOfBonds = FatherOfRunner->getListOfBonds();
+      for (BondList::const_iterator BondRunner = ListOfBonds.begin();
+          BondRunner != ListOfBonds.end();
+          ++BondRunner) {
+        OtherFather = (*BondRunner)->GetOtherAtom(FatherOfRunner);
+        if (SonList.find(OtherFather->getNr()) != SonList.end()) {
+//          LOG(2, "INFO: Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->getNr()]
+//              << " is bound to " << *OtherFather << ", whose son is "
+//              << *SonList[OtherFather->getNr()] << ".");
+          if (OtherFather->getNr() > FatherOfRunner->getNr()) { // add bond (Nr check is for adding only one of both variants: ab, ba)
+            std::stringstream output;
+//            output << "ACCEPT: Adding Bond: "
+            output << Leaf->AddBond((*iter), SonList[OtherFather->getNr()], (*BondRunner)->BondDegree);
+//            LOG(3, output.str());
+            //NumBonds[(*iter)->getNr()]++;
+          } else {
+//            LOG(3, "REJECY: Not adding bond, labels in wrong order.");
+          }
+          LonelyFlag = false;
+        } else {
+//          LOG(2, "INFO: Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->getNr()]
+//              << " is bound to " << *OtherFather << ", who has no son in this fragment molecule.");
+          if (saturation == DoSaturate) {
+//          LOG(3, "ACCEPT: Adding Hydrogen to " << (*iter)->Name << " and a bond in between.");
+            if (!Leaf->AddHydrogenReplacementAtom((*BondRunner), (*iter), FatherOfRunner, OtherFather, IsAngstroem))
+              exit(1);
+          } else if ((treatment == ExcludeHydrogen) && (OtherFather->getElementNo() == (atomicNumber_t)1)) {
+            // just copy the atom if it's a hydrogen
+            atom * const OtherWalker = Leaf->AddCopyAtom(OtherFather);
+            Leaf->AddBond((*iter), OtherWalker, (*BondRunner)->BondDegree);
+          }
+          //NumBonds[(*iter)->getNr()] += Binder->BondDegree;
+        }
+      }
+    } else {
+      ELOG(1, "Son " << (*iter)->getName() << " has father " << FatherOfRunner->getName() << " but its entry in SonList is " << SonList[FatherOfRunner->getNr()] << "!");
+    }
+    if ((LonelyFlag) && (Leaf->getAtomCount() > 1)) {
+      LOG(0, **iter << "has got bonds only to hydrogens!");
+    }
+    ++iter;
+    if (saturation == DoSaturate) {
+      while ((iter != Leaf->end()) && ((*iter)->getType()->getAtomicNumber() == 1)){ // skip added hydrogen
+        iter++;
+      }
+    }
+  }
+}
Index: src/Fragmentation/Exporters/ExportGraph.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph.hpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph.hpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -14,5 +14,12 @@
 #endif
 
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
+#include "Fragmentation/Exporters/ExportGraph.hpp"
+#include "MoleculeListClass.hpp"
+
 #include "Fragmentation/Graph.hpp"
+
+class ListOfLocalAtoms_t;
+class molecule;
 
 /** ExportGraph is an interface definition of a class that takes a fragmented
@@ -27,11 +34,27 @@
 {
 public:
-	ExportGraph(const Graph &_graph);
+  ExportGraph(
+      const Graph &_graph,
+      const enum HydrogenTreatment _treatment,
+      const enum HydrogenSaturation _saturation);
 	virtual ~ExportGraph();
 
-	virtual void operator()()=0;
+	virtual void operator()();
+
+private:
+
+  void prepareMolecule();
+  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
+  int StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
+  void CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
 
 protected:
-	const Graph &TotalGraph;
+  const Graph &TotalGraph;
+  //!> internal list of created molecules
+  MoleculeListClass BondFragments;
+  //!> whether to always add already present hydrogens or not
+  const enum HydrogenTreatment treatment;
+  //!> whether to saturate dangling bonds or not
+  const enum HydrogenSaturation saturation;
 };
 
Index: src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -61,8 +61,5 @@
     const enum HydrogenTreatment _treatment,
     const enum HydrogenSaturation _saturation) :
-		ExportGraph(_graph),
-		BondFragments(World::getPointer()),
-		treatment(_treatment),
-		saturation(_saturation)
+		ExportGraph(_graph, _treatment, _saturation)
 {}
 
@@ -72,16 +69,5 @@
  */
 ExportGraph_ToFiles::~ExportGraph_ToFiles()
-{
-  // remove all create molecules again from the World including their atoms
-  for (MoleculeList::iterator iter = BondFragments.ListOfMolecules.begin();
-      !BondFragments.ListOfMolecules.empty();
-      iter = BondFragments.ListOfMolecules.begin()) {
-    // remove copied atoms and molecule again
-    molecule *mol = *iter;
-    mol->removeAtomsinMolecule();
-    World::getInstance().destroyMolecule(mol);
-    BondFragments.ListOfMolecules.erase(iter);
-  }
-}
+{}
 
 /** Actual implementation of the export to files function.
@@ -89,6 +75,5 @@
 void ExportGraph_ToFiles::operator()()
 {
-  if (BondFragments.ListOfMolecules.size() == 0)
-    prepareMolecule();
+  ExportGraph::operator()();
 
   // ===== 9. Save fragments' configuration and keyset files et al to disk ===
@@ -125,130 +110,3 @@
 }
 
-/** Internal helper to create from each keyset a molecule
- *
- */
-void ExportGraph_ToFiles::prepareMolecule()
-{
-  size_t count = 0;
-  for(Graph::const_iterator runner = TotalGraph.begin(); runner != TotalGraph.end(); runner++) {
-    KeySet test = (*runner).first;
-    LOG(2, "DEBUG: Fragment No." << (*runner).second.first << " with TEFactor "
-    		<< (*runner).second.second << ".");
-    BondFragments.insert(StoreFragmentFromKeySet(test, World::getInstance().getConfig()));
-    ++count;
-  }
-  LOG(1, "INFO: " << count << "/" << BondFragments.ListOfMolecules.size()
-  		<< " fragments generated from the keysets.");
-}
 
-/** Stores a fragment from \a KeySet into \a molecule.
- * First creates the minimal set of atoms from the KeySet, then creates the bond structure from the complete
- * molecule and adds missing hydrogen where bonds were cut.
- * \param &Leaflet pointer to KeySet structure
- * \param IsAngstroem whether we have Ansgtroem or bohrradius
- * \return pointer to constructed molecule
- */
-molecule * ExportGraph_ToFiles::StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem)
-{
-  Info info(__func__);
-  ListOfLocalAtoms_t SonList;
-  molecule *Leaf = World::getInstance().createMolecule();
-
-  StoreFragmentFromKeySet_Init(Leaf, Leaflet, SonList);
-  // create the bonds between all: Make it an induced subgraph and add hydrogen
-//  LOG(2, "Creating bonds from father graph (i.e. induced subgraph creation).");
-  CreateInducedSubgraphOfFragment(Leaf, SonList, IsAngstroem);
-
-  //Leaflet->Leaf->ScanForPeriodicCorrection(out);
-  return Leaf;
-}
-
-/** Initializes some value for putting fragment of \a *mol into \a *Leaf.
- * \param *Leaf fragment molecule
- * \param &Leaflet pointer to KeySet structure
- * \param SonList calloc'd list which atom of \a *Leaf is a son of which atom in \a *mol
- * \return number of atoms in fragment
- */
-int ExportGraph_ToFiles::StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList)
-{
-  atom *FatherOfRunner = NULL;
-
-  // first create the minimal set of atoms from the KeySet
-  World &world = World::getInstance();
-  int size = 0;
-  for(KeySet::const_iterator runner = Leaflet.begin(); runner != Leaflet.end(); runner++) {
-    FatherOfRunner = world.getAtom(AtomById(*runner));  // find the id
-    SonList.insert( std::make_pair(FatherOfRunner->getNr(), Leaf->AddCopyAtom(FatherOfRunner) ) );
-    size++;
-  }
-  return size;
-}
-
-/** Creates an induced subgraph out of a fragmental key set, adding bonds and hydrogens (if treated specially).
- * \param *Leaf fragment molecule
- * \param IsAngstroem whether we have Ansgtroem or bohrradius
- * \param SonList list which atom of \a *Leaf is another atom's son
- */
-void ExportGraph_ToFiles::CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem)
-{
-  bool LonelyFlag = false;
-  atom *OtherFather = NULL;
-  atom *FatherOfRunner = NULL;
-
-  // we increment the iter just before skipping the hydrogen
-  // as we use AddBond, we cannot have a const_iterator here
-  for (molecule::iterator iter = Leaf->begin(); iter != Leaf->end();) {
-    LonelyFlag = true;
-    FatherOfRunner = (*iter)->father;
-    ASSERT(FatherOfRunner,"Atom without father found");
-    if (SonList.find(FatherOfRunner->getNr()) != SonList.end())  {  // check if this, our father, is present in list
-      // create all bonds
-      const BondList& ListOfBonds = FatherOfRunner->getListOfBonds();
-      for (BondList::const_iterator BondRunner = ListOfBonds.begin();
-          BondRunner != ListOfBonds.end();
-          ++BondRunner) {
-        OtherFather = (*BondRunner)->GetOtherAtom(FatherOfRunner);
-        if (SonList.find(OtherFather->getNr()) != SonList.end()) {
-//          LOG(2, "INFO: Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->getNr()]
-//              << " is bound to " << *OtherFather << ", whose son is "
-//              << *SonList[OtherFather->getNr()] << ".");
-          if (OtherFather->getNr() > FatherOfRunner->getNr()) { // add bond (Nr check is for adding only one of both variants: ab, ba)
-            std::stringstream output;
-//            output << "ACCEPT: Adding Bond: "
-            output << Leaf->AddBond((*iter), SonList[OtherFather->getNr()], (*BondRunner)->BondDegree);
-//            LOG(3, output.str());
-            //NumBonds[(*iter)->getNr()]++;
-          } else {
-//            LOG(3, "REJECY: Not adding bond, labels in wrong order.");
-          }
-          LonelyFlag = false;
-        } else {
-//          LOG(2, "INFO: Father " << *FatherOfRunner << " of son " << *SonList[FatherOfRunner->getNr()]
-//              << " is bound to " << *OtherFather << ", who has no son in this fragment molecule.");
-          if (saturation == DoSaturate) {
-//          LOG(3, "ACCEPT: Adding Hydrogen to " << (*iter)->Name << " and a bond in between.");
-            if (!Leaf->AddHydrogenReplacementAtom((*BondRunner), (*iter), FatherOfRunner, OtherFather, IsAngstroem))
-              exit(1);
-          } else if ((treatment == ExcludeHydrogen) && (OtherFather->getElementNo() == (atomicNumber_t)1)) {
-            // just copy the atom if it's a hydrogen
-            atom * const OtherWalker = Leaf->AddCopyAtom(OtherFather);
-            Leaf->AddBond((*iter), OtherWalker, (*BondRunner)->BondDegree);
-          }
-          //NumBonds[(*iter)->getNr()] += Binder->BondDegree;
-        }
-      }
-    } else {
-      ELOG(1, "Son " << (*iter)->getName() << " has father " << FatherOfRunner->getName() << " but its entry in SonList is " << SonList[FatherOfRunner->getNr()] << "!");
-    }
-    if ((LonelyFlag) && (Leaf->getAtomCount() > 1)) {
-      LOG(0, **iter << "has got bonds only to hydrogens!");
-    }
-    ++iter;
-    if (saturation == DoSaturate) {
-      while ((iter != Leaf->end()) && ((*iter)->getType()->getAtomicNumber() == 1)){ // skip added hydrogen
-        iter++;
-      }
-    }
-  }
-}
-
Index: src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -47,21 +47,8 @@
 
 private:
-
-	void prepareMolecule();
-  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
-  int StoreFragmentFromKeySet_Init(molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
-  void CreateInducedSubgraphOfFragment(molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
-
-private:
-  //!> internal list of created molecules
-	MoleculeListClass BondFragments;
 	//!> prefix for fragment files
 	std::string prefix;
   //!> list of parser types for which a configuration file per fragment is stored
   std::vector<std::string> typelist;
-  //!> whether to always add already present hydrogens or not
-  const enum HydrogenTreatment treatment;
-  //!> whether to saturate dangling bonds or not
-  const enum HydrogenSaturation saturation;
 };
 
Index: src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -35,3 +35,20 @@
 #include "CodePatterns/MemDebug.hpp"
 
-#include "Exporters/ExportGraph_ToJobs.hpp"
+#include "Fragmentation/Exporters/ExportGraph_ToJobs.hpp"
+
+#include "World.hpp"
+
+ExportGraph_ToJobs::ExportGraph_ToJobs(
+    const Graph &_graph,
+    const enum HydrogenTreatment _treatment,
+    const enum HydrogenSaturation _saturation) :
+    ExportGraph(_graph, _treatment, _saturation)
+{}
+
+ExportGraph_ToJobs::~ExportGraph_ToJobs()
+{}
+
+void ExportGraph_ToJobs::operator()()
+{
+  ExportGraph::operator()();
+}
Index: src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp
===================================================================
--- src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -14,5 +14,10 @@
 #endif
 
+#include <string>
+#include <vector>
+
+#include "Fragmentation/HydrogenSaturation_enum.hpp"
 #include "Fragmentation/Exporters/ExportGraph.hpp"
+#include "MoleculeListClass.hpp"
 
 /** ExportGraph_ToJobs implements an ExportGraph by sending the created
@@ -23,7 +28,12 @@
 {
 public:
-	ExportGraph_ToJobs();
+  ExportGraph_ToJobs(
+      const Graph &_graph,
+      const enum HydrogenTreatment _treatment,
+      const enum HydrogenSaturation _saturation);
+  virtual ~ExportGraph_ToJobs();
 
 	void operator()();
+
 };
 
Index: src/Fragmentation/Makefile.am
===================================================================
--- src/Fragmentation/Makefile.am	(revision 22b786ada90f98f487f6059fa83cd4ab52169ec7)
+++ src/Fragmentation/Makefile.am	(revision 8652a307767040601be3b17560eef6939d7116f3)
@@ -54,4 +54,10 @@
 	Fragmentation/UniqueFragments.hpp
 
+if CONDJOBMARKET
+FRAGMENTATIONSOURCE += \
+	Fragmentation/Exporters/ExportGraph_ToJobs.cpp
+FRAGMENTATIONHEADER += \
+	Fragmentation/Exporters/ExportGraph_ToJobs.hpp
+endif
 
 noinst_LTLIBRARIES += \
