Index: src/molecule.cpp
===================================================================
--- src/molecule.cpp	(revision ba94c53b55b13c65d4a227ddc75d8d7e657d9670)
+++ src/molecule.cpp	(revision 47d0416c5a62d6d7eb14391e14c7f3f576fb1673)
@@ -322,4 +322,5 @@
 bool molecule::AddHydrogenReplacementAtom(bond *TopBond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem)
 {
+//  Info info(__func__);
   bool AllWentWell = true;    // flag gathering the boolean return value of molecule::AddAtom and other functions, as return value on exit
   OBSERVE;
@@ -335,5 +336,4 @@
   bond *Binder = NULL;
 
-//  Log() << Verbose(3) << "Begin of AddHydrogenReplacementAtom." << endl;
   // create vector in direction of bond
   InBondvector = TopReplacement->getPosition() - TopOrigin->getPosition();
@@ -347,7 +347,5 @@
       BG->getMinMaxDistance(TopOrigin,TopReplacement));
   if (!MinMaxBondDistance.isInRange(bondlength)) {
-//    Log() << Verbose(4) << "InBondvector is: ";
-//    InBondvector.Output(out);
-//    Log() << Verbose(0) << endl;
+//    LOG(4, "InBondvector is: " << InBondvector << ".");
     Orthovector1.Zero();
     for (int i=NDIM;i--;) {
@@ -360,7 +358,5 @@
     InBondvector -= Orthovector1; // subtract just the additional translation
     bondlength = InBondvector.Norm();
-//    Log() << Verbose(4) << "Corrected InBondvector is now: ";
-//    InBondvector.Output(out);
-//    Log() << Verbose(0) << endl;
+//    LOG(4, "INFO: Corrected InBondvector is now: " << InBondvector << ".");
   } // periodic correction finished
 
@@ -370,5 +366,5 @@
   BondRescale = TopOrigin->getType()->getHBondDistance(TopBond->BondDegree-1);
   if (BondRescale == -1) {
-    DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond distance in replacing bond (" << TopOrigin->getName() << "<->" << TopReplacement->getName() << ") of degree " << TopBond->BondDegree << "!" << endl);
+    ELOG(1, "There is no typical hydrogen bond distance in replacing bond (" << TopOrigin->getName() << "<->" << TopReplacement->getName() << ") of degree " << TopBond->BondDegree << "!");
     return false;
     BondRescale = bondlength;
@@ -394,7 +390,5 @@
       FirstOtherAtom->setPosition(TopOrigin->getPosition() + InBondvector); // set coordination to origin and add distance vector to replacement atom
       AllWentWell = AllWentWell && AddAtom(FirstOtherAtom);
-//      Log() << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";
-//      FirstOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
+//      LOG(4, "INFO: Added " << *FirstOtherAtom << " at: " << FirstOtherAtom->x << ".");
       Binder = AddBond(BottomOrigin, FirstOtherAtom, 1);
       Binder->Cyclic = false;
@@ -416,5 +410,5 @@
               SecondOtherAtom = (*Runner)->GetOtherAtom(TopOrigin);
             } else {
-              DoeLog(2) && (eLog()<< Verbose(2) << "Detected more than four bonds for atom " << TopOrigin->getName());
+              ELOG(2, "Detected more than four bonds for atom " << TopOrigin->getName());
             }
           }
@@ -426,5 +420,5 @@
       }
       if (FirstOtherAtom != NULL) { // then we just have this double bond and the plane does not matter at all
-//        Log() << Verbose(3) << "Regarding the double bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") to be constructed: Taking " << FirstOtherAtom->Name << " and " << SecondOtherAtom->Name << " along with " << TopOrigin->Name << " to determine orthogonal plane." << endl;
+//        LOG(3, "Regarding the double bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") to be constructed: Taking " << FirstOtherAtom->Name << " and " << SecondOtherAtom->Name << " along with " << TopOrigin->Name << " to determine orthogonal plane.");
 
         // determine the plane of these two with the *origin
@@ -433,5 +427,5 @@
         }
         catch(LinearDependenceException &excp){
-          Log() << Verbose(0) << boost::diagnostic_information(excp);
+          LOG(0, boost::diagnostic_information(excp));
           // TODO: figure out what to do with the Orthovector in this case
           AllWentWell = false;
@@ -440,11 +434,9 @@
         Orthovector1.GetOneNormalVector(InBondvector);
       }
