Index: src/molecule.hpp
===================================================================
--- src/molecule.hpp	(revision c9bce3e4e4e06fbd3b6aa0303bb22113e04c7c27)
+++ src/molecule.hpp	(revision 1614174df8095ae56a671e977842ee55d15b3415)
@@ -106,5 +106,5 @@
 
   // re-definition of virtual functions from PointCloud
-  Vector *GetCenter(ofstream *out) const ;
+  Vector *GetCenter() const ;
   TesselPoint *GetPoint() const ;
   TesselPoint *GetTerminalPoint() const ;
@@ -195,5 +195,5 @@
   atom * AddCopyAtom(atom *pointer);
   bool AddXYZFile(string filename);
-  bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem);
+  bool AddHydrogenReplacementAtom(bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem);
   bond * AddBond(atom *first, atom *second, int degree = 1);
   bool RemoveBond(bond *pointer);
@@ -205,13 +205,13 @@
 
   /// Count and change present atoms' coordination.
-  void CountAtoms(ofstream *out);
+  void CountAtoms();
   void CountElements();
   void CalculateOrbitals(class config &configuration);
-  bool CenterInBox(ofstream *out);
-  bool BoundInBox(ofstream *out);
-  void CenterEdge(ofstream *out, Vector *max);
-  void CenterOrigin(ofstream *out);
-  void CenterPeriodic(ofstream *out);
-  void CenterAtVector(ofstream *out, Vector *newcenter);
+  bool CenterInBox();
+  bool BoundInBox();
+  void CenterEdge(Vector *max);
+  void CenterOrigin();
+  void CenterPeriodic();
+  void CenterAtVector(Vector *newcenter);
   void Translate(const Vector *x);
   void TranslatePeriodically(const Vector *trans);
@@ -220,18 +220,18 @@
   void Scale(const double ** const factor);
   void DeterminePeriodicCenter(Vector &center);
-  Vector * DetermineCenterOfGravity(ofstream *out);
-  Vector * DetermineCenterOfAll(ofstream *out) const;
+  Vector * DetermineCenterOfGravity();
+  Vector * DetermineCenterOfAll() const;
   void SetNameFromFilename(const char *filename);
   void SetBoxDimension(Vector *dim);
-  void ScanForPeriodicCorrection(ofstream *out);
-  bool VerletForceIntegration(ofstream *out, char *file, config &configuration);
+  void ScanForPeriodicCorrection();
+  bool VerletForceIntegration(char *file, config &configuration);
   void Thermostats(config &configuration, double ActualTemp, int Thermostat);
-  void PrincipalAxisSystem(ofstream *out, bool DoRotate);
-  double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
-
-  double ConstrainedPotential(ofstream *out, struct EvaluatePotential &Params);
-  double MinimiseConstrainedPotential(ofstream *out, atom **&permutation, int startstep, int endstep, bool IsAngstroem);
-  void EvaluateConstrainedForces(ofstream *out, int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
-  bool LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);
+  void PrincipalAxisSystem(bool DoRotate);
+  double VolumeOfConvexEnvelope(bool IsAngstroem);
+
+  double ConstrainedPotential(struct EvaluatePotential &Params);
+  double MinimiseConstrainedPotential(atom **&permutation, int startstep, int endstep, bool IsAngstroem);
+  void EvaluateConstrainedForces(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
+  bool LinearInterpolationBetweenConfiguration(int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);
 	
   bool CheckBounds(const Vector *x) const;
@@ -239,22 +239,22 @@
 
   /// Initialising routines in fragmentation
-  void CreateAdjacencyListFromDbondFile(ofstream *out, ifstream *output);
-  void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL);
-  int CorrectBondDegree(ofstream *out) const;
-  void OutputBondsList(ofstream *out) const;
+  void CreateAdjacencyListFromDbondFile(ifstream *output);
+  void CreateAdjacencyList(double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL);
+  int CorrectBondDegree() const;
+  void OutputBondsList() const;
   void CyclicBondAnalysis() const;
-  void OutputGraphInfoPerAtom(ofstream *out) const;
-  void OutputGraphInfoPerBond(ofstream *out) const;
+  void OutputGraphInfoPerAtom() const;
+  void OutputGraphInfoPerBond() const;
 
 
   // Graph analysis
