Index: src/Graph/CyclicStructureAnalysis.cpp
===================================================================
--- src/Graph/CyclicStructureAnalysis.cpp	(revision 9583126d552a498ec6a0147ae02647de07721eef)
+++ src/Graph/CyclicStructureAnalysis.cpp	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -36,4 +36,6 @@
 
 #include "CyclicStructureAnalysis.hpp"
+
+#include <algorithm>
 
 #include "Atom/atom.hpp"
@@ -110,6 +112,6 @@
   do { // look for Root
     ASSERT(!BFSStack.empty(), "CyclicStructureAnalysis_CyclicBFSFromRootToRoot() - BFSStack is empty!");
-    Walker = BFSStack.front();
-    BFSStack.pop_front();
+    Walker = BFSStack.back();
+    BFSStack.pop_back();
     LOG(2, "INFO: Current Walker is " << *Walker << ", we look for SP to Root " << *Root << ".");
     const BondList& ListOfBonds = Walker->getListOfBonds();
@@ -159,26 +161,36 @@
       // if each atom in found cycle is cyclic, loop's been found before already
       if (OtherAtom == BackEdge->rightatom) { // loop got round completely
-        LOG(3, "INFO: This cycle was already found before, skipping and removing seeker from search.");
-        do {
-          ASSERT(!TouchedStack.empty(), "CyclicStructureAnalysis_CyclicBFSFromRootToRoot() - TouchedStack is empty!");
-          OtherAtom = TouchedStack.front();
-          TouchedStack.pop_front();
-          if (PredecessorList[OtherAtom->getNr()] == Walker) {
-            LOG(4, "INFO: Removing " << *OtherAtom << " from lists and stacks.");
-            PredecessorList[OtherAtom->getNr()] = NULL;
-            ShortestPathList[OtherAtom->getNr()] = -1;
-            ColorList[OtherAtom->getNr()] = GraphEdge::white;
-            // rats ... deque has no find()
-            std::deque<atom *>::iterator iter = find(
-                BFSStack.begin(),
-                BFSStack.end(),
-                OtherAtom);
-            ASSERT(iter != BFSStack.end(),
-                "CyclicStructureAnalysis_CyclicBFSFromRootToRoot() - can't find "+toString(*OtherAtom)+" on stack!");
-            BFSStack.erase(iter);
-          }
-        } while ((!TouchedStack.empty()) && (PredecessorList[OtherAtom->getNr()] == NULL));
-        TouchedStack.push_front(OtherAtom); // last was wrongly popped
-        OtherAtom = BackEdge->rightatom; // set to not Root
+        LOG(3, "INFO: All bonds are marked cyclic already, checking allcycles whether cycle is already present.");
+        const cycle_t currentcycle = extractCurrentCycle(BackEdge);
+        const cycles_t::const_iterator iter =
+            std::find(allcycles.begin(), allcycles.end(), currentcycle);
+        if (iter == allcycles.end()) { // not found
+          OtherAtom = Root;
+          LOG(2, "INFO: Cycle is not present.");
+          LOG(2, "INFO: We have reached Root " << *OtherAtom << " and may extract the cycle.");
+        } else {
+          LOG(2, "INFO: Cycle is already present.");
+          do {
+            ASSERT(!TouchedStack.empty(), "CyclicStructureAnalysis_CyclicBFSFromRootToRoot() - TouchedStack is empty!");
+            OtherAtom = TouchedStack.front();
+            TouchedStack.pop_front();
+            if (PredecessorList[OtherAtom->getNr()] == Walker) {
+              LOG(4, "INFO: Removing " << *OtherAtom << " from lists and stacks.");
+              PredecessorList[OtherAtom->getNr()] = NULL;
+              ShortestPathList[OtherAtom->getNr()] = -1;
+              ColorList[OtherAtom->getNr()] = GraphEdge::white;
+              // rats ... deque has no find()
+              std::deque<atom *>::iterator iter = find(
+                  BFSStack.begin(),
+                  BFSStack.end(),
+                  OtherAtom);
+              ASSERT(iter != BFSStack.end(),
+                  "CyclicStructureAnalysis_CyclicBFSFromRootToRoot() - can't find "+toString(*OtherAtom)+" on stack!");
+              BFSStack.erase(iter);
+            }
+          } while ((!TouchedStack.empty()) && (PredecessorList[OtherAtom->getNr()] == NULL));
+          TouchedStack.push_front(OtherAtom); // last was wrongly popped
+          OtherAtom = BackEdge->rightatom; // set to not Root
+        }
       } else {
         OtherAtom = Root;
@@ -187,4 +199,31 @@
     }
   } while ((!BFSStack.empty()) && (OtherAtom != Root) && (OtherAtom != NULL)); // || (ShortestPathList[OtherAtom->getNr()] < MinimumRingSize[Walker->GetTrueFather()->getNr()])));