-      //Log() << Verbose(3)<< "Orthovector1: ";
-      //Orthovector1.Output(out);
-      //Log() << Verbose(0) << endl;
+      //LOG(3, "INFO: Orthovector1: " << Orthovector1 << ".");
       // orthogonal vector and bond vector between origin and replacement form the new plane
       Orthovector1.MakeNormalTo(InBondvector);
       Orthovector1.Normalize();
-      //Log() << Verbose(3) << "ReScaleCheck: " << Orthovector1.Norm() << " and " << InBondvector.Norm() << "." << endl;
+      //LOG(3, "ReScaleCheck: " << Orthovector1.Norm() << " and " << InBondvector.Norm() << ".");
 
       // create the two Hydrogens ...
@@ -461,16 +453,11 @@
       bondangle = TopOrigin->getType()->getHBondAngle(1);
       if (bondangle == -1) {
-        DoeLog(1) && (eLog()<< Verbose(1) << "There is no typical hydrogen bond angle in replacing bond (" << TopOrigin->getName() << "<->" << TopReplacement->getName() << ") of degree " << TopBond->BondDegree << "!" << endl);
+        ELOG(1, "There is no typical hydrogen bond angle in replacing bond (" << TopOrigin->getName() << "<->" << TopReplacement->getName() << ") of degree " << TopBond->BondDegree << "!");
         return false;
         bondangle = 0;
       }
       bondangle *= M_PI/180./2.;
-//      Log() << Verbose(3) << "ReScaleCheck: InBondvector ";
-//      InBondvector.Output(out);
-//      Log() << Verbose(0) << endl;
-//      Log() << Verbose(3) << "ReScaleCheck: Orthovector ";
-//      Orthovector1.Output(out);
-//      Log() << Verbose(0) << endl;
-//      Log() << Verbose(3) << "Half the bond angle is " << bondangle << ", sin and cos of it: " << sin(bondangle) << ", " << cos(bondangle) << endl;
+//      LOG(3, "INFO: ReScaleCheck: InBondvector " << InBondvector << ", " << Orthovector1 << ".");
+//      LOG(3, "Half the bond angle is " << bondangle << ", sin and cos of it: " << sin(bondangle) << ", " << cos(bondangle));
       FirstOtherAtom->Zero();
       SecondOtherAtom->Zero();
@@ -481,5 +468,5 @@
       FirstOtherAtom->Scale(BondRescale);  // rescale by correct BondDistance
       SecondOtherAtom->Scale(BondRescale);
-      //Log() << Verbose(3) << "ReScaleCheck: " << FirstOtherAtom->x.Norm() << " and " << SecondOtherAtom->x.Norm() << "." << endl;
+      //LOG(3, "ReScaleCheck: " << FirstOtherAtom->x.Norm() << " and " << SecondOtherAtom->x.Norm() << ".");
       *FirstOtherAtom += TopOrigin->getPosition();
       *SecondOtherAtom += TopOrigin->getPosition();
@@ -487,10 +474,6 @@
       AllWentWell = AllWentWell && AddAtom(FirstOtherAtom);
       AllWentWell = AllWentWell && AddAtom(SecondOtherAtom);
-//      Log() << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";
-//      FirstOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
-//      Log() << Verbose(4) << "Added " << *SecondOtherAtom << " at: ";
-//      SecondOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
+//      LOG(4, "INFO: Added " << *FirstOtherAtom << " at: " << FirstOtherAtom->x << ".");
+//      LOG(4, "INFO: Added " << *SecondOtherAtom << " at: " << SecondOtherAtom->x << ".");
       Binder = AddBond(BottomOrigin, FirstOtherAtom, 1);
       Binder->Cyclic = false;
@@ -520,17 +503,13 @@
       // we need to vectors orthonormal the InBondvector
       AllWentWell = AllWentWell && Orthovector1.GetOneNormalVector(InBondvector);
