Index: src/molecule_graph.cpp
===================================================================
--- src/molecule_graph.cpp	(revision 734816af34f8c7429239e028a7a80e4081d008ab)
+++ src/molecule_graph.cpp	(revision a67d19a01c3b0bbb8bd6d255ed9a4ffbe37f3138)
@@ -59,10 +59,10 @@
 
   if (!input) {
-    Log() << Verbose(1) << "Opening silica failed \n";
+    DoLog(1) && (Log() << Verbose(1) << "Opening silica failed \n");
   };
 
   *input >> ws >> atom1;
   *input >> ws >> atom2;
-  Log() << Verbose(1) << "Scanning file\n";
+  DoLog(1) && (Log() << Verbose(1) << "Scanning file\n");
   while (!input->eof()) // Check whether we read everything already
   {
@@ -115,5 +115,5 @@
 
   BondDistance = bonddistance; // * ((IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem);
-  Log() << Verbose(0) << "Begin of CreateAdjacencyList." << endl;
+  DoLog(0) && (Log() << Verbose(0) << "Begin of CreateAdjacencyList." << endl);
   // remove every bond from the list
   bond *Binder = NULL;
@@ -128,12 +128,12 @@
   // count atoms in molecule = dimension of matrix (also give each unique name and continuous numbering)
   CountAtoms();
-  Log() << Verbose(1) << "AtomCount " << AtomCount << " and bonddistance is " << bonddistance << "." << endl;
+  DoLog(1) && (Log() << Verbose(1) << "AtomCount " << AtomCount << " and bonddistance is " << bonddistance << "." << endl);
 
   if ((AtomCount > 1) && (bonddistance > 1.)) {
-    Log() << Verbose(2) << "Creating Linked Cell structure ... " << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Creating Linked Cell structure ... " << endl);
     LC = new LinkedCell(this, bonddistance);
 
     // create a list to map Tesselpoint::nr to atom *
-    Log() << Verbose(2) << "Creating TesselPoint to atom map ... " << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Creating TesselPoint to atom map ... " << endl);
     AtomMap = Calloc<atom *> (AtomCount, "molecule::CreateAdjacencyList - **AtomCount");
     Walker = start;
@@ -144,5 +144,5 @@
 
     // 3a. go through every cell
-    Log() << Verbose(2) << "Celling ... " << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Celling ... " << endl);
     for (LC->n[0] = 0; LC->n[0] < LC->N[0]; LC->n[0]++)
       for (LC->n[1] = 0; LC->n[1] < LC->N[1]; LC->n[1]++)
@@ -183,8 +183,8 @@
     Free(&AtomMap);
     delete (LC);
-    Log() << Verbose(1) << "I detected " << BondCount << " bonds in the molecule with distance " << BondDistance << "." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "I detected " << BondCount << " bonds in the molecule with distance " << BondDistance << "." << endl);
 
     // correct bond degree by comparing valence and bond degree
-    Log() << Verbose(2) << "Correcting bond degree ... " << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Correcting bond degree ... " << endl);
     CorrectBondDegree();
 
@@ -192,6 +192,6 @@
     ActOnAllAtoms( &atom::OutputBondOfAtom );
   } else
-    Log() << Verbose(1) << "AtomCount is " << AtomCount << ", thus no bonds, no connections!." << endl;
-  Log() << Verbose(0) << "End of CreateAdjacencyList." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "AtomCount is " << AtomCount << ", thus no bonds, no connections!." << endl);
+  DoLog(0) && (Log() << Verbose(0) << "End of CreateAdjacencyList." << endl);
   if (free_BG)
     delete(BG);
@@ -204,11 +204,11 @@
 void molecule::OutputBondsList() const
 {
-  Log() << Verbose(1) << endl << "From contents of bond chain list:";
+  DoLog(1) && (Log() << Verbose(1) << endl << "From contents of bond chain list:");
   bond *Binder = first;
   while (Binder->next != last) {
     Binder = Binder->next;
-    Log() << Verbose(0) << *Binder << "\t" << endl;
-  }
-  Log() << Verbose(0) << endl;
+    DoLog(0) && (Log() << Verbose(0) << *Binder << "\t" << endl);
+  }
+  DoLog(0) && (Log() << Verbose(0) << endl);
 }
 ;
@@ -227,14 +227,14 @@
 
   if (BondCount != 0) {
-    Log() << Verbose(1) << "Correcting Bond degree of each bond ... " << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Correcting Bond degree of each bond ... " << endl);
     do {
       OldNo = No;
       No = SumPerAtom( &atom::CorrectBondDegree );
     } while (OldNo != No);
-    Log() << Verbose(0) << " done." << endl;
+    DoLog(0) && (Log() << Verbose(0) << " done." << endl);
   } else {
-    Log() << Verbose(1) << "BondCount is " << BondCount << ", no bonds between any of the " << AtomCount << " atoms." << endl;
-  }
-  Log() << Verbose(0) << No << " bonds could not be corrected." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "BondCount is " << BondCount << ", no bonds between any of the " << AtomCount << " atoms." << endl);
+  }
+  DoLog(0) && (Log() << Verbose(0) << No << " bonds could not be corrected." << endl);
 
   return (No);