+}
+
+/** Extracts cycle from BFSAccounting::PredecessorList with given \a BackEdge and current \a Root.
+ *
+ * \param BackEdge back edge of this cycle
+ */
+CyclicStructureAnalysis::cycle_t CyclicStructureAnalysis::extractCurrentCycle(
+    bond::ptr &BackEdge)
+{
+  CyclicStructureAnalysis::cycle_t currentcycle;
+  atom *Walker = Root;
+  currentcycle.insert(Walker->GetTrueFather()->getId());
+  std::stringstream output;
+  while (Walker != BackEdge->rightatom) { // leftatom is root
+    Walker = PredecessorList[Walker->getNr()];
+    Walker->GetTrueFather()->IsCyclic = true;
+    output << Walker->getName() << " <-> ";
+#ifndef NDEBUG
+    std::pair< cycle_t::iterator, bool > inserter =
+#endif
+        currentcycle.insert(Walker->GetTrueFather()->getId());
+    ASSERT( inserter.second,
+        "CyclicStructureAnalysis::RetrieveCycleMembers() - we already inserted "
+        +toString(Walker->GetTrueFather()->getId())+" into currentcycle.");
+  }
+  LOG(3, "INFO: " << output.str() << Root->getName());
+  return currentcycle;
 }
 
@@ -208,29 +247,12 @@
     // now climb back the predecessor list and thus find the cycle members
     NumCycles++;
-    RingSize = 1;
     Root->GetTrueFather()->IsCyclic = true;
 
+    // exctract cycle
     {
-      CyclicStructureAnalysis::cycle_t currentcycle;
-      std::stringstream output;
-      output << "Found ring contains: ";
-      Walker = Root;
-      currentcycle.insert(Walker->GetTrueFather()->getId());
-      while (Walker != BackEdge->rightatom) { // leftatom is root
-        output << Walker->getName() << " <-> ";
-        Walker = PredecessorList[Walker->getNr()];
-        Walker->GetTrueFather()->IsCyclic = true;
-#ifndef NDEBUG
-        std::pair< cycle_t::iterator, bool > inserter =
-#endif
-            currentcycle.insert(Walker->GetTrueFather()->getId());
-        ASSERT( inserter.second,
-            "CyclicStructureAnalysis::RetrieveCycleMembers() - we already inserted "
-            +toString(Walker->GetTrueFather()->getId())+" into currentcycle.");
-        RingSize++;
-      }
-      output << Walker->getName() << "  with a length of " << RingSize << ".";
-      LOG(0, "INFO: " << output.str());
-      allcycles.push_back(currentcycle);
+      allcycles.push_back(extractCurrentCycle(BackEdge));
+      CyclicStructureAnalysis::cycle_t &lastcycle = allcycles.back();
+      RingSize = lastcycle.size();
+      LOG(0, "INFO: " << "Found ring contains: " << lastcycle << "  with a length of " << RingSize);
     }
 
Index: src/Graph/CyclicStructureAnalysis.hpp
===================================================================
--- src/Graph/CyclicStructureAnalysis.hpp	(revision 9583126d552a498ec6a0147ae02647de07721eef)
+++ src/Graph/CyclicStructureAnalysis.hpp	(revision ec7511a359cc1cad57d684179dda96580726d26d)
@@ -60,4 +60,5 @@
   void CyclicBFSFromRootToRoot(atom *&OtherAtom, bond::ptr &BackEdge);
   void RetrieveCycleMembers(atom *&OtherAtom, bond::ptr &BackEdge, int &MinRingSize, int &NumCycles);
+  cycle_t extractCurrentCycle(bond::ptr &BackEdge);
   void BFSToNextCycle(atom *Walker);
   void AssignRingSizetoNonCycleMembers(const int MinRingSize, const int NumCycles);