-  MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack) const;
-  void CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const;
-  bool PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const;
+  MoleculeLeafClass * DepthFirstSearchAnalysis(class StackClass<bond *> *&BackEdgeStack) const;
+  void CyclicStructureAnalysis(class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const;
+  bool PickLocalBackEdges(atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const;
   bond * FindNextUnused(atom *vertex) const;
   void SetNextComponentNumber(atom *vertex, int nr) const;
   void ResetAllBondsToUnused() const;
-  int CountCyclicBonds(ofstream *out);
-  bool CheckForConnectedSubgraph(ofstream *out, KeySet *Fragment);
+  int CountCyclicBonds();
+  bool CheckForConnectedSubgraph(KeySet *Fragment);
   string GetColor(enum Shading color) const;
   bond * CopyBond(atom *left, atom *right, bond *CopyBond);
@@ -265,34 +265,34 @@
 
   /// Fragment molecule by two different approaches:
-  int FragmentMolecule(ofstream *out, int Order, config *configuration);
-  bool CheckOrderAtSite(ofstream *out, bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
-  bool StoreAdjacencyToFile(ofstream *out, char *path);
-  bool CheckAdjacencyFileAgainstMolecule(ofstream *out, char *path, atom **ListOfAtoms);
-  bool ParseOrderAtSiteFromFile(ofstream *out, char *path);
-  bool StoreOrderAtSiteFile(ofstream *out, char *path);
-  bool StoreForcesFile(ofstream *out, MoleculeListClass *BondFragments, char *path, int *SortIndex);
-  bool CreateMappingLabelsToConfigSequence(ofstream *out, int *&SortIndex);
-  void BreadthFirstSearchAdd(ofstream *out, molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
+  int FragmentMolecule(int Order, config *configuration);
+  bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
+  bool StoreAdjacencyToFile(char *path);
+  bool CheckAdjacencyFileAgainstMolecule(char *path, atom **ListOfAtoms);
+  bool ParseOrderAtSiteFromFile(char *path);
+  bool StoreOrderAtSiteFile(char *path);
+  bool StoreForcesFile(MoleculeListClass *BondFragments, char *path, int *SortIndex);
+  bool CreateMappingLabelsToConfigSequence(int *&SortIndex);
+  void BreadthFirstSearchAdd(molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
   /// -# BOSSANOVA
-  void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
-  int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
-  bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
-  molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
-  void SPFragmentGenerator(ofstream *out, struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
-  int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
-  int GuesstimateFragmentCount(ofstream *out, int order);
+  void FragmentBOSSANOVA(Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
+  int PowerSetGenerator(int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
+  bool BuildInducedSubgraph(const molecule *Father);
+  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
+  void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
+  int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList);
+  int GuesstimateFragmentCount(int order);
 
   // Recognize doubly appearing molecules in a list of them
-  int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
-  int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
+  int * IsEqualToWithinThreshold(molecule *OtherMolecule, double threshold);
+  int * GetFatherSonAtomicMap(molecule *OtherMolecule);
 
   // Output routines.
-  bool Output(ofstream *out);
-  bool OutputTrajectories(ofstream *out);
-  void OutputListOfBonds(ofstream *out) const;
-  bool OutputXYZ(ofstream *out) const;
-  bool OutputTrajectoriesXYZ(ofstream *out);
-  bool Checkout(ofstream *out) const;
-  bool OutputTemperatureFromTrajectories(ofstream *out, int startstep, int endstep, ofstream *output);
+  bool Output(ofstream * const output);
+  bool OutputTrajectories(ofstream * const output);
+  void OutputListOfBonds() const;
+  bool OutputXYZ(ofstream * const output) const;
+  bool OutputTrajectoriesXYZ(ofstream * const output);
+  bool Checkout(ofstream * const output) const;
+  bool OutputTemperatureFromTrajectories(ofstream * const output, int startstep, int endstep);
 
   private:
@@ -313,13 +313,13 @@
   ~MoleculeListClass();
 
-  bool AddHydrogenCorrection(ofstream *out, char *path);
-  bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
+  bool AddHydrogenCorrection(char *path);
+  bool StoreForcesFile(char *path, int *SortIndex);
   void insert(molecule *mol);
   molecule * ReturnIndex(int index);
-  bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
+  bool OutputConfigForListOfFragments(config *configuration, int *SortIndex);
   int NumberOfActiveMolecules();
   void Enumerate(ofstream *out);
   void Output(ofstream *out);
-  void DissectMoleculeIntoConnectedSubgraphs(ofstream * const out, molecule * const mol, config * const configuration);
+  void DissectMoleculeIntoConnectedSubgraphs(molecule * const mol, config * const configuration);
 
   // merging of molecules
@@ -351,9 +351,9 @@
 
   bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
-  bool FillBondStructureFromReference(ofstream *out, const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
-  bool FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
-  bool AssignKeySetsToFragment(ofstream *out, molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
-  bool FillListOfLocalAtoms(ofstream *out, atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
-  void TranslateIndicesToGlobalIDs(ofstream *out, Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
+  bool FillBondStructureFromReference(const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
+  bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
+  bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
+  bool FillListOfLocalAtoms(atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
+  void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
   int Count() const;
 };