@@ -255,5 +255,5 @@
   bond *Binder = first;
   if ((Binder->next != last) && (Binder->next->Type == Undetermined)) {
-    Log() << Verbose(0) << "No Depth-First-Search analysis performed so far, calling ..." << endl;
+    DoLog(0) && (Log() << Verbose(0) << "No Depth-First-Search analysis performed so far, calling ..." << endl);
     Subgraphs = DepthFirstSearchAnalysis(BackEdgeStack);
     while (Subgraphs->next != NULL) {
@@ -310,5 +310,5 @@
     Walker->GraphNr = DFS.CurrentGraphNr;
     Walker->LowpointNr = DFS.CurrentGraphNr;
-    Log() << Verbose(1) << "Setting Walker[" << Walker->Name << "]'s number to " << Walker->GraphNr << " with Lowpoint " << Walker->LowpointNr << "." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Setting Walker[" << Walker->Name << "]'s number to " << Walker->GraphNr << " with Lowpoint " << Walker->LowpointNr << "." << endl);
     DFS.AtomStack->Push(Walker);
     DFS.CurrentGraphNr++;
@@ -337,9 +337,9 @@
     if (Binder == NULL)
       break;
-    Log() << Verbose(2) << "Current Unused Bond is " << *Binder << "." << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Current Unused Bond is " << *Binder << "." << endl);
     // (4) Mark Binder used, ...
     Binder->MarkUsed(black);
     OtherAtom = Binder->GetOtherAtom(Walker);
-    Log() << Verbose(2) << "(4) OtherAtom is " << OtherAtom->Name << "." << endl;
+    DoLog(2) && (Log() << Verbose(2) << "(4) OtherAtom is " << OtherAtom->Name << "." << endl);
     if (OtherAtom->GraphNr != -1) {
       // (4a) ... if "other" atom has been visited (GraphNr != 0), set lowpoint to minimum of both, go to (3)
@@ -347,5 +347,5 @@
       DFS.BackEdgeStack->Push(Binder);
       Walker->LowpointNr = (Walker->LowpointNr < OtherAtom->GraphNr) ? Walker->LowpointNr : OtherAtom->GraphNr;
-      Log() << Verbose(3) << "(4a) Visited: Setting Lowpoint of Walker[" << Walker->Name << "] to " << Walker->LowpointNr << "." << endl;
+      DoLog(3) && (Log() << Verbose(3) << "(4a) Visited: Setting Lowpoint of Walker[" << Walker->Name << "] to " << Walker->LowpointNr << "." << endl);
     } else {
       // (4b) ... otherwise set OtherAtom as Ancestor of Walker and Walker as OtherAtom, go to (2)
@@ -353,5 +353,5 @@
       OtherAtom->Ancestor = Walker;
       Walker = OtherAtom;
-      Log() << Verbose(3) << "(4b) Not Visited: OtherAtom[" << OtherAtom->Name << "]'s Ancestor is now " << OtherAtom->Ancestor->Name << ", Walker is OtherAtom " << OtherAtom->Name << "." << endl;
+      DoLog(3) && (Log() << Verbose(3) << "(4b) Not Visited: OtherAtom[" << OtherAtom->Name << "]'s Ancestor is now " << OtherAtom->Ancestor->Name << ", Walker is OtherAtom " << OtherAtom->Name << "." << endl);
       break;
     }
@@ -375,5 +375,5 @@
 
   // (5) if Ancestor of Walker is ...
-  Log() << Verbose(1) << "(5) Number of Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "] is " << Walker->Ancestor->GraphNr << "." << endl;
+  DoLog(1) && (Log() << Verbose(1) << "(5) Number of Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "] is " << Walker->Ancestor->GraphNr << "." << endl);
 
   if (Walker->Ancestor->GraphNr != DFS.Root->GraphNr) {
@@ -382,23 +382,23 @@
       // (6a) set Ancestor's Lowpoint number to minimum of of its Ancestor and itself, go to Step(8)
       Walker->Ancestor->LowpointNr = (Walker->Ancestor->LowpointNr < Walker->LowpointNr) ? Walker->Ancestor->LowpointNr : Walker->LowpointNr;
-      Log() << Verbose(2) << "(6) Setting Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s Lowpoint to " << Walker->Ancestor->LowpointNr << "." << endl;
+      DoLog(2) && (Log() << Verbose(2) << "(6) Setting Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s Lowpoint to " << Walker->Ancestor->LowpointNr << "." << endl);
     } else {
       // (7) (Ancestor of Walker is a separating vertex, remove all from stack till Walker (including), these and Ancestor form a component
       Walker->Ancestor->SeparationVertex = true;
-      Log() << Verbose(2) << "(7) Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s is a separating vertex, creating component." << endl;
+      DoLog(2) && (Log() << Verbose(2) << "(7) Walker[" << Walker->Name << "]'s Ancestor[" << Walker->Ancestor->Name << "]'s is a separating vertex, creating component." << endl);
       mol->SetNextComponentNumber(Walker->Ancestor, DFS.ComponentNumber);
-      Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Ancestor's Compont is " << DFS.ComponentNumber << "." << endl;
+      DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Ancestor's Compont is " << DFS.ComponentNumber << "." << endl);
       mol->SetNextComponentNumber(Walker, DFS.ComponentNumber);
-      Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl;
+      DoLog(3) && (Log() << Verbose(3) << "(7) Walker[" << Walker->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl);
       do {
         OtherAtom = DFS.AtomStack->PopLast();
         LeafWalker->Leaf->AddCopyAtom(OtherAtom);
         mol->SetNextComponentNumber(OtherAtom, DFS.ComponentNumber);
-        Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl;
+        DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl);
       } while (OtherAtom != Walker);
       DFS.ComponentNumber++;
     }
     // (8) Walker becomes its Ancestor, go to (3)