-//      Log() << Verbose(3) << "Orthovector1: ";
-//      Orthovector1.Output(out);
-//      Log() << Verbose(0) << endl;
+//      LOG(3, "INFO: Orthovector1: " << Orthovector1 << ".");
       try{
         Orthovector2 = Plane(InBondvector, Orthovector1,0).getNormal();
       }
       catch(LinearDependenceException &excp) {
-        Log() << Verbose(0) << boost::diagnostic_information(excp);
+        LOG(0, boost::diagnostic_information(excp));
         AllWentWell = false;
       }
-//      Log() << Verbose(3) << "Orthovector2: ";
-//      Orthovector2.Output(out);
-//      Log() << Verbose(0) << endl;
+//      LOG(3, "INFO: Orthovector2: " << Orthovector2 << ".")
 
       // create correct coordination for the three atoms
@@ -541,6 +520,6 @@
       f = b/sqrt(3.);   // length for Orthvector1
       g = b/2.;         // length for Orthvector2
-//      Log() << Verbose(3) << "Bond length and half-angle: " << l << ", " << alpha << "\t (b,d,f,g) = " << b << ", " << d << ", " << f << ", " << g << ", " << endl;
-//      Log() << Verbose(3) << "The three Bond lengths: " << sqrt(d*d+f*f) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << ", "  << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << endl;
+//      LOG(3, "Bond length and half-angle: " << l << ", " << alpha << "\t (b,d,f,g) = " << b << ", " << d << ", " << f << ", " << g << ", ");
+//      LOG(3, "The three Bond lengths: " << sqrt(d*d+f*f) << ", " << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g) << ", "  << sqrt(d*d+(-0.5*f)*(-0.5*f)+g*g));
       factors[0] = d;
       factors[1] = f;
@@ -567,13 +546,7 @@
       AllWentWell = AllWentWell && AddAtom(SecondOtherAtom);
       AllWentWell = AllWentWell && AddAtom(ThirdOtherAtom);
-//      Log() << Verbose(4) << "Added " << *FirstOtherAtom << " at: ";
-//      FirstOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
-//      Log() << Verbose(4) << "Added " << *SecondOtherAtom << " at: ";
-//      SecondOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
-//      Log() << Verbose(4) << "Added " << *ThirdOtherAtom << " at: ";
-//      ThirdOtherAtom->x.Output(out);
-//      Log() << Verbose(0) << endl;
+//      LOG(4, "INFO: Added " << *FirstOtherAtom << " at: " << FirstOtherAtom->x << ".");
+//      LOG(4, "INFO: Added " << *SecondOtherAtom << " at: " << SecondOtherAtom->x << ".");
+//      LOG(4, "INFO: Added " << *ThirdOtherAtom << " at: " << ThirdOtherAtom->x << ".");
       Binder = AddBond(BottomOrigin, FirstOtherAtom, 1);
       Binder->Cyclic = false;
@@ -587,10 +560,9 @@
       break;
     default:
-      DoeLog(1) && (eLog()<< Verbose(1) << "BondDegree does not state single, double or triple bond!" << endl);
+      ELOG(1, "BondDegree does not state single, double or triple bond!");
       AllWentWell = false;
       break;
   }
 
-//  Log() << Verbose(3) << "End of AddHydrogenReplacementAtom." << endl;
   return AllWentWell;
 };
@@ -621,7 +593,7 @@
   input = new istringstream(line);
   *input >> NumberOfAtoms;
-  DoLog(0) && (Log() << Verbose(0) << "Parsing " << NumberOfAtoms << " atoms in file." << endl);
+  LOG(0, "Parsing " << NumberOfAtoms << " atoms in file.");
   getline(xyzfile,line,'\n'); // Read comment
-  DoLog(1) && (Log() << Verbose(1) << "Comment: " << line << endl);
+  LOG(1, "Comment: " << line);
 
   if (MDSteps == 0) // no atoms yet present
@@ -632,5 +604,5 @@
     istringstream *item = new istringstream(line);
     //istringstream input(line);
-    //Log() << Verbose(1) << "Reading: " << line << endl;
+    //LOG(1, "Reading: " << line);
     *item >> shorthand;
     *item >> x[0];
@@ -639,5 +611,5 @@
     Walker->setType(elemente->FindElement(shorthand));
     if (Walker->getType() == NULL) {
-      DoeLog(1) && (eLog()<< Verbose(1) << "Could not parse the element at line: '" << line << "', setting to H.");
+      ELOG(1, "Could not parse the element at line: '" << line << "', setting to H.");
       Walker->setType(1);
     }
