Index: src/Fragmentation/Homology/HomologyContainer.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyContainer.cpp	(revision 67db806639ff7456fbd7dd055cd5657502eb2af1)
+++ src/Fragmentation/Homology/HomologyContainer.cpp	(revision 12a24cb265abb9ed292c6a016a6a745267373e05)
@@ -35,4 +35,9 @@
 #endif
 
+// include headers that implement a archive in simple text format
+// otherwise BOOST_CLASS_EXPORT_IMPLEMENT has no effect
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/text_iarchive.hpp>
+
 #include "CodePatterns/MemDebug.hpp"
 
@@ -60,2 +65,26 @@
 }
 
+bool HomologyContainer::operator>=(const HomologyContainer &other) const
+{
+  bool status = true;
+  // go through this container and check each element for presence in other
+  for (container_t::const_iterator iter = container.begin();
+      iter != container.end(); ++iter) {
+    // get all values in other container to the same graph
+    std::pair<
+      container_t::const_iterator,
+      container_t::const_iterator>
+      keyrange = other.container.equal_range(iter->first);
+    container_t::const_iterator otheriter = keyrange.first;
+    for (;otheriter != keyrange.second;
+        ++otheriter)
+      if (otheriter->second == iter->second)
+        break;
+    status &= (otheriter != keyrange.second);
+  }
+  return status;
+}
+
+// we need to explicitly instantiate the serialization functions
+BOOST_CLASS_EXPORT_IMPLEMENT(HomologyContainer)
+
Index: src/Fragmentation/Homology/HomologyContainer.hpp
===================================================================
--- src/Fragmentation/Homology/HomologyContainer.hpp	(revision 67db806639ff7456fbd7dd055cd5657502eb2af1)
+++ src/Fragmentation/Homology/HomologyContainer.hpp	(revision 12a24cb265abb9ed292c6a016a6a745267373e05)
@@ -14,4 +14,8 @@
 #include <config.h>
 #endif
+
+#include <boost/serialization/export.hpp>
+#include <boost/serialization/map.hpp>
+#include <boost/serialization/vector.hpp>
 
 #include <iosfwd>
@@ -33,7 +37,23 @@
   Fragment() {}
   Fragment(const positions_t &_positions, const charges_t &_charges) {}
+
+  bool operator==(const Fragment &other) const {
+    return true;
+  }
+
+private:
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {}
 };
 
 std::ostream& operator<<(std::ostream &out, const Fragment &container);
+
+// we need to give this class a unique key for serialization
+BOOST_CLASS_EXPORT_KEY(Fragment)
+
+class HomologyContainerTest;
 
 /** This class takes all KeySets in a Graph, checks for those that homologues
@@ -52,4 +72,6 @@
   //!> grant access to output operator
   friend std::ostream& operator<<(std::ostream &out, const HomologyContainer &container);
+  //!> grant unit test access
+  friend class HomologyContainerTest;
 public:
   typedef double energy_t;
@@ -75,4 +97,29 @@
   ~HomologyContainer() {}
 
+  /** Equality comparator.
+   *
+   * Sadly, the insertion order of a std::multimap's values is not guaranteed
+   * by the standard and boost::serialization does not heed the ordering of
+   * the values associated to the same key. Hence, we implement a weaker
+   * comparator for this class in order for the unit test to pass as we don't
+   * actuallty care about the order of the homologous fragments.
+   *
+   * @param other instance to compare to
+   * @return true - each container contains all elements of the other
+   */
+  bool operator==(const HomologyContainer &other) const {
+    return ((*this >= other) && (other >= *this));
+  }
+  bool operator!=(const HomologyContainer& other) const {
+    return !(*this == other);
+  }
+
+  /** Greater equal comparator, i.e. subset comparator
+   *
+   * @param other container to check if it's subset
+   * @return true - \a other is a subset of this
+   */
+  bool operator>=(const HomologyContainer &other) const;
+
   /** Inserter for more graphs along with values.
    *
@@ -95,4 +142,13 @@
   //!> multimap containing all homologous graph under same key but each with its value
   container_t container;
+
+private:
+  friend class boost::serialization::access;
+  // serialization
+  template <typename Archive>
+  void serialize(Archive& ar, const unsigned int version)
+  {
+    ar & container;
+  }
 };
 
@@ -105,3 +161,7 @@
 std::ostream& operator<<(std::ostream &out, const HomologyContainer &container);
 
+// we need to give this class a unique key for serialization
+BOOST_CLASS_EXPORT_KEY(HomologyContainer)
+
+
 #endif /* HOMOLOGYCONTAINER_HPP_ */
Index: src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp
===================================================================
--- src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp	(revision 67db806639ff7456fbd7dd055cd5657502eb2af1)
+++ src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp	(revision 12a24cb265abb9ed292c6a016a6a745267373e05)
@@ -43,8 +43,14 @@
 #include <boost/archive/text_iarchive.hpp>
 
+#include <boost/assign.hpp>
+
 #include "Fragmentation/Homology/HomologyContainer.hpp"
 #include "Fragmentation/Graph.hpp"
 
 #include "HomologyContainerUnitTest.hpp"
+
+#include <sstream>
+
+using namespace boost::assign;
 
 #ifdef HAVE_TESTRUNNER
