Index: src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp
===================================================================
--- src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp	(revision a3427f795a607e84365d342681c78b46570d042e)
+++ src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp	(revision a3427f795a607e84365d342681c78b46570d042e)
@@ -0,0 +1,106 @@
+/*
+ * 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/>.
+ */
+
+/*
+ * FragmentationResultContainer.cpp
+ *
+ *  Created on: Mar 8, 2013
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "FragmentationResultContainer.hpp"
+
+#include "CodePatterns/Assert.hpp"
+#include "CodePatterns/Singleton_impl.hpp"
+
+#ifdef HAVE_VMG
+void FragmentationResultContainer::addFullResults(
+    const KeySetsContainer &_keysets,
+    const KeySetsContainer &_forcekeysets,
+    const shortrangedata_t &_shortrangedata,
+    const longrangedata_t &_longrangedata
+    )
+{
+  ASSERT( ResultsType == BothRanges,
+      "FragmentationResultContainer::getLongRangeResults() - mixing full and short range is not in the cards.");
+  ASSERT( _keysets.KeySets.size() == _forcekeysets.KeySets.size(),
+      "FragmentationResultContainer::addFullResults() - keysets ("
+      +toString(_keysets.KeySets.size())+") and forcekeysets ("+toString(_forcekeysets.KeySets.size())
+      +") differ in size.");
+  ASSERT( _keysets.KeySets.size() == _shortrangedata.size(),
+      "FragmentationResultContainer::addFullResults() - keysets ("
+      +toString(_keysets.KeySets.size())+") and shortrangedata ("+toString(_shortrangedata.size())
+      +") differ in size.");
+  // there are more results for longrangedata!
+//  ASSERT( _keysets.KeySets.size() == _longrangedata.size(),
+//      "FragmentationResultContainer::addFullResults() - keysets ("
+//      +toString(_keysets.KeySets.size())+") and longrangedata ("+toString(_longrangedata.size())
+//      +") differ in size.");
+  keysets.insert(_keysets);
+  forcekeysets.insert(_forcekeysets);
+  shortrangedata.insert(_shortrangedata.begin(), _shortrangedata.end());
+  longrangedata.insert(_longrangedata.begin(), _longrangedata.end());
+}
+#endif
+
+void FragmentationResultContainer::addShortRangeResults(
+    const KeySetsContainer &_keysets,
+    const KeySetsContainer &_forcekeysets,
+    const shortrangedata_t &_shortrangedata
+    )
+{
+  ASSERT( (ResultsType == ShortRangeOnly) || (keysets.KeySets.empty()) ,
+      "FragmentationResultContainer::getLongRangeResults() - mixing full and short range is not in the cards.");
+  ASSERT( _keysets.KeySets.size() == _forcekeysets.KeySets.size(),
+      "FragmentationResultContainer::addFullResults() - keysets ("
+      +toString(_keysets.KeySets.size())+") and forcekeysets ("+toString(_forcekeysets.KeySets.size())
+      +") differ in size.");
+  ASSERT( _keysets.KeySets.size() == _shortrangedata.size(),
+      "FragmentationResultContainer::addFullResults() - keysets ("
+      +toString(_keysets.KeySets.size())+") and shortrangedata ("+toString(_shortrangedata.size())
+      +") differ in size.");
+  // deteriorate to short range only
+  ResultsType = ShortRangeOnly;
+  keysets.insert(_keysets);
+  forcekeysets.insert(_forcekeysets);
+  shortrangedata.insert(_shortrangedata.begin(), _shortrangedata.end());
+}
+
+
+#ifdef HAVE_VMG
+const FragmentationResultContainer::longrangedata_t&
+FragmentationResultContainer::getLongRangeResults() const
+{
+  ASSERT( ResultsType == BothRanges,
+      "FragmentationResultContainer::getLongRangeResults() - access although storing only short range.");
+  return longrangedata;
+}
+#endif
+
+CONSTRUCT_SINGLETON(FragmentationResultContainer)
Index: src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp
===================================================================
--- src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp	(revision a3427f795a607e84365d342681c78b46570d042e)
+++ src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp	(revision a3427f795a607e84365d342681c78b46570d042e)
@@ -0,0 +1,132 @@
+/*
+ * FragmentationResultContainer.hpp
+ *
+ *  Created on: Mar 8, 2013
+ *      Author: heber
+ */
+
+#ifndef FRAGMENTATIONRESULTCONTAINER_HPP_
+#define FRAGMENTATIONRESULTCONTAINER_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/Singleton.hpp"
+
+#include <map>
+
+#ifdef HAVE_JOBMARKET
+#include "JobMarket/types.hpp"
+#else
+typedef size_t JobId_t;
+#endif
+
+#include "Fragmentation/KeySetsContainer.hpp"
+#include "Fragmentation/Summation/Containers/MPQCData.hpp"
+#ifdef HAVE_VMG
+#include "Fragmentation/Summation/Containers/VMGData.hpp"
+#endif
+
+/** This class stores results from lengthy fragmentation calculations, e.g.
+ * coming out of FragmentationAutomationAction.
+ *
+ * The idea is that we can play around with results without having to recalculate
+ * results in between. Hence, we serialize the FragmentResult into this
+ * container which can also be filled from file.
+ */
+class FragmentationResultContainer: public Singleton<FragmentationResultContainer>
+{
+  //!> Singleton patterns needs access to private cstor/dtor.
+  friend class Singleton<FragmentationResultContainer>;
+private:
+  FragmentationResultContainer() :
+    ResultsType(BothRanges)
+  {}
+  ~FragmentationResultContainer() {}
+
+public:
+  //!> typedef for short range data container
+  typedef std::map<JobId_t, MPQCData> shortrangedata_t;
+#ifdef HAVE_VMG
+  //!> typedef for long range data container
+  typedef std::map<JobId_t, VMGData> longrangedata_t;
+#endif
+
+#ifdef HAVE_VMG
+  /** Adds a a set of both short and long range results.
+   *
+   * Adds all the containers to the ones present in this instance.
+   *
+   * \param _keysets
+   * \param _forcekeysets
+   * \param _shortrangedata
+   * \param _longrangedata
+   */
+  void addFullResults(
+      const KeySetsContainer &_keysets,
+      const KeySetsContainer &_forcekeysets,
+      const shortrangedata_t &_shortrangedata,
+      const longrangedata_t &_longrangedata
+      );
+#endif
+
+  /** Adds a a set of short range results only.
+   *
+   * Adds all the containers to the ones present in this instance.
+   *
+   * \param _keysets
+   * \param _forcekeysets
+   * \param _shortrangedata
+   */
+  void addShortRangeResults(
+      const KeySetsContainer &_keysets,
+      const KeySetsContainer &_forcekeysets,
+      const shortrangedata_t &_shortrangedata
+      );
+
+  /** Clears all internal containers.
+   *
+   * \note Also resets ResultsType.
+   */
+  void clear()
+  {
+    keysets.clear();
+    forcekeysets.clear();
+    shortrangedata.clear();
+#ifdef HAVE_VMG
+    longrangedata.clear();
+#endif
+    ResultsType = BothRanges;
+  }
+
+  const KeySetsContainer &getKeySets() const { return keysets; }
+  const KeySetsContainer &getForceKeySets() const  { return forcekeysets; }
+  const shortrangedata_t& getShortRangeResults() const  { return shortrangedata; }
+#ifdef HAVE_VMG
+  const longrangedata_t& getLongRangeResults() const;
+#endif
+  bool areFullRangeResultsPresent() const { return (ResultsType == BothRanges); }
+
+private:
+  //!> indicates whether we contain short range only or both results
+  enum ResultsType_t {
+    ShortRangeOnly,
+    BothRanges,
+  } ResultsType;
+
+  //!> 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 forcekeysets;
+  //!> container for all short-range results
+  std::map<JobId_t, MPQCData> shortrangedata;
+
+#ifdef HAVE_VMG
+  //!> container for all long-range results
+  std::map<JobId_t, VMGData> longrangedata;
+#endif
+};
+
+#endif /* FRAGMENTATIONRESULTCONTAINER_HPP_ */
Index: src/Fragmentation/Summation/Containers/Makefile.am
===================================================================
--- src/Fragmentation/Summation/Containers/Makefile.am	(revision fbf143b9fb3d409937862a091c997ab0428c8b3e)
+++ src/Fragmentation/Summation/Containers/Makefile.am	(revision a3427f795a607e84365d342681c78b46570d042e)
@@ -6,4 +6,5 @@
 	Fragmentation/Summation/Containers/FragmentationChargeDensity.cpp \
 	Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp \
+	Fragmentation/Summation/Containers/FragmentationResultContainer.cpp \
 	Fragmentation/Summation/Containers/FragmentationShortRangeResults.cpp \
 	Fragmentation/Summation/Containers/MPQCData.cpp
@@ -19,4 +20,5 @@
 	Fragmentation/Summation/Containers/FragmentationChargeDensity.hpp \
 	Fragmentation/Summation/Containers/FragmentationLongRangeResults.hpp \
+	Fragmentation/Summation/Containers/FragmentationResultContainer.hpp \
 	Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp \
 	Fragmentation/Summation/Containers/MPQCData.hpp \