-    Log() << Verbose(2) << "(8) Walker[" << Walker->Name << "] is now its Ancestor " << Walker->Ancestor->Name << ", backstepping. " << endl;
+    DoLog(2) && (Log() << Verbose(2) << "(8) Walker[" << Walker->Name << "] is now its Ancestor " << Walker->Ancestor->Name << ", backstepping. " << endl);
     Walker = Walker->Ancestor;
     DFS.BackStepping = true;
@@ -424,12 +424,12 @@
     //DFS.AtomStack->Output(out);
     mol->SetNextComponentNumber(DFS.Root, DFS.ComponentNumber);
-    Log() << Verbose(3) << "(9) Root[" << DFS.Root->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl;
+    DoLog(3) && (Log() << Verbose(3) << "(9) Root[" << DFS.Root->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl);
     mol->SetNextComponentNumber(Walker, DFS.ComponentNumber);
-    Log() << Verbose(3) << "(9) Walker[" << Walker->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl;
+    DoLog(3) && (Log() << Verbose(3) << "(9) Walker[" << Walker->Name << "]'s Component is " << DFS.ComponentNumber << "." << endl);
     do {
       OtherAtom = DFS.AtomStack->PopLast();
       LeafWalker->Leaf->AddCopyAtom(OtherAtom);
       mol->SetNextComponentNumber(OtherAtom, DFS.ComponentNumber);
-      Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl;
+      DoLog(3) && (Log() << Verbose(3) << "(7) Other[" << OtherAtom->Name << "]'s Compont is " << DFS.ComponentNumber << "." << endl);
     } while (OtherAtom != Walker);
     DFS.ComponentNumber++;
@@ -438,7 +438,7 @@
     Walker = DFS.Root;
     Binder = mol->FindNextUnused(Walker);
-    Log() << Verbose(1) << "(10) Walker is Root[" << DFS.Root->Name << "], next Unused Bond is " << Binder << "." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "(10) Walker is Root[" << DFS.Root->Name << "], next Unused Bond is " << Binder << "." << endl);
     if (Binder != NULL) { // Root is separation vertex
-      Log() << Verbose(1) << "(11) Root is a separation vertex." << endl;
+      DoLog(1) && (Log() << Verbose(1) << "(11) Root is a separation vertex." << endl);
       Walker->SeparationVertex = true;
     }
@@ -497,5 +497,5 @@
   if (AtomCount == 0)
     return SubGraphs;
-  Log() << Verbose(0) << "Begin of DepthFirstSearchAnalysis" << endl;
+  DoLog(0) && (Log() << Verbose(0) << "Begin of DepthFirstSearchAnalysis" << endl);
   DepthFirstSearchAnalysis_Init(DFS, this);
 
@@ -519,5 +519,5 @@
 
         if (Binder == NULL) {
-          Log() << Verbose(2) << "No more Unused Bonds." << endl;
+          DoLog(2) && (Log() << Verbose(2) << "No more Unused Bonds." << endl);
           break;
         } else
@@ -536,7 +536,7 @@
 
     // From OldGraphNr to CurrentGraphNr ranges an disconnected subgraph
-    Log() << Verbose(0) << "Disconnected subgraph ranges from " << OldGraphNr << " to " << DFS.CurrentGraphNr << "." << endl;
+    DoLog(0) && (Log() << Verbose(0) << "Disconnected subgraph ranges from " << OldGraphNr << " to " << DFS.CurrentGraphNr << "." << endl);
     LeafWalker->Leaf->Output((ofstream *)&cout);
-    Log() << Verbose(0) << endl;
+    DoLog(0) && (Log() << Verbose(0) << endl);
 
     // step on to next root
@@ -556,5 +556,5 @@
   // free all and exit
   DepthFirstSearchAnalysis_Finalize(DFS);