@@ -60,5 +66,44 @@
 void HomologyContainerTest::setUp()
 {
-//  Keys = new HomologyContainer(keysets, values);
+  // add nodes
+  nodes +=
+      FragmentNode(1,1),
+      FragmentNode(1,4),
+      FragmentNode(2,2),
+      FragmentNode(2,4);
+  othernodes +=
+      FragmentNode(1,1),
+      FragmentNode(1,4);
+
+  // add edges
+  edges +=
+      FragmentEdge(1,1),
+      FragmentEdge(1,4),
+      FragmentEdge(2,2),
+      FragmentEdge(2,4);
+  otheredges +=
+      FragmentEdge(1,4),
+      FragmentEdge(2,2);
+
+  // construct graphs
+  HomologyGraph graph(nodes, edges);
+  HomologyGraph othergraph(othernodes, otheredges);
+
+  // place in container
+  Fragment::position_t pos(3, 0.);
+  Fragment::positions_t positions(1, pos);
+  Fragment::charges_t charges(1,1.);
+  Fragment dummy(positions, charges);
+  charges[0] = 6.;
+  positions[0][0] = 1.;
+  Fragment dummy1(positions, charges);
+  positions[0][0] = 2.;
+  Fragment dummy2(positions, charges);
+  container +=
+      std::make_pair( graph, std::make_pair(dummy1, 1.) ),
+      std::make_pair( graph, std::make_pair(dummy2, 1.5) ),
+      std::make_pair( othergraph, std::make_pair(dummy, 2.) );
+  // create HomologyContainer
+  Keys = new HomologyContainer(container);
 }
 
@@ -73,3 +118,61 @@
 void HomologyContainerTest::InsertionTest()
 {
+  // construct graphs
+  HomologyGraph graph(nodes, edges);
+
+  HomologyContainer::container_t newcontainer;
+  Fragment::position_t pos(3, 0.);
+  Fragment::positions_t positions(1, pos);
+  Fragment::charges_t charges(1,1.);
+  Fragment dummy(positions, charges);
+  newcontainer +=
+      std::make_pair( graph, std::make_pair(dummy, 1.) );
+
+  Keys->insert(newcontainer);
+
+  CPPUNIT_ASSERT_EQUAL( (size_t)4, Keys->container.size() );
 }
+
+/** UnitTest for operator==() works correctly.
+ */
+void HomologyContainerTest::EqualityTest()
+{
+  // compare same container
+  CPPUNIT_ASSERT( *Keys == *Keys );
+
+  // construct other container
+  HomologyGraph graph(nodes, edges);
+  HomologyContainer::container_t newcontainer;
+  Fragment::position_t pos(3, 0.);
+  Fragment::positions_t positions(1, pos);
+  Fragment::charges_t charges(1,1.);
+  Fragment dummy(positions, charges);
+  newcontainer +=
+      std::make_pair( graph, std::make_pair(dummy, 1.) );
+
+  HomologyContainer other(newcontainer);
+
+  CPPUNIT_ASSERT( *Keys != other );
+}
+
+/** UnitTest for serialization
+ */
+void HomologyContainerTest::serializeTest()
+{
+  // serialize
+  std::stringstream outputstream;
+  boost::archive::text_oarchive oa(outputstream);
+  oa << Keys;
+
+  // deserialize
+  HomologyContainer *samekeys = NULL;
+  std::stringstream returnstream(outputstream.str());
+  boost::archive::text_iarchive ia(returnstream);
+  ia >> samekeys;
+
+  CPPUNIT_ASSERT( samekeys != NULL );
+  //std::cout << *Keys << std::endl;
+  CPPUNIT_ASSERT_EQUAL( *Keys, *samekeys );
+
+  delete samekeys;
+}
Index: src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.hpp
===================================================================
--- src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.hpp	(revision 67db806639ff7456fbd7dd055cd5657502eb2af1)
+++ src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.hpp	(revision 12a24cb265abb9ed292c6a016a6a745267373e05)
@@ -25,4 +25,6 @@
     CPPUNIT_TEST_SUITE( HomologyContainerTest) ;
     CPPUNIT_TEST ( InsertionTest );
+    CPPUNIT_TEST ( EqualityTest );
+    CPPUNIT_TEST ( serializeTest );
     CPPUNIT_TEST_SUITE_END();
 
@@ -31,7 +33,14 @@
       void tearDown();
       void InsertionTest();
+      void EqualityTest();
+      void serializeTest();
 
 private:
       HomologyContainer *Keys;
+      HomologyGraph::nodes_t nodes;
+      HomologyGraph::nodes_t othernodes;
+      HomologyGraph::edges_t edges;
+      HomologyGraph::edges_t otheredges;
+      HomologyContainer::container_t container;
 };
 
Index: src/Fragmentation/Homology/unittests/Makefile.am
===================================================================
--- src/Fragmentation/Homology/unittests/Makefile.am	(revision 67db806639ff7456fbd7dd055cd5657502eb2af1)
+++ src/Fragmentation/Homology/unittests/Makefile.am	(revision 12a24cb265abb9ed292c6a016a6a745267373e05)
@@ -47,4 +47,5 @@
 	../libMolecuilderUI.la \
 	${CodePatterns_LIBS} \
+  $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
 	$(BOOST_LIB)
 