@@ -758,5 +730,5 @@
 bool molecule::RemoveBond(bond *pointer)
 {
-  //DoeLog(1) && (eLog()<< Verbose(1) << "molecule::RemoveBond: Function not implemented yet." << endl);
+  //ELOG(1, "molecule::RemoveBond: Function not implemented yet.");
   delete(pointer);
   return true;
@@ -770,5 +742,5 @@
 bool molecule::RemoveBonds(atom *BondPartner)
 {
-  //DoeLog(1) && (eLog()<< Verbose(1) << "molecule::RemoveBond: Function not implemented yet." << endl);
+  //ELOG(1, "molecule::RemoveBond: Function not implemented yet.");
   BondPartner->removeAllBonds();
   return false;
@@ -853,8 +825,8 @@
       break;
   if (iter != end()) {
-    //Log() << Verbose(0) << "Found Atom Nr. " << walker->getNr() << endl;
+    //LOG(0, "Found Atom Nr. " << walker->getNr());
     return (*iter);
   } else {
-    DoLog(0) && (Log() << Verbose(0) << "Atom not found in list." << endl);
+    LOG(0, "Atom not found in list.");
     return NULL;
   }
@@ -869,8 +841,8 @@
   atom *ion = NULL;
   do {
-    //Log() << Verbose(0) << "============Atom list==========================" << endl;
+    //std::cout << "============Atom list==========================" << std::endl;
     //mol->Output((ofstream *)&cout);
-    //Log() << Verbose(0) << "===============================================" << endl;
-    DoLog(0) && (Log() << Verbose(0) << text);
+    //std::cout << "===============================================" << std::endl;
+    std::cout << text;
     cin >> No;
     ion = this->FindAtom(No);
@@ -1007,5 +979,5 @@
     sstr << (*iter)->getType()->getSymbol() << (*iter)->getNr()+1;
     (*iter)->setName(sstr.str());
-    DoLog(3) && (Log() << Verbose(3) << "Naming atom nr. " << (*iter)->getNr() << " " << (*iter)->getName() << "." << endl);
+    LOG(3, "Naming atom nr. " << (*iter)->getNr() << " " << (*iter)->getName() << ".");
     i++;
   }
@@ -1040,5 +1012,5 @@
 int * molecule::GetFatherSonAtomicMap(molecule *OtherMolecule)
 {
-  DoLog(3) && (Log() << Verbose(3) << "Begin of GetFatherAtomicMap." << endl);
+  LOG(3, "Begin of GetFatherAtomicMap.");
   int *AtomicMap = new int[getAtomCount()];
   for (int i=getAtomCount();i--;)
@@ -1047,7 +1019,8 @@
     for (int i=getAtomCount();i--;) // no need as -1 means already that there is trivial correspondence
       AtomicMap[i] = i;
-    DoLog(4) && (Log() << Verbose(4) << "Map is trivial." << endl);
+    LOG(4, "Map is trivial.");
   } else {
-    DoLog(4) && (Log() << Verbose(4) << "Map is ");
+    std::stringstream output;
+    output << "Map is ";
     for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
       if ((*iter)->father == NULL) {
@@ -1057,14 +1030,14 @@
       //for (int i=0;i<AtomCount;i++) { // search atom
         //for (int j=0;j<OtherMolecule->getAtomCount();j++) {
-          //Log() << Verbose(4) << "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << "." << endl;
+          //LOG(4, "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << ".");
           if ((*iter)->father == (*runner))
             AtomicMap[(*iter)->getNr()] = (*runner)->getNr();
         }
       }
-      DoLog(0) && (Log() << Verbose(0) << AtomicMap[(*iter)->getNr()] << "\t");
+      output << AtomicMap[(*iter)->getNr()] << "\t";
     }
-    DoLog(0) && (Log() << Verbose(0) << endl);
-  }
-  DoLog(3) && (Log() << Verbose(3) << "End of GetFatherAtomicMap." << endl);
+    LOG(4, output.str());
+  }
+  LOG(3, "End of GetFatherAtomicMap.");
   return AtomicMap;
 };