-  Log() << Verbose(0) << "End of DepthFirstSearchAnalysis" << endl;
+  DoLog(0) && (Log() << Verbose(0) << "End of DepthFirstSearchAnalysis" << endl);
   return SubGraphs;
 }
@@ -582,5 +582,5 @@
 void molecule::OutputGraphInfoPerAtom() const
 {
-  Log() << Verbose(1) << "Final graph info for each atom is:" << endl;
+  DoLog(1) && (Log() << Verbose(1) << "Final graph info for each atom is:" << endl);
   ActOnAllAtoms( &atom::OutputGraphInfo );
 }
@@ -592,17 +592,17 @@
 void molecule::OutputGraphInfoPerBond() const
 {
-  Log() << Verbose(1) << "Final graph info for each bond is:" << endl;
+  DoLog(1) && (Log() << Verbose(1) << "Final graph info for each bond is:" << endl);
   bond *Binder = first;
   while (Binder->next != last) {
     Binder = Binder->next;
-    Log() << Verbose(2) << ((Binder->Type == TreeEdge) ? "TreeEdge " : "BackEdge ") << *Binder << ": <";
-    Log() << Verbose(0) << ((Binder->leftatom->SeparationVertex) ? "SP," : "") << "L" << Binder->leftatom->LowpointNr << " G" << Binder->leftatom->GraphNr << " Comp.";
+    DoLog(2) && (Log() << Verbose(2) << ((Binder->Type == TreeEdge) ? "TreeEdge " : "BackEdge ") << *Binder << ": <");
+    DoLog(0) && (Log() << Verbose(0) << ((Binder->leftatom->SeparationVertex) ? "SP," : "") << "L" << Binder->leftatom->LowpointNr << " G" << Binder->leftatom->GraphNr << " Comp.");
     Binder->leftatom->OutputComponentNumber();
-    Log() << Verbose(0) << " ===  ";
-    Log() << Verbose(0) << ((Binder->rightatom->SeparationVertex) ? "SP," : "") << "L" << Binder->rightatom->LowpointNr << " G" << Binder->rightatom->GraphNr << " Comp.";
+    DoLog(0) && (Log() << Verbose(0) << " ===  ");
+    DoLog(0) && (Log() << Verbose(0) << ((Binder->rightatom->SeparationVertex) ? "SP," : "") << "L" << Binder->rightatom->LowpointNr << " G" << Binder->rightatom->GraphNr << " Comp.");
     Binder->rightatom->OutputComponentNumber();
-    Log() << Verbose(0) << ">." << endl;
+    DoLog(0) && (Log() << Verbose(0) << ">." << endl);
     if (Binder->Cyclic) // cyclic ??
-      Log() << Verbose(3) << "Lowpoint at each side are equal: CYCLIC!" << endl;
+      DoLog(3) && (Log() << Verbose(3) << "Lowpoint at each side are equal: CYCLIC!" << endl);
   }
 }
@@ -678,5 +678,5 @@
   do { // look for Root
     Walker = BFS.BFSStack->PopFirst();
-    Log() << Verbose(2) << "Current Walker is " << *Walker << ", we look for SP to Root " << *BFS.Root << "." << endl;
+    DoLog(2) && (Log() << Verbose(2) << "Current Walker is " << *Walker << ", we look for SP to Root " << *BFS.Root << "." << endl);
     for (BondList::const_iterator Runner = Walker->ListOfBonds.begin(); Runner != Walker->ListOfBonds.end(); (++Runner)) {
       if ((*Runner) != BackEdge) { // only walk along DFS spanning tree (otherwise we always find SP of one being backedge Binder)
@@ -685,5 +685,5 @@
         if (OtherAtom->type->Z != 1) {
 #endif
-        Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl;
+        DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl);
         if (BFS.ColorList[OtherAtom->nr] == white) {
           BFS.TouchedStack->Push(OtherAtom);
@@ -691,11 +691,11 @@
           BFS.PredecessorList[OtherAtom->nr] = Walker; // Walker is the predecessor
           BFS.ShortestPathList[OtherAtom->nr] = BFS.ShortestPathList[Walker->nr] + 1;
-          Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " lightgray, its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl;
+          DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " lightgray, its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl);
           //if (BFS.ShortestPathList[OtherAtom->nr] < MinimumRingSize[Walker->GetTrueFather()->nr]) { // Check for maximum distance
-          Log() << Verbose(3) << "Putting OtherAtom into queue." << endl;
+          DoLog(3) && (Log() << Verbose(3) << "Putting OtherAtom into queue." << endl);
           BFS.BFSStack->Push(OtherAtom);
           //}
         } else {
-          Log() << Verbose(3) << "Not Adding, has already been visited." << endl;
+          DoLog(3) && (Log() << Verbose(3) << "Not Adding, has already been visited." << endl);
         }
         if (OtherAtom == BFS.Root)
@@ -703,14 +703,14 @@
 #ifdef ADDHYDROGEN
       } else {
-        Log() << Verbose(2) << "Skipping hydrogen atom " << *OtherAtom << "." << endl;
+        DoLog(2) && (Log() << Verbose(2) << "Skipping hydrogen atom " << *OtherAtom << "." << endl);
         BFS.ColorList[OtherAtom->nr] = black;
       }
 #endif
       } else {
-        Log() << Verbose(2) << "Bond " << *(*Runner) << " not Visiting, is the back edge." << endl;
+        DoLog(2) && (Log() << Verbose(2) << "Bond " << *(*Runner) << " not Visiting, is the back edge." << endl);
       }
     }
     BFS.ColorList[Walker->nr] = black;
