Index: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 37ce5d4d59915ca74d0ededb806c014397524a22)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.cpp	(revision 240c3e6656ddf8b49c7e2d1576ded8eab2d3245b)
@@ -39,6 +39,13 @@
 #include "CodePatterns/MemDebug.hpp"
 
+// include headers that implement a archive in simple text format
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
+
 #include <boost/mpl/remove.hpp>
 #include <boost/lambda/lambda.hpp>
+
+#include <iostream>
 
 #include "CodePatterns/Assert.hpp"
@@ -57,4 +64,6 @@
 #include "Fragmentation/ForceMatrix.hpp"
 #include "Fragmentation/Fragmentation.hpp"
+#include "Fragmentation/Homology/HomologyContainer.hpp"
+#include "Fragmentation/Homology/HomologyGraph.hpp"
 #include "Fragmentation/SetValues/Fragment.hpp"
 #include "Fragmentation/SetValues/Histogram.hpp"
@@ -379,4 +388,44 @@
 }
 
+bool appendToHomologyFile(const boost::filesystem::path &homology_file)
+{
+  // read homology container (if present)
+  HomologyContainer homology_container;
+  if (boost::filesystem::exists(homology_file)) {
+    std::ifstream returnstream(homology_file.string().c_str());
+    if (returnstream.good()) {
+      boost::archive::text_iarchive ia(returnstream);
+      ia >> homology_container;
+    } else {
+      ELOG(2, "Failed to parse from " << homology_file.string() << ".");
+    }
+    returnstream.close();
+  } else {
+    LOG(2, "Could not open " << homology_file.string()
+        << ", creating empty container.");
+  }
+
+  // append all fragments to a HomologyContainer
+  HomologyContainer::container_t values;
+  // TODO: prepare HomologyGraphs ...
+  homology_container.insert(values);
+
+  // store homology container again
+  std::ofstream outputstream(homology_file.string().c_str());
+  if (outputstream.fail()) { // check if opened
+    boost::archive::text_oarchive oa(outputstream);
+    oa << homology_container;
+    if (outputstream.fail()) { // check if correctly written
+      LOG(1, "Failed to write to file " << homology_file.string() << ".");
+      return false;
+    } else
+      outputstream.close();
+  } else {
+    LOG(1, "Failed to open file " << homology_file.string()
+        << " for writing.");
+    return false;
+  }
+  return true;
+}
 
 Action::state_ptr FragmentationFragmentationAutomationAction::performCall() {
@@ -475,4 +524,11 @@
     LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
     printReceivedFullResults(results);
+  }
+
+  // append all keysets to homology file
+  if (Exitflag != 0) {
+    const boost::filesystem::path &homology_file = params.homology_file.get();
+    if (!appendToHomologyFile(homology_file))
+      Exitflag = 1;
   }
 
Index: src/Actions/FragmentationAction/FragmentationAutomationAction.def
===================================================================
--- src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision 37ce5d4d59915ca74d0ededb806c014397524a22)
+++ src/Actions/FragmentationAction/FragmentationAutomationAction.def	(revision 240c3e6656ddf8b49c7e2d1576ded8eab2d3245b)
@@ -21,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::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)
-#define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")
-#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")
-#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"))
-#define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)
+#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"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(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 \
 (STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
@@ -35,5 +35,6 @@
 (RangeValidator< unsigned int >(1, 20)) \
 (RangeValidator< unsigned int >(1, 10)) \
-(DummyValidator< bool >())
+(DummyValidator< bool >()) \
+(DummyValidator< boost::filesystem::path >())
 
 #undef statetypes
