Index: src/molecules.hpp
===================================================================
--- src/molecules.hpp	(revision 9a5bcd1b9e1cb7f3d50def75223622b926786d75)
+++ src/molecules.hpp	(revision 69eb71ca95b6ddd8113c4c58130d3a649792ac26)
@@ -1,5 +1,5 @@
 /** \file molecules.hpp
  *
- * Class definitions of atom and molecule, element and periodentafel 
+ * Class definitions of atom and molecule, element and periodentafel
  */
 
@@ -54,15 +54,15 @@
 #define BoundariesTestPair pair< Boundaries::iterator, bool>
 
-#define PointMap map < int, class BoundaryPointSet * > 
-#define PointPair pair < int, class BoundaryPointSet * > 
-#define PointTestPair pair < PointMap::iterator, bool > 
-
-#define LineMap map < int, class BoundaryLineSet * > 
-#define LinePair pair < int, class BoundaryLineSet * > 
-#define LineTestPair pair < LinePair::iterator, bool > 
-
-#define TriangleMap map < int, class BoundaryTriangleSet * > 
-#define TrianglePair pair < int, class BoundaryTriangleSet * > 
-#define TriangleTestPair pair < TrianglePair::iterator, bool > 
+#define PointMap map < int, class BoundaryPointSet * >
+#define PointPair pair < int, class BoundaryPointSet * >
+#define PointTestPair pair < PointMap::iterator, bool >
+
+#define LineMap map < int, class BoundaryLineSet * >
+#define LinePair pair < int, class BoundaryLineSet * >
+#define LineTestPair pair < LinePair::iterator, bool >
+
+#define TriangleMap map < int, class BoundaryTriangleSet * >
+#define TrianglePair pair < int, class BoundaryTriangleSet * >
+#define TriangleTestPair pair < TrianglePair::iterator, bool >
 
 #define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> >
@@ -86,5 +86,5 @@
 //bool operator < (KeySet SubgraphA, KeySet SubgraphB);   //note: this declaration is important, otherwise normal < is used (producing wrong order)
 inline void InsertFragmentIntoGraph(ofstream *out, struct UniqueFragments *Fragment); // Insert a KeySet into a Graph
-inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter);  // Insert all KeySet's in a Graph into another Graph 
+inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter);  // Insert all KeySet's in a Graph into another Graph
 int CompareDoubles (const void * a, const void * b);
 
@@ -140,13 +140,13 @@
     unsigned char AdaptiveOrder;  //!< current present bond order at site (0 means "not set")
     bool MaxOrder;  //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not
-  
+
   atom();
   ~atom();
-  
+
   bool Output(int ElementNo, int AtomNo, ofstream *out) const;
   bool OutputXYZLine(ofstream *out) const;
   atom *GetTrueFather();
   bool Compare(atom &ptr);
-  
+
   private:
 };
@@ -169,10 +169,10 @@
     int nr;           //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
     bool Cyclic;      //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
-    enum EdgeType Type;//!< whether this is a tree or back edge 
-  	
+    enum EdgeType Type;//!< whether this is a tree or back edge
+
   atom * GetOtherAtom(atom *Atom) const;
   bond * GetFirstBond();
   bond * GetLastBond();
-  
+
   bool MarkUsed(enum Shading color);
   enum Shading IsUsed();
@@ -180,5 +180,5 @@
   bool Contains(const atom *ptr);
   bool Contains(const int nr);
-  
+
   bond();
   bond(atom *left, atom *right);
@@ -186,6 +186,6 @@
   bond(atom *left, atom *right, int degree, int number);
   ~bond();
-    
-  private: 
+
+  private:
     enum Shading Used;        //!< marker in depth-first search, DepthFirstSearchAnalysis()
 };
@@ -218,8 +218,8 @@
     int NoCyclicBonds;  //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis()
     double BondDistance;  //!< typical bond distance used in CreateAdjacencyList() and furtheron
-  
+
   molecule(periodentafel *teil);
   ~molecule();
-  
+
   /// remove atoms from molecule.
   bool AddAtom(atom *pointer);