-    Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl);
     if (OtherAtom == BFS.Root) { // if we have found the root, check whether this cycle wasn't already found beforehand
       // step through predecessor list
@@ -722,9 +722,9 @@
       }
       if (OtherAtom == BackEdge->rightatom) { // if each atom in found cycle is cyclic, loop's been found before already
-        Log() << Verbose(3) << "This cycle was already found before, skipping and removing seeker from search." << endl;
+        DoLog(3) && (Log() << Verbose(3) << "This cycle was already found before, skipping and removing seeker from search." << endl);
         do {
           OtherAtom = BFS.TouchedStack->PopLast();
           if (BFS.PredecessorList[OtherAtom->nr] == Walker) {
-            Log() << Verbose(4) << "Removing " << *OtherAtom << " from lists and stacks." << endl;
+            DoLog(4) && (Log() << Verbose(4) << "Removing " << *OtherAtom << " from lists and stacks." << endl);
             BFS.PredecessorList[OtherAtom->nr] = NULL;
             BFS.ShortestPathList[OtherAtom->nr] = -1;
@@ -760,13 +760,13 @@
     RingSize = 1;
     BFS.Root->GetTrueFather()->IsCyclic = true;
-    Log() << Verbose(1) << "Found ring contains: ";
+    DoLog(1) && (Log() << Verbose(1) << "Found ring contains: ");
     Walker = BFS.Root;
     while (Walker != BackEdge->rightatom) {
-      Log() << Verbose(0) << Walker->Name << " <-> ";
+      DoLog(0) && (Log() << Verbose(0) << Walker->Name << " <-> ");
       Walker = BFS.PredecessorList[Walker->nr];
       Walker->GetTrueFather()->IsCyclic = true;
       RingSize++;
     }
-    Log() << Verbose(0) << Walker->Name << "  with a length of " << RingSize << "." << endl << endl;
+    DoLog(0) && (Log() << Verbose(0) << Walker->Name << "  with a length of " << RingSize << "." << endl << endl);
     // walk through all and set MinimumRingSize
     Walker = BFS.Root;
@@ -780,5 +780,5 @@
       MinRingSize = RingSize;
   } else {
-    Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[Walker->GetTrueFather()->nr] << " found." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[Walker->GetTrueFather()->nr] << " found." << endl);
   }
 };
@@ -858,9 +858,9 @@
 
       }
-      Log() << Verbose(1) << "Minimum ring size of " << *Root << " is " << MinimumRingSize[Root->GetTrueFather()->nr] << "." << endl;
-    }
-    Log() << Verbose(1) << "Minimum ring size is " << MinRingSize << ", over " << NumCycles << " cycles total." << endl;
+      DoLog(1) && (Log() << Verbose(1) << "Minimum ring size of " << *Root << " is " << MinimumRingSize[Root->GetTrueFather()->nr] << "." << endl);
+    }
+    DoLog(1) && (Log() << Verbose(1) << "Minimum ring size is " << MinRingSize << ", over " << NumCycles << " cycles total." << endl);
   } else
-    Log() << Verbose(1) << "No rings were detected in the molecular structure." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "No rings were detected in the molecular structure." << endl);
 }
 ;
@@ -890,5 +890,5 @@
   //BackEdgeStack->Output(out);
 
-  Log() << Verbose(1) << "Analysing cycles ... " << endl;
+  DoLog(1) && (Log() << Verbose(1) << "Analysing cycles ... " << endl);
   NumCycles = 0;
   while (!BackEdgeStack->IsEmpty()) {
@@ -901,5 +901,5 @@
     ResetBFSAccounting(Walker, BFS);
 
-    Log() << Verbose(1) << "---------------------------------------------------------------------------------------------------------" << endl;
+    DoLog(1) && (Log() << Verbose(1) << "---------------------------------------------------------------------------------------------------------" << endl);
     OtherAtom = NULL;
     CyclicStructureAnalysis_CyclicBFSFromRootToRoot(BackEdge, BFS);
@@ -973,8 +973,8 @@
 void OutputAlreadyVisited(int *list)
 {
-  Log() << Verbose(4) << "Already Visited Bonds:\t";
+  DoLog(4) && (Log() << Verbose(4) << "Already Visited Bonds:\t");
   for (int i = 1; i <= list[0]; i++)
-    Log() << Verbose(0) << list[i] << "  ";
-  Log() << Verbose(0) << endl;
+    DoLog(0) && (Log() << Verbose(0) << list[i] << "  ");
+  DoLog(0) && (Log() << Verbose(0) << endl);
 }
 ;
@@ -997,12 +997,12 @@
     line << filename;
   AdjacencyFile.open(line.str().c_str(), ios::out);
-  Log() << Verbose(1) << "Saving adjacency list ... ";
+  DoLog(1) && (Log() << Verbose(1) << "Saving adjacency list ... ");
   if (AdjacencyFile != NULL) {
     AdjacencyFile << "m\tn" << endl;
     ActOnAllAtoms(&atom::OutputAdjacency, &AdjacencyFile);
     AdjacencyFile.close();
-    Log() << Verbose(1) << "done." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "done." << endl);
   } else {
-    Log() << Verbose(1) << "failed to open file " << line.str() << "." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "failed to open file " << line.str() << "." << endl);
     status = false;
   }
