Index: src/Fragmentation/Homology/HomologyContainer.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyContainer.cpp	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/HomologyContainer.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -41,10 +41,2 @@
 #include "Fragmentation/Graph.hpp"
 
-HomologyContainer::HomologyContainer(const Graph &keysets, const std::map< KeySet, double> &values)
-{
-  for (Graph::const_iterator iter = keysets.begin();
-      iter != keysets.end();
-      ++iter) {
-
-  }
-}
Index: src/Fragmentation/Homology/HomologyContainer.hpp
===================================================================
--- src/Fragmentation/Homology/HomologyContainer.hpp	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/HomologyContainer.hpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -16,8 +16,20 @@
 
 #include <map>
+#include <vector>
 
-#include "Fragmentation/KeySet.hpp"
+#include "Fragmentation/Homology/HomologyGraph.hpp"
 
-class Graph;
+class Fragment
+{
+public:
+  typedef std::vector<double> position_t;
+  typedef std::vector< position_t > positions_t;
+  typedef std::vector< double > charges_t;
+  typedef std::pair< position_t, double> nucleus_t;
+  typedef std::vector< nucleus_t > nuclei_t;
+  Fragment() {}
+  Fragment(const positions_t &_positions, const charges_t &_charges) {}
+};
+
 
 /** This class takes all KeySets in a Graph, checks for those that homologues
@@ -35,10 +47,46 @@
 {
 public:
-  HomologyContainer(const Graph &keysets, const std::map< KeySet, double> &values);
+  typedef double energy_t;
+  typedef std::pair<Fragment, energy_t> value_t;
+  typedef std::multimap< HomologyGraph, value_t> container_t;
+  typedef std::pair< container_t::const_iterator, container_t::const_iterator> range_t;
+public:
+  /** Default Constructor of class HomologyContainer.
+   *
+   */
+  HomologyContainer() {}
+
+  /** Constructor of class HomologyContainer.
+   *
+   * @param values values with with to initially fill the container
+   */
+  HomologyContainer(const container_t &values) :
+    container(values)
+  {}
+  /** Destructor of class HomologyContainer.
+   *
+   */
   ~HomologyContainer() {}
 
+  /** Inserter for more graphs along with values.
+   *
+   * @param values graph and values to insert
+   */
+  void insert(const container_t &values) {
+    container.insert(values.begin(), values.end());
+  }
+
+  /** Returns iterator range with all contained graphs homologous to the given \a graph.
+   *
+   * @param graph graph to match
+   * @return iterator range with all matches
+   */
+  range_t getHomologousGraphs(const HomologyGraph &graph) {
+    return container.equal_range(graph);
+  }
+
 private:
-  typedef double value_t;
-  typedef std::multimap< KeySet, value_t> container_t;
+  //!> multimap containing all homologous graph under same key but each with its value
+  container_t container;
 };
 
Index: src/Fragmentation/Homology/HomologyGraph.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph.cpp	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/HomologyGraph.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -38,4 +38,10 @@
 
 #include "HomologyGraph.hpp"
+
+
+HomologyGraph::HomologyGraph(const KeySet &keyset) :
+  nodes(detail::getNodesFromKeySet(keyset)),
+  edges(detail::getEdgesFromKeySet(keyset))
+{}
 
 bool HomologyGraph::operator<(const HomologyGraph &graph) const
Index: src/Fragmentation/Homology/HomologyGraph.hpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph.hpp	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/HomologyGraph.hpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -19,4 +19,6 @@
 #include "Fragmentation/Homology/FragmentEdge.hpp"
 #include "Fragmentation/Homology/FragmentNode.hpp"
+
+class KeySet;
 
 /** This class contains the representation of a molecular fragment as a graph.
@@ -58,4 +60,10 @@
   {}
 
+  /** Constructor for class HomologyGraph from a keyset (i.e. from atoms in the World).
+   *
+   * @param keyset global ids of atoms to pick
+   */
+  HomologyGraph(const KeySet &keyset);
+
   /** Destructor for class HomologyGraph.
    *
@@ -86,4 +94,10 @@
 };
 
+// define some helpers outside to allow for light-weight unit testing
+namespace detail {
+  const HomologyGraph::nodes_t getNodesFromKeySet(const KeySet &keyset);
+  const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset);
+};
+
 
 #endif /* HOMOLOGYGRAPH_HPP_ */
