Index: src/Fragmentation/Homology/HomologyGraph.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph.cpp	(revision b8f0b250c2143e3d8e7c3b8ef67750ab6eccc8b1)
+++ src/Fragmentation/Homology/HomologyGraph.cpp	(revision 372c912d546dab1fa0cacaa5ecc66020c7b3b282)
@@ -49,4 +49,9 @@
   nodes(detail::getNodesFromKeySet(keyset)),
   edges(detail::getEdgesFromKeySet(keyset))
+{}
+
+HomologyGraph::HomologyGraph(const IndexSet &index) :
+  nodes(detail::getNodesFromIndexSet(index)),
+  edges(detail::getEdgesFromIndexSet(index))
 {}
 
Index: src/Fragmentation/Homology/HomologyGraph.hpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph.hpp	(revision b8f0b250c2143e3d8e7c3b8ef67750ab6eccc8b1)
+++ src/Fragmentation/Homology/HomologyGraph.hpp	(revision 372c912d546dab1fa0cacaa5ecc66020c7b3b282)
@@ -24,4 +24,5 @@
 #include "Fragmentation/Homology/FragmentNode.hpp"
 
+class IndexSet;
 class KeySet;
 
@@ -72,4 +73,10 @@
   HomologyGraph(const KeySet &keyset);
 
+  /** Constructor for class HomologyGraph from a IndexSet (i.e. from atoms in the World).
+   *
+   * @param index global ids of atoms to pick
+   */
+  HomologyGraph(const IndexSet &index);
+
   /** Destructor for class HomologyGraph.
    *
@@ -119,4 +126,6 @@
   const HomologyGraph::nodes_t getNodesFromKeySet(const KeySet &keyset);
   const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset);
+  const HomologyGraph::nodes_t getNodesFromIndexSet(const IndexSet &keyset);
+  const HomologyGraph::edges_t getEdgesFromIndexSet(const IndexSet &keyset);
 };
 
Index: src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp
===================================================================
--- src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp	(revision b8f0b250c2143e3d8e7c3b8ef67750ab6eccc8b1)
+++ src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp	(revision 372c912d546dab1fa0cacaa5ecc66020c7b3b282)
@@ -45,4 +45,5 @@
 #include "Descriptors/AtomIdDescriptor.hpp"
 #include "Fragmentation/KeySet.hpp"
+#include "Fragmentation/Summation/IndexSet.hpp"
 #include "World.hpp"
 
@@ -51,43 +52,58 @@
 // in all the cludder of World, atom, molecule, and so on ...
 
+template <typename T>
+const HomologyGraph::nodes_t getNodesFromSet(const std::set<T> &keyset)
+{
+  HomologyGraph::nodes_t nodes;
+  for (typename std::set<T>::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;
+}
+
+template <typename T>
+const HomologyGraph::edges_t getEdgesFromSet(const std::set<T> &keyset)
+{
+  HomologyGraph::edges_t edges;
+  for (typename std::set<T>::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.end(); ++bonditer) {
+        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 {
-  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::nodes_t getNodesFromKeySet(const KeySet &keyset) {
+    return getNodesFromSet<int>(keyset);
   }
-
-  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;
+  const HomologyGraph::nodes_t getNodesFromIndexSet(const IndexSet &keyset) {
+    return getNodesFromSet<size_t>(keyset);
+  }
+  const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset) {
+    return getEdgesFromSet<int>(keyset);
+  }
+  const HomologyGraph::edges_t getEdgesFromIndexSet(const IndexSet &keyset) {
+    return getEdgesFromSet<size_t>(keyset);
   }
 };  /* namespace detail */
Index: src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp
===================================================================
--- src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp	(revision b8f0b250c2143e3d8e7c3b8ef67750ab6eccc8b1)
+++ src/Fragmentation/Homology/unittests/stubs/HomologyGraph_getFromKeysetStub.cpp	(revision 372c912d546dab1fa0cacaa5ecc66020c7b3b282)
@@ -39,4 +39,5 @@
 #include "Fragmentation/Homology/HomologyGraph.hpp"
 #include "Fragmentation/KeySet.hpp"
+#include "Fragmentation/Summation/IndexSet.hpp"
 
 namespace detail {
@@ -52,3 +53,13 @@
   }
 
+  const HomologyGraph::nodes_t getNodesFromIndexSet(const IndexSet &keyset)
+  {
+    return HomologyGraph::nodes_t();
+  }
+
+  const HomologyGraph::edges_t getEdgesFromIndexSet(const IndexSet &keyset)
+  {
+    return HomologyGraph::edges_t();
+  }
+
 };  /* namespace detail */