@@ -1029,12 +1029,12 @@
     line << filename;
   BondFile.open(line.str().c_str(), ios::out);
-  Log() << Verbose(1) << "Saving adjacency list ... ";
+  DoLog(1) && (Log() << Verbose(1) << "Saving adjacency list ... ");
   if (BondFile != NULL) {
     BondFile << "m\tn" << endl;
     ActOnAllAtoms(&atom::OutputBonds, &BondFile);
     BondFile.close();
-    Log() << Verbose(1) << "done." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "done." << endl);
   } else {
-    Log() << Verbose(1) << "failed to open file " << line.str() << "." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "failed to open file " << line.str() << "." << endl);
     status = false;
   }
@@ -1049,5 +1049,5 @@
   filename << path << "/" << FRAGMENTPREFIX << ADJACENCYFILE;
   File.open(filename.str().c_str(), ios::out);
-  Log() << Verbose(1) << "Looking at bond structure stored in adjacency file and comparing to present one ... ";
+  DoLog(1) && (Log() << Verbose(1) << "Looking at bond structure stored in adjacency file and comparing to present one ... ");
   if (File == NULL)
     return false;
@@ -1090,5 +1090,5 @@
     //Log() << Verbose(0) << endl;
   } else {
-    Log() << Verbose(0) << "Number of bonds for Atom " << *Walker << " does not match, parsed " << CurrentBondsOfAtom << " against " << Walker->ListOfBonds.size() << "." << endl;
+    DoLog(0) && (Log() << Verbose(0) << "Number of bonds for Atom " << *Walker << " does not match, parsed " << CurrentBondsOfAtom << " against " << Walker->ListOfBonds.size() << "." << endl);
     status = false;
   }
@@ -1113,5 +1113,5 @@
 
   if (!CheckAdjacencyFileAgainstMolecule_Init(path, File, CurrentBonds)) {
-    Log() << Verbose(1) << "Adjacency file not found." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Adjacency file not found." << endl);
     return true;
   }
@@ -1139,7 +1139,7 @@
 
   if (status) { // if equal we parse the KeySetFile
-    Log() << Verbose(1) << "done: Equal." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "done: Equal." << endl);
   } else
-    Log() << Verbose(1) << "done: Not equal by " << NonMatchNumber << " atoms." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "done: Not equal by " << NonMatchNumber << " atoms." << endl);
   return status;
 }
@@ -1157,5 +1157,5 @@
   bool status = true;
   if (ReferenceStack->IsEmpty()) {
-    Log() << Verbose(1) << "ReferenceStack is empty!" << endl;
+    DoLog(1) && (Log() << Verbose(1) << "ReferenceStack is empty!" << endl);
     return false;
   }
@@ -1172,10 +1172,10 @@
         if (OtherAtom == ListOfLocalAtoms[(*Runner)->rightatom->nr]) { // found the bond
           LocalStack->Push((*Runner));
-          Log() << Verbose(3) << "Found local edge " << *(*Runner) << "." << endl;
+          DoLog(3) && (Log() << Verbose(3) << "Found local edge " << *(*Runner) << "." << endl);
           break;
         }
       }
     Binder = ReferenceStack->PopFirst(); // loop the stack for next item
-    Log() << Verbose(3) << "Current candidate edge " << Binder << "." << endl;
+    DoLog(3) && (Log() << Verbose(3) << "Current candidate edge " << Binder << "." << endl);
     ReferenceStack->Push(Binder);
   } while (FirstBond != Binder);
@@ -1226,21 +1226,21 @@
   BFS.PredecessorList[OtherAtom->nr] = Walker; // Walker is the predecessor
   BFS.ShortestPathList[OtherAtom->nr] = BFS.ShortestPathList[Walker->nr] + 1;
