Index: src/Fragmentation/Automation/Makefile.am
===================================================================
--- src/Fragmentation/Automation/Makefile.am	(revision 4dd16e4bf5f26ec09f04a28ed1029538fce01522)
+++ src/Fragmentation/Automation/Makefile.am	(revision a2d65328746fcc8fdc1d9c782d15f30309d8cf50)
@@ -2,5 +2,5 @@
 # Also indentation by a single tab
 
-INCLUDES = -I$(top_srcdir)/LinearAlgebra/src
+INCLUDES = -I$(top_srcdir)/LinearAlgebra/src -I$(top_srcdir)/src
 
 MOSTLYCLEANFILES =
@@ -139,4 +139,6 @@
   libMolecuilderFragmentationOperations.la \
   libMolecuilderFragmentJobs.la \
+  $(top_builddir)/src/libMolecuilderFragmentation.la \
+  $(top_builddir)/src/libMolecuilderHelpers.la \
   $(BOOST_ASIO_LIBS) \
   $(BOOST_SERIALIZATION_LIBS) \
Index: src/Fragmentation/Automation/controller.cpp
===================================================================
--- src/Fragmentation/Automation/controller.cpp	(revision 4dd16e4bf5f26ec09f04a28ed1029538fce01522)
+++ src/Fragmentation/Automation/controller.cpp	(revision a2d65328746fcc8fdc1d9c782d15f30309d8cf50)
@@ -39,6 +39,10 @@
 #include "CodePatterns/Info.hpp"
 #include "CodePatterns/Log.hpp"
+#include "Fragmentation/EnergyMatrix.hpp"
+#include "Fragmentation/ForceMatrix.hpp"
+#include "Fragmentation/KeySetsContainer.hpp"
 #include "FragmentController.hpp"
 #include "Jobs/MPQCCommandJob.hpp"
+#include "Jobs/MPQCCommandJob_MPQCData.hpp"
 #include "Jobs/SystemCommandJob.hpp"
 #include "Results/FragmentResult.hpp"
@@ -107,20 +111,22 @@
 }
 
-/** Print received results.
+/** Print MPQCData from received results.
  *
  * @param results vector of all received FragmentResult's
  * @param KeySetFilename filename containing keysets
  */
-void printreceivedmpqcresults(std::vector<FragmentResult::ptr> &results, const std::string &KeySetFilename)
-{
-  // parse in KeySetfile
-//  const size_t MAXBUFFER = 256;
-  std::ifstream inputfile;
-  inputfile.open(KeySetFilename.c_str());
-//  while (inputfile.getline(buffer, MAXBUFFER)) {
-//
-//  }
-  inputfile.close();
-
+bool printReceivedMPQCResults(
+    std::vector<FragmentResult::ptr> &results,
+    const std::string &KeySetFilename)
+{
+  EnergyMatrix Energy;
+  EnergyMatrix EnergyFragments;
+  ForceMatrix Force;
+  ForceMatrix ForceFragments;
+  KeySetsContainer KeySet;
+
+  // place results into EnergyMatrix and ForceMatrix
+  //if (!Energy.ParseFragmentMatrix(argv[1], dir, EnergySuffix, 0,0)) return false;
+  //if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return false;
   // combine all found data
   std::vector<MPQCData> fragmentData(results.size());
@@ -137,5 +143,34 @@
     LOG(1, "INFO: extracted data is " << extractedData << ".");
   }
-}
+
+  if (!Energy.InitialiseIndices()) return false;
+
+  if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
+
+  if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false;
+
+  if (!KeySet.ParseManyBodyTerms()) return false;
+
+  if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return false;
+  if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return false;
+
+  if(!Energy.SetLastMatrix(0., 0)) return false;
+  if(!Force.SetLastMatrix(0., 2)) return false;
+
+  for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
+    // --------- sum up energy --------------------
+    LOG(1, "INFO: Summing energy of order " << BondOrder+1 << " ...");
+    if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return false;
+    if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return false;
+
+    // --------- sum up Forces --------------------
+    LOG(1, "INFO: Summing forces of order " << BondOrder+1 << " ...");
+    if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return false;
+    if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return false;
+  }
+
+  return true;
+}
+
 
 /** Returns a unique index for every command to allow switching over it.
@@ -183,5 +218,5 @@
         std::cerr << "\t" << iter->first << std::endl;
       }
-      return 1;
+      return false;
     }
 
@@ -325,5 +360,5 @@
           LOG(1, "INFO: Parsing id associations from " << KeySetFilename << ".");
           std::vector<FragmentResult::ptr> results = controller.getReceivedResults();
-          printreceivedmpqcresults(results, KeySetFilename);
+          printReceivedMPQCResults(results, KeySetFilename);
         }
         break;