Index: src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
+++ src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -0,0 +1,90 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * Please see the COPYING file or "Copyright notice" in builder.cpp for details.
+ * 
+ *
+ *   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/>. 
+ */
+
+/*
+ * HomologyGraph_getFromKeyset.cpp
+ *
+ *  Created on: Sep 25, 2012
+ *      Author: heber
+ */
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Fragmentation/Homology/HomologyGraph.hpp"
+
+#include "CodePatterns/Log.hpp"
+
+#include "Atom/atom.hpp"
+#include "Bond/bond.hpp"
+#include "Descriptors/AtomIdDescriptor.hpp"
+#include "Fragmentation/KeySet.hpp"
+#include "World.hpp"
+
+namespace detail {
+  const HomologyGraph::nodes_t getNodesFromKeySet(const KeySet &keyset)
+  {
+    HomologyGraph::nodes_t nodes;
+    for (KeySet::const_iterator iter = keyset.begin();
+        iter != keyset.end(); ++iter) {
+      const atom *Walker = World::getInstance().getAtom(AtomById(*iter));
+      if (Walker != NULL) {
+        const BondList& ListOfBonds = Walker->getListOfBonds();
+  #ifndef NDEBUG
+      std::pair<HomologyGraph::nodes_t::iterator,bool> inserter =
+  #endif
+          nodes.insert( FragmentNode(Walker->getElementNo(), ListOfBonds.size()) );
+      } else {
+        ELOG(0, "Id " << *iter << " is not associated with any atom.");
+      }
+    }
+    return nodes;
+  }
+
+  const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset)
+  {
+    HomologyGraph::edges_t edges;
+    for (KeySet::const_iterator iter = keyset.begin();
+        iter != keyset.end(); ++iter) {
+      const atom *Walker = World::getInstance().getAtom(AtomById(*iter));
+      if (Walker != NULL) {
+        const BondList& ListOfBonds = Walker->getListOfBonds();
+        for (BondList::const_iterator bonditer = ListOfBonds.begin();
+            bonditer != ListOfBonds.begin(); ++iter) {
+          const atom *OtherWalker = (*bonditer)->GetOtherAtom(Walker);
+          if (Walker->getId() < OtherWalker->getId())
+            edges.insert( FragmentEdge( Walker->getElementNo(), OtherWalker->getElementNo()) );
+        }
+      } else {
+        ELOG(0, "Id " << *iter << " is not associated with any atom.");
+      }
+    }
+    return edges;
+  }
+};  /* namespace detail */
+
Index: src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp
===================================================================
--- src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/unittests/HomologyContainerUnitTest.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -60,7 +60,5 @@
 void HomologyContainerTest::setUp()
 {
-  Graph keysets;
-  std::map< KeySet, double> values;
-  Keys = new HomologyContainer(keysets, values);
+//  Keys = new HomologyContainer(keysets, values);
 }
 
Index: src/Fragmentation/Homology/unittests/Makefile.am
===================================================================
--- src/Fragmentation/Homology/unittests/Makefile.am	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Homology/unittests/Makefile.am	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -50,5 +50,6 @@
 HomologyGraphUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
 	../Fragmentation/Homology/unittests/HomologyGraphUnitTest.cpp \
-	../Fragmentation/Homology/unittests/HomologyGraphUnitTest.hpp
+	../Fragmentation/Homology/unittests/HomologyGraphUnitTest.hpp \
+	../Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp
 HomologyGraphUnitTest_LDADD = ${FRAGMENTATIONHOMOLOGYLIBS}
 
Index: src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp
===================================================================
--- src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
+++ src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -0,0 +1,54 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2012 University of Bonn. All rights reserved.
+ * Please see the COPYING file or "Copyright notice" in builder.cpp for details.
+ * 
+ *
+ *   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/>. 
+ */
+
+/*
+ * HomologyGraph_getFromKeysetStub.cpp
+ *
+ *  Created on: Sep 25, 2012
+ *      Author: heber
+ */
+
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Fragmentation/Homology/HomologyGraph.hpp"
+#include "Fragmentation/KeySet.hpp"
+
+namespace detail {
+
+  const HomologyGraph::nodes_t getNodesFromKeySet(const KeySet &keyset)
+  {
+    return HomologyGraph::nodes_t();
+  }
+
+  const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset)
+  {
+    return HomologyGraph::edges_t();
+  }
+
+};  /* namespace detail */
Index: src/Fragmentation/Makefile.am
===================================================================
--- src/Fragmentation/Makefile.am	(revision 7b6b21f8725bdab8c2d666fc902d98a54d5ccaba)
+++ src/Fragmentation/Makefile.am	(revision 77b350d4a59d3e57df0f050138ff3e04048d90f2)
@@ -9,4 +9,5 @@
 	Fragmentation/Homology/HomologyContainer.cpp \
 	Fragmentation/Homology/HomologyGraph.cpp \
+	Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp \
 	Fragmentation/AdaptivityMap.cpp \
 	Fragmentation/BondsPerShortestPath.cpp \