-  Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " " << ((BFS.ColorList[OtherAtom->nr] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl;
+  DoLog(2) && (Log() << Verbose(2) << "Coloring OtherAtom " << OtherAtom->Name << " " << ((BFS.ColorList[OtherAtom->nr] == white) ? "white" : "lightgray") << ", its predecessor is " << Walker->Name << " and its Shortest Path is " << BFS.ShortestPathList[OtherAtom->nr] << " egde(s) long." << endl);
   if ((((BFS.ShortestPathList[OtherAtom->nr] < BFS.BondOrder) && (Binder != Bond)))) { // Check for maximum distance
-    Log() << Verbose(3);
+    DoLog(3) && (Log() << Verbose(3));
     if (AddedAtomList[OtherAtom->nr] == NULL) { // add if it's not been so far
       AddedAtomList[OtherAtom->nr] = Mol->AddCopyAtom(OtherAtom);
-      Log() << Verbose(0) << "Added OtherAtom " << OtherAtom->Name;
+      DoLog(0) && (Log() << Verbose(0) << "Added OtherAtom " << OtherAtom->Name);
       AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->nr], AddedAtomList[OtherAtom->nr], Binder);
-      Log() << Verbose(0) << " and bond " << *(AddedBondList[Binder->nr]) << ", ";
+      DoLog(0) && (Log() << Verbose(0) << " and bond " << *(AddedBondList[Binder->nr]) << ", ");
     } else { // this code should actually never come into play (all white atoms are not yet present in BondMolecule, that's why they are white in the first place)
-      Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom->Name;
+      DoLog(0) && (Log() << Verbose(0) << "Not adding OtherAtom " << OtherAtom->Name);
       if (AddedBondList[Binder->nr] == NULL) {
         AddedBondList[Binder->nr] = Mol->CopyBond(AddedAtomList[Walker->nr], AddedAtomList[OtherAtom->nr], Binder);
-        Log() << Verbose(0) << ", added Bond " << *(AddedBondList[Binder->nr]);
+        DoLog(0) && (Log() << Verbose(0) << ", added Bond " << *(AddedBondList[Binder->nr]));
       } else
-        Log() << Verbose(0) << ", not added Bond ";
-    }
-    Log() << Verbose(0) << ", putting OtherAtom into queue." << endl;
+        DoLog(0) && (Log() << Verbose(0) << ", not added Bond ");
+    }
+    DoLog(0) && (Log() << Verbose(0) << ", putting OtherAtom into queue." << endl);
     BFS.BFSStack->Push(OtherAtom);
   } else { // out of bond order, then replace
@@ -1248,9 +1248,9 @@
       BFS.ColorList[OtherAtom->nr] = white; // unmark if it has not been queued/added, to make it available via its other bonds (cyclic)
     if (Binder == Bond)
-      Log() << Verbose(3) << "Not Queueing, is the Root bond";
+      DoLog(3) && (Log() << Verbose(3) << "Not Queueing, is the Root bond");
     else if (BFS.ShortestPathList[OtherAtom->nr] >= BFS.BondOrder)
-      Log() << Verbose(3) << "Not Queueing, is out of Bond Count of " << BFS.BondOrder;
+      DoLog(3) && (Log() << Verbose(3) << "Not Queueing, is out of Bond Count of " << BFS.BondOrder);
     if (!Binder->Cyclic)
-      Log() << Verbose(0) << ", is not part of a cyclic bond, saturating bond with Hydrogen." << endl;
+      DoLog(0) && (Log() << Verbose(0) << ", is not part of a cyclic bond, saturating bond with Hydrogen." << endl);
     if (AddedBondList[Binder->nr] == NULL) {
       if ((AddedAtomList[OtherAtom->nr] != NULL)) { // .. whether we add or saturate
@@ -1269,5 +1269,5 @@
 void BreadthFirstSearchAdd_VisitedNode(molecule *Mol, struct BFSAccounting &BFS, atom *&Walker, atom *&OtherAtom, bond *&Binder, bond *&Bond, atom **&AddedAtomList, bond **&AddedBondList, bool IsAngstroem)
 {
-  Log() << Verbose(3) << "Not Adding, has already been visited." << endl;
+  DoLog(3) && (Log() << Verbose(3) << "Not Adding, has already been visited." << endl);
   // This has to be a cyclic bond, check whether it's present ...
   if (AddedBondList[Binder->nr] == NULL) {
@@ -1315,10 +1315,10 @@
     // followed by n+1 till top of stack.
     Walker = BFS.BFSStack->PopFirst(); // pop oldest added
-    Log() << Verbose(1) << "Current Walker is: " << Walker->Name << ", and has " << Walker->ListOfBonds.size() << " bonds." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Current Walker is: " << Walker->Name << ", and has " << Walker->ListOfBonds.size() << " bonds." << endl);
     for (BondList::const_iterator Runner = Walker->ListOfBonds.begin(); Runner != Walker->ListOfBonds.end(); (++Runner)) {
       if ((*Runner) != NULL) { // don't look at bond equal NULL
         Binder = (*Runner);
         OtherAtom = (*Runner)->GetOtherAtom(Walker);
-        Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl;
+        DoLog(2) && (Log() << Verbose(2) << "Current OtherAtom is: " << OtherAtom->Name << " for bond " << *(*Runner) << "." << endl);
         if (BFS.ColorList[OtherAtom->nr] == white) {
           BreadthFirstSearchAdd_UnvisitedNode(Mol, BFS, Walker, OtherAtom, Binder, Bond, AddedAtomList, AddedBondList, IsAngstroem);
@@ -1329,5 +1329,5 @@
     }
     BFS.ColorList[Walker->nr] = black;
-    Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl;
+    DoLog(1) && (Log() << Verbose(1) << "Coloring Walker " << Walker->Name << " black." << endl);
   }
   BreadthFirstSearchAdd_Free(BFS);
@@ -1354,5 +1354,5 @@
   // reset parent list
   ParentList = Calloc<atom*> (AtomCount, "molecule::BuildInducedSubgraph_Init: **ParentList");
-  Log() << Verbose(3) << "Resetting ParentList." << endl;
+  DoLog(3) && (Log() << Verbose(3) << "Resetting ParentList." << endl);
 }
 ;
@@ -1361,5 +1361,5 @@
 {
   // fill parent list with sons
-  Log() << Verbose(3) << "Filling Parent List." << endl;
+  DoLog(3) && (Log() << Verbose(3) << "Filling Parent List." << endl);
   atom *Walker = mol->start;
   while (Walker->next != mol->end) {
@@ -1367,5 +1367,5 @@
     ParentList[Walker->father->nr] = Walker;
     // Outputting List for debugging
-    Log() << Verbose(4) << "Son[" << Walker->father->nr << "] of " << Walker->father << " is " << ParentList[Walker->father->nr] << "." << endl;
+    DoLog(4) && (Log() << Verbose(4) << "Son[" << Walker->father->nr << "] of " << Walker->father << " is " << ParentList[Walker->father->nr] << "." << endl);
   }
 
@@ -1385,5 +1385,5 @@
   atom *OtherAtom = NULL;
   // check each entry of parent list and if ok (one-to-and-onto matching) create bonds
-  Log() << Verbose(3) << "Creating bonds." << endl;
+  DoLog(3) && (Log() << Verbose(3) << "Creating bonds." << endl);
   Walker = Father->start;
   while (Walker->next != Father->end) {
@@ -1396,5 +1396,5 @@
           OtherAtom = (*Runner)->GetOtherAtom(Walker);
           if (ParentList[OtherAtom->nr] != NULL) { // if otheratom is also a father of an atom on this molecule, create the bond
-            Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[Walker->nr]->Name << " and " << ParentList[OtherAtom->nr]->Name << "." << endl;
+            DoLog(4) && (Log() << Verbose(4) << "Endpoints of Bond " << (*Runner) << " are both present: " << ParentList[Walker->nr]->Name << " and " << ParentList[OtherAtom->nr]->Name << "." << endl);
             mol->AddBond(ParentList[Walker->nr], ParentList[OtherAtom->nr], (*Runner)->BondDegree);
           }
@@ -1421,10 +1421,10 @@
   atom **ParentList = NULL;
 
-  Log() << Verbose(2) << "Begin of BuildInducedSubgraph." << endl;
+  DoLog(2) && (Log() << Verbose(2) << "Begin of BuildInducedSubgraph." << endl);
   BuildInducedSubgraph_Init(ParentList, Father->AtomCount);
   BuildInducedSubgraph_FillParentList(this, Father, ParentList);
   status = BuildInducedSubgraph_CreateBondsFromParent(this, Father, ParentList);
   BuildInducedSubgraph_Finalize(ParentList);
-  Log() << Verbose(2) << "End of BuildInducedSubgraph." << endl;
+  DoLog(2) && (Log() << Verbose(2) << "End of BuildInducedSubgraph." << endl);
   return status;
 }
@@ -1443,6 +1443,6 @@
   int size;
 
-  Log() << Verbose(1) << "Begin of CheckForConnectedSubgraph" << endl;
-  Log() << Verbose(2) << "Disconnected atom: ";
+  DoLog(1) && (Log() << Verbose(1) << "Begin of CheckForConnectedSubgraph" << endl);
+  DoLog(2) && (Log() << Verbose(2) << "Disconnected atom: ");
 
   // count number of atoms in graph
@@ -1466,15 +1466,15 @@
       }
       if (!BondStatus) {
-        Log() << Verbose(0) << (*Walker) << endl;
+        DoLog(0) && (Log() << Verbose(0) << (*Walker) << endl);
         return false;
       }
     }
   else {
-    Log() << Verbose(0) << "none." << endl;
+    DoLog(0) && (Log() << Verbose(0) << "none." << endl);
     return true;
   }
-  Log() << Verbose(0) << "none." << endl;
-
-  Log() << Verbose(1) << "End of CheckForConnectedSubgraph" << endl;
+  DoLog(0) && (Log() << Verbose(0) << "none." << endl);
+
+  DoLog(1) && (Log() << Verbose(1) << "End of CheckForConnectedSubgraph" << endl);
 
   return true;
