Index: src/molecule_graph.cpp
===================================================================
--- src/molecule_graph.cpp	(revision 2d4334de0df04fbf9bf9d9b86cdd57638d71e072)
+++ src/molecule_graph.cpp	(revision 13a95397b14b03aa8f1b4580623690439ed06e5a)
@@ -43,6 +43,4 @@
 #include "WorldTime.hpp"
 
-#define MAXBONDS 8
-
 
 /** Fills the bond structure of this chain list subgraphs that are derived from a complete \a *reference molecule.
@@ -198,118 +196,4 @@
 ;
 
-bool CheckAdjacencyFileAgainstMolecule_Init(std::string &path, ifstream &File, int *&CurrentBonds)
-{
-  string filename;
-  filename = path + ADJACENCYFILE;
-  File.open(filename.c_str(), ios::out);
-  DoLog(1) && (Log() << Verbose(1) << "Looking at bond structure stored in adjacency file and comparing to present one ... " << endl);
-  if (File.fail())
-    return false;
-
-  // allocate storage structure
-  CurrentBonds = new int[MAXBONDS]; // contains parsed bonds of current atom
-  for(int i=0;i<MAXBONDS;i++)
-    CurrentBonds[i] = 0;
-  return true;
-}
-;
-
-void CheckAdjacencyFileAgainstMolecule_Finalize(ifstream &File, int *&CurrentBonds)
-{
-  File.close();
-  File.clear();
-  delete[](CurrentBonds);
-}
-;
-
-void CheckAdjacencyFileAgainstMolecule_CompareBonds(bool &status, int &NonMatchNumber, atom *&Walker, size_t &CurrentBondsOfAtom, int AtomNr, int *&CurrentBonds, atom **ListOfAtoms)
-{
-  size_t j = 0;
-  int id = -1;
-
-  //Log() << Verbose(2) << "Walker is " << *Walker << ", bond partners: ";
-  const BondList& ListOfBonds = Walker->getListOfBonds();
-  if (CurrentBondsOfAtom == ListOfBonds.size()) {
-    for (BondList::const_iterator Runner = ListOfBonds.begin();
-        Runner != ListOfBonds.end();
-        ++Runner) {
-      id = (*Runner)->GetOtherAtom(Walker)->getNr();
-      j = 0;
-      for (; (j < CurrentBondsOfAtom) && (CurrentBonds[j++] != id);)
-        ; // check against all parsed bonds
-      if (CurrentBonds[j - 1] != id) { // no match ? Then mark in ListOfAtoms
-        ListOfAtoms[AtomNr] = NULL;
-        NonMatchNumber++;
-        status = false;
-        DoeLog(2) && (eLog() << Verbose(2) << id << " can not be found in list." << endl);
-      } else {
-        //Log() << Verbose(0) << "[" << id << "]\t";
-      }
-    }
-    //Log() << Verbose(0) << endl;
-  } else {
-    DoLog(0) && (Log() << Verbose(0) << "Number of bonds for Atom " << *Walker << " does not match, parsed " << CurrentBondsOfAtom << " against " << ListOfBonds.size() << "." << endl);
-    status = false;
-  }
-}
-;
-
-/** Checks contents of adjacency file against bond structure in structure molecule.
- * \param *path path to file
- * \param **ListOfAtoms allocated (molecule::AtomCount) and filled lookup table for ids (Atom::Nr) to *Atom
- * \return true - structure is equal, false - not equivalence
- */
-bool molecule::CheckAdjacencyFileAgainstMolecule(std::string &path, atom **ListOfAtoms)
-{
-  ifstream File;
-  bool status = true;
-  atom *Walker = NULL;
-  int *CurrentBonds = NULL;
-  int NonMatchNumber = 0; // will number of atoms with differing bond structure
-  size_t CurrentBondsOfAtom = -1;
-  const int AtomCount = getAtomCount();
-
-  if (!CheckAdjacencyFileAgainstMolecule_Init(path, File, CurrentBonds)) {
-    DoLog(1) && (Log() << Verbose(1) << "Adjacency file not found." << endl);
-    return true;
-  }
-
-  char buffer[MAXSTRINGSIZE];
-  int tmp;
-  // Parse the file line by line and count the bonds
-  while (!File.eof()) {
-    File.getline(buffer, MAXSTRINGSIZE);
-    stringstream line;
-    line.str(buffer);
-    int AtomNr = -1;
-    line >> AtomNr;
-    CurrentBondsOfAtom = -1; // we count one too far due to line end
-    // parse into structure
-    if ((AtomNr >= 0) && (AtomNr < AtomCount)) {
-      Walker = ListOfAtoms[AtomNr];
-      while (line >> ws >> tmp) {
-        std::cout << "Recognized bond partner " << tmp << std::endl;
-        CurrentBonds[++CurrentBondsOfAtom] = tmp;
-        ASSERT(CurrentBondsOfAtom < MAXBONDS,
-            "molecule::CheckAdjacencyFileAgainstMolecule() - encountered more bonds than allowed: "
-            +toString(CurrentBondsOfAtom)+" >= "+toString(MAXBONDS)+"!");
-      }
-      // compare against present bonds
-      CheckAdjacencyFileAgainstMolecule_CompareBonds(status, NonMatchNumber, Walker, CurrentBondsOfAtom, AtomNr, CurrentBonds, ListOfAtoms);
-    } else {
-      if (AtomNr != -1)
-        DoeLog(2) && (eLog() << Verbose(2) << AtomNr << " is not valid in the range of ids [" << 0 << "," << AtomCount << ")." << endl);
-    }
-  }
-  CheckAdjacencyFileAgainstMolecule_Finalize(File, CurrentBonds);
-
-  if (status) { // if equal we parse the KeySetFile
-    DoLog(1) && (Log() << Verbose(1) << "done: Equal." << endl);
-  } else
-    DoLog(1) && (Log() << Verbose(1) << "done: Not equal by " << NonMatchNumber << " atoms." << endl);
-  return status;
-}
-;
-
 /** Adds a bond as a copy to a given one
  * \param *left leftatom of new bond
