Index: src/molecule_graph.cpp
===================================================================
--- src/molecule_graph.cpp	(revision e138deb122b004848fade8680e29c2fb80aeb317)
+++ src/molecule_graph.cpp	(revision e5ad5c3df7c9095bb2e7bac5d6425aa9d5c295b3)
@@ -147,9 +147,9 @@
         for (LC->n[2] = 0; LC->n[2] < LC->N[2]; LC->n[2]++) {
           const LinkedNodes *List = LC->GetCurrentCell();
-          //Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
+//          Log() << Verbose(2) << "Current cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
           if (List != NULL) {
             for (LinkedNodes::const_iterator Runner = List->begin(); Runner != List->end(); Runner++) {
               Walker = AtomMap[(*Runner)->nr];
-              //Log() << Verbose(0) << "Current Atom is " << *Walker << "." << endl;
+//              Log() << Verbose(0) << "Current Atom is " << *Walker << "." << endl;
               // 3c. check for possible bond between each atom in this and every one in the 27 cells
               for (n[0] = -1; n[0] <= 1; n[0]++)
@@ -157,18 +157,24 @@
                   for (n[2] = -1; n[2] <= 1; n[2]++) {
                     const LinkedNodes *OtherList = LC->GetRelativeToCurrentCell(n);
-                    //Log() << Verbose(2) << "Current relative cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
+//                    Log() << Verbose(2) << "Current relative cell is " << LC->n[0] << ", " << LC->n[1] << ", " << LC->n[2] << " with No. " << LC->index << " containing " << List->size() << " points." << endl;
                     if (OtherList != NULL) {
                       for (LinkedNodes::const_iterator OtherRunner = OtherList->begin(); OtherRunner != OtherList->end(); OtherRunner++) {
                         if ((*OtherRunner)->nr > Walker->nr) {
                           OtherWalker = AtomMap[(*OtherRunner)->nr];
-                          //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl;
+//                          Log() << Verbose(0) << "Current other Atom is " << *OtherWalker << "." << endl;
+                          const double distance = OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size);
+//                          Log() << Verbose(1) << "Checking distance " << distance << " against typical bond length of " << bonddistance*bonddistance << "." << endl;
                           (BG->*minmaxdistance)(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
-                          const double distance = OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size);
                           const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance);
-                          if ((OtherWalker->father->nr > Walker->father->nr) && (status)) { // create bond if distance is smaller
-                            //Log() << Verbose(1) << "Adding Bond between " << *Walker << " and " << *OtherWalker << " in distance " << sqrt(distance) << "." << endl;
-                            AddBond(Walker->father, OtherWalker->father, 1); // also increases molecule::BondCount
+//                          Log() << Verbose(1) << "MinDistance is " << MinDistance << " and MaxDistance is " << MaxDistance << "." << endl;
+                          if (OtherWalker->father->nr > Walker->father->nr) {
+                            if (status) { // create bond if distance is smaller
+//                              Log() << Verbose(1) << "Adding Bond between " << *Walker << " and " << *OtherWalker << " in distance " << sqrt(distance) << "." << endl;
+                              AddBond(Walker->father, OtherWalker->father, 1); // also increases molecule::BondCount
+                            } else {
+//                              Log() << Verbose(1) << "Not Adding: distance too great." << endl;
+                            }
                           } else {
-                            //Log() << Verbose(1) << "Not Adding: Wrong label order or distance too great." << endl;
+//                            Log() << Verbose(1) << "Not Adding: Wrong order of labels." << endl;
                           }
                         }
Index: src/unittests/bondgraphunittest.cpp
===================================================================
--- src/unittests/bondgraphunittest.cpp	(revision e138deb122b004848fade8680e29c2fb80aeb317)
+++ src/unittests/bondgraphunittest.cpp	(revision e5ad5c3df7c9095bb2e7bac5d6425aa9d5c295b3)
@@ -19,4 +19,5 @@
 #include "bondgraph.hpp"
 #include "element.hpp"
+#include "log.hpp"
 #include "molecule.hpp"
 #include "periodentafel.hpp"
@@ -41,8 +42,12 @@
   hydrogen = new element;
   hydrogen->Z = 1;
+  hydrogen->CovalentRadius = 0.23;
+  hydrogen->VanDerWaalsRadius = 1.09;
   strcpy(hydrogen->name, "hydrogen");
   strcpy(hydrogen->symbol, "H");
   carbon = new element;
-  carbon->Z = 1;
+  carbon->Z = 2;
+  carbon->CovalentRadius = 0.68;
+  carbon->VanDerWaalsRadius = 1.7;
   strcpy(carbon->name, "carbon");
   strcpy(carbon->symbol, "C");
@@ -57,17 +62,17 @@
   TestMolecule = new molecule(tafel);
   Walker = new atom();
-  Walker->type = hydrogen;
+  Walker->type = carbon;
   Walker->node->Init(1., 0., 1. );
   TestMolecule->AddAtom(Walker);
   Walker = new atom();
-  Walker->type = hydrogen;
+  Walker->type = carbon;
   Walker->node->Init(0., 1., 1. );
   TestMolecule->AddAtom(Walker);
   Walker = new atom();
-  Walker->type = hydrogen;
+  Walker->type = carbon;
   Walker->node->Init(1., 1., 0. );
   TestMolecule->AddAtom(Walker);
   Walker = new atom();
-  Walker->type = hydrogen;
+  Walker->type = carbon;
   Walker->node->Init(0., 0., 0. );
   TestMolecule->AddAtom(Walker);
@@ -77,4 +82,5 @@
 
   // create a small file with table
+  dummyname = new string("dummy.dat");
   filename = new string("test.dat");
   ofstream test(filename->c_str());
@@ -91,4 +97,5 @@
   remove(filename->c_str());
   delete(filename);
+  delete(dummyname);
   delete(BG);
 
@@ -112,5 +119,5 @@
 /** UnitTest for BondGraphTest::ConstructBondGraph().
  */
-void BondGraphTest::ConstructGraphTest()
+void BondGraphTest::ConstructGraphFromTableTest()
 {
   atom *Walker = TestMolecule->start->next;
@@ -118,4 +125,16 @@
   CPPUNIT_ASSERT( TestMolecule->end != Walker );
   CPPUNIT_ASSERT_EQUAL( true , BG->LoadBondLengthTable(*filename) );
+  CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph(TestMolecule) );
+  CPPUNIT_ASSERT_EQUAL( true , Walker->IsBondedTo(Runner) );
+};
+
+/** UnitTest for BondGraphTest::ConstructBondGraph().
+ */
+void BondGraphTest::ConstructGraphFromCovalentRadiiTest()
+{
+  atom *Walker = TestMolecule->start->next;
+  atom *Runner = TestMolecule->end->previous;
+  CPPUNIT_ASSERT( TestMolecule->end != Walker );
+  CPPUNIT_ASSERT_EQUAL( false , BG->LoadBondLengthTable(*dummyname) );
   CPPUNIT_ASSERT_EQUAL( true , BG->ConstructBondGraph(TestMolecule) );
   CPPUNIT_ASSERT_EQUAL( true , Walker->IsBondedTo(Runner) );
Index: src/unittests/bondgraphunittest.hpp
===================================================================
--- src/unittests/bondgraphunittest.hpp	(revision e138deb122b004848fade8680e29c2fb80aeb317)
+++ src/unittests/bondgraphunittest.hpp	(revision e5ad5c3df7c9095bb2e7bac5d6425aa9d5c295b3)
@@ -23,5 +23,6 @@
     CPPUNIT_TEST_SUITE( BondGraphTest) ;
     CPPUNIT_TEST ( LoadTableTest );
-    CPPUNIT_TEST ( ConstructGraphTest );
+    CPPUNIT_TEST ( ConstructGraphFromTableTest );
+    CPPUNIT_TEST ( ConstructGraphFromCovalentRadiiTest );
     CPPUNIT_TEST_SUITE_END();
 
@@ -30,5 +31,6 @@
       void tearDown();
       void LoadTableTest();
-      void ConstructGraphTest();
+      void ConstructGraphFromTableTest();
+      void ConstructGraphFromCovalentRadiiTest();
 
 private:
@@ -41,4 +43,5 @@
       BondGraph *BG;
       string *filename;
+      string *dummyname;
 };
 