@@ -230,11 +230,11 @@
   atom * AddCopyAtom(atom *pointer);
   bool AddXYZFile(string filename);
-  bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem);  
+  bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem);
   bond * AddBond(atom *first, atom *second, int degree);
   bool RemoveBond(bond *pointer);
   bool RemoveBonds(atom *BondPartner);
-    
+
   /// Find atoms.
-  atom * FindAtom(int Nr) const; 
+  atom * FindAtom(int Nr) const;
   atom * AskAtom(string text);
 
@@ -244,6 +244,6 @@
   void CalculateOrbitals(class config &configuration);
   bool CenterInBox(ofstream *out, Vector *BoxLengths);
-  void CenterEdge(ofstream *out, Vector *max); 
-  void CenterOrigin(ofstream *out, Vector *max); 
+  void CenterEdge(ofstream *out, Vector *max);
+  void CenterOrigin(ofstream *out, Vector *max);
   void CenterGravity(ofstream *out, Vector *max);
   void Translate(const Vector *x);
@@ -260,12 +260,13 @@
 	double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
 	bool VerletForceIntegration(char *file, double delta_t, bool IsAngstroem);
-	
+
   bool CheckBounds(const Vector *x) const;
   void GetAlignvector(struct lsq_params * par) const;
 
-  /// Initialising routines in fragmentation  
+  /// Initialising routines in fragmentation
+  void CreateAdjacencyList2(ofstream *out, ifstream *output);
   void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem);
   void CreateListOfBondsPerAtom(ofstream *out);
-  
+
   // Graph analysis
   MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack);
@@ -283,5 +284,5 @@
 
   molecule *CopyMolecule();
-  
+
   /// Fragment molecule by two different approaches:
   int FragmentMolecule(ofstream *out, int Order, config *configuration);
@@ -305,9 +306,9 @@
   int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
   int GuesstimateFragmentCount(ofstream *out, int order);
-  	  
-  // Recognize doubly appearing molecules in a list of them   
+
+  // Recognize doubly appearing molecules in a list of them
   int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
   int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
-	
+
   // Output routines.
   bool Output(ofstream *out);
@@ -330,5 +331,5 @@
     int NumberOfMolecules;        //!< Number of entries in \a **FragmentList and of to be returned one.
     int NumberOfTopAtoms;         //!< Number of atoms in the molecule from which all fragments originate
-    
+
   MoleculeListClass();
   MoleculeListClass(int Num, int NumAtoms);
@@ -340,5 +341,5 @@
   bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
   void Output(ofstream *out);
-  
+
   private:
 };
@@ -350,5 +351,5 @@
 class MoleculeLeafClass {
   public:
-    molecule *Leaf;                   //!< molecule of this leaf 
+    molecule *Leaf;                   //!< molecule of this leaf
     //MoleculeLeafClass *UpLeaf;        //!< Leaf one level up
     //MoleculeLeafClass *DownLeaf;      //!< First leaf one level down
@@ -386,10 +387,10 @@
     bool FastParsing;
     double Deltat;
-    
+
     private:
     char *mainname;
     char *defaultpath;
     char *pseudopotpath;
-    
+
     int DoOutVis;
     int DoOutMes;
@@ -406,5 +407,5 @@
     int UseAddGramSch;
     int Seed;
-    
+
     int MaxOuterStep;
     int OutVisStep;
@@ -414,5 +415,5 @@
     int MaxPsiStep;
     double EpsWannier;
-    
+
     int MaxMinStep;
     double RelEpsTotalEnergy;
@@ -423,7 +424,7 @@
     double InitRelEpsKineticEnergy;
     int InitMaxMinGapStopStep;
-    
+
     //double BoxLength[NDIM*NDIM];
-    
+
     double ECut;
     int MaxLevel;
@@ -434,5 +435,5 @@
     int RTActualUse;
     int AddPsis;
-    
+
     double RCut;
     int StructOpt;
@@ -441,7 +442,7 @@
     int MaxTypes;
 
-  
+
   int ParseForParameter(int verbose, ifstream *file, const char *name, int sequential, int const xth, int const yth, int type, void *value, int repetition, int critical);
-  
+
   public:
   config();
