Index: src/Actions/MoleculeAction/BondFileAction.cpp
===================================================================
--- src/Actions/MoleculeAction/BondFileAction.cpp	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/Actions/MoleculeAction/BondFileAction.cpp	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -20,4 +20,5 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include "bondgraph.hpp"
 #include "CodePatterns/Log.hpp"
 #include "molecule.hpp"
@@ -45,8 +46,12 @@
   if(World::getInstance().countSelectedMolecules() == 1) {
     mol = World::getInstance().beginMoleculeSelection()->second;
-    DoLog(0) && (Log() << Verbose(0) << "Parsing bonds from " << params.bondfile << "." << endl);
+    LOG(0, "STATUS: Parsing bonds from " << params.bondfile
+        << ", skipping " << params.skiplines << "lines"
+        << ", adding " << params.id_offset << " to each id.");
     ifstream input(params.bondfile.string().c_str());
-    mol->CreateAdjacencyListFromDbondFile(&input);
+    molecule::atomVector Set = mol->getAtomSet();
+    World::getInstance().getBondGraph()->CreateAdjacencyListFromDbondFile(Set, &input, params.skiplines, params.id_offset);
     input.close();
+    mol->getBondCount();
     return Action::success;
   } else
Index: src/Actions/MoleculeAction/BondFileAction.def
===================================================================
--- src/Actions/MoleculeAction/BondFileAction.def	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/Actions/MoleculeAction/BondFileAction.def	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -12,9 +12,9 @@
 // ValueStorage by the token "Z" -> first column: int, Z, "Z"
 // "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
-#define paramtypes (boost::filesystem::path)
-#define paramtokens ("bond-file")
-#define paramdescriptions ("name of the bond file")
-#undef paramdefaults
-#define paramreferences (bondfile)
+#define paramtypes (boost::filesystem::path)(int)(int)
+#define paramtokens ("bond-file")("skiplines")("offset")
+#define paramdescriptions ("name of the bond file")("number of header lines to skip")("offset to add to each id")
+#define paramdefaults (NODEFAULT)("1")("0")
+#define paramreferences (bondfile)(skiplines)(id_offset)
 
 #undef statetypes
Index: src/bondgraph.cpp
===================================================================
--- src/bondgraph.cpp	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/bondgraph.cpp	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -206,2 +206,3 @@
     LOG(1, "I detected " << BondCount << " bonds in the molecule.");
 }
+
Index: src/bondgraph.hpp
===================================================================
--- src/bondgraph.hpp	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/bondgraph.hpp	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -30,4 +30,5 @@
 #include "IPointCloud.hpp"
 #include "PointCloudAdaptor.hpp"
+#include "WorldTime.hpp"
 
 /****************************************** forward declarations *****************************/
@@ -151,4 +152,78 @@
       LOG(1, "REJECT: AtomCount is " << counter << ", thus no bonds, no connections.");
     }
+  }
+
+  /** Creates an adjacency list of the given \a Set of atoms.
+   *
+   * Note that the input stream is required to refer to the same number of
+   * atoms also contained in \a Set.
+   *
+   * \param &Set container with atoms
+   * \param *input input stream to parse
+ * \param skiplines how many header lines to skip
+ * \param id_offset is base id compared to World startin at 0
+   */
+  template <class container_type,
+            class iterator_type,
+            class const_iterator_type>
+  void CreateAdjacencyListFromDbondFile(
+      AtomSetMixin<container_type,iterator_type,const_iterator_type> &Set,
+      ifstream *input,
+      unsigned int skiplines,
+      int id_offset) const
+  {
+    char line[MAXSTRINGSIZE];
+
+    // check input stream
+    if (input->fail()) {
+      ELOG(0, "Opening of bond file failed \n");
+      return;
+    };
+    // skip headers
+    unsigned int bondcount = 0;
+    for (unsigned int i=0;i<skiplines;i++)
+      input->getline(line,MAXSTRINGSIZE);
+
+    // create lookup map
+    LOG(1, "STATUS: Creating lookup map.");
+    std::map< unsigned int, atom *> AtomLookup;
+    unsigned int counter = id_offset; // if ids do not start at 0
+    for (iterator_type iter = Set.begin(); iter != Set.end(); ++iter) {
+      AtomLookup.insert( make_pair( counter++, *iter) );
+    }
+    LOG(2, "INFO: There are " << counter << " atoms in the given set.");
+
+    LOG(1, "STATUS: Scanning file.");
+    unsigned int atom1, atom2;
+    unsigned int bondcounter = 0;
+    while (!input->eof()) // Check whether we read everything already
+    {
+      input->getline(line,MAXSTRINGSIZE);
+      stringstream zeile(line);
+      if (zeile.str().empty())
+        continue;
+      zeile >> atom1;
+      zeile >> atom2;
+
+      LOG(4, "INFO: Looking for atoms " << atom1 << " and " << atom2 << ".");
+      if (atom2 < atom1) //Sort indices of atoms in order
+        std::swap(atom1, atom2);
+      ASSERT(atom2 < counter,
+          "BondGraph::CreateAdjacencyListFromDbondFile() - ID "
+          +toString(atom2)+" exceeds number of present atoms "+toString(counter)+".");
+      ASSERT(AtomLookup.count(atom1),
+          "BondGraph::CreateAdjacencyListFromDbondFile() - Could not find an atom with the ID given in dbond file");
+      ASSERT(AtomLookup.count(atom2),
+          "BondGraph::CreateAdjacencyListFromDbondFile() - Could not find an atom with the ID given in dbond file");
+      atom * const Walker = AtomLookup[atom1];
+      atom * const OtherWalker = AtomLookup[atom2];
+
+      LOG(3, "INFO: Creating bond between atoms " << atom1 << " and " << atom2 << ".");
+      bond * const Binder = new bond(Walker, OtherWalker, 1, -1);
+      Walker->RegisterBond(WorldTime::getTime(), Binder);
+      OtherWalker->RegisterBond(WorldTime::getTime(), Binder);
+      bondcounter++;
+    }
+    LOG(1, "STATUS: "<< bondcounter << " bonds have been parsed.");
   }
 
Index: src/molecule.hpp
===================================================================
--- src/molecule.hpp	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/molecule.hpp	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -210,5 +210,5 @@
 
   /// Initialising routines in fragmentation
-  void CreateAdjacencyListFromDbondFile(ifstream *output);
+  void CreateAdjacencyListFromDbondFile(ifstream *output,unsigned int skiplines,int id_offset);
   void OutputBondsList() const;
   void CyclicBondAnalysis() const;
Index: src/molecule_graph.cpp
===================================================================
--- src/molecule_graph.cpp	(revision 3738f09a1261e51cc253cbaa8f4766bb8f945d68)
+++ src/molecule_graph.cpp	(revision 0cbad258eb8c0251e3a78b10e2b68fdd0a5d2791)
@@ -72,42 +72,4 @@
 
 /************************************* Functions for class molecule *********************************/
-
-/** Creates an adjacency list of the molecule.
- * We obtain an outside file with the indices of atoms which are bondmembers.
- */
-void molecule::CreateAdjacencyListFromDbondFile(ifstream *input)
-{
-  Info FunctionInfo(__func__);
-  // 1 We will parse bonds out of the dbond file created by tremolo.
-  int atom1, atom2;
-  atom *Walker, *OtherWalker;
-  char line[MAXSTRINGSIZE];
-
-  if (input->fail()) {
-    DoeLog(0) && (eLog() << Verbose(0) << "Opening of bond file failed \n");
-    performCriticalExit();
-  };
-  doCountAtoms();
-
-  // skip header
-  input->getline(line,MAXSTRINGSIZE);
-  DoLog(1) && (Log() << Verbose(1) << "Scanning file ... \n");
-  while (!input->eof()) // Check whether we read everything already
-  {
-    input->getline(line,MAXSTRINGSIZE);
-    stringstream zeile(line);
-    zeile >> atom1;
-    zeile >> atom2;
-
-    DoLog(2) && (Log() << Verbose(2) << "Looking for atoms " << atom1 << " and " << atom2 << "." << endl);
-    if (atom2 < atom1) //Sort indices of atoms in order
-      std::swap(atom1, atom2);
-    Walker = FindAtom(atom1);
-    ASSERT(Walker,"Could not find an atom with the ID given in dbond file");
-    OtherWalker = FindAtom(atom2);
-    ASSERT(OtherWalker,"Could not find an atom with the ID given in dbond file");
-    AddBond(Walker, OtherWalker); //Add the bond between the two atoms with respective indices.
-  }
-}
 
 /** Checks for presence of bonds within atom list.
