Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_graph.cpp

    raafd77 rc27778  
    55 *      Author: heber
    66 */
    7 
    8 #ifdef HAVE_CONFIG_H
    9 #include <config.h>
    10 #endif
    117
    128#include "Helpers/MemDebug.hpp"
     
    2218#include "linkedcell.hpp"
    2319#include "lists.hpp"
    24 #include "verbose.hpp"
    2520#include "log.hpp"
     21#include "memoryallocator.hpp"
    2622#include "molecule.hpp"
    2723#include "World.hpp"
    2824#include "Helpers/fast_functions.hpp"
    2925#include "Helpers/Assert.hpp"
    30 #include "Matrix.hpp"
    31 #include "Box.hpp"
    32 #include "stackclass.hpp"
     26
    3327
    3428struct BFSAccounting
     
    127121  LinkedCell *LC = NULL;
    128122  bool free_BG = false;
    129   Box &domain = World::getInstance().getDomain();
     123  double * const cell_size = World::getInstance().getDomain();
    130124
    131125  if (BG == NULL) {
     
    184178                          //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl;
    185179                          (BG->*minmaxdistance)(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
    186                           const double distance = domain.periodicDistanceSquared(OtherWalker->x,Walker->x);
     180                          const double distance = OtherWalker->x.PeriodicDistanceSquared(Walker->x,cell_size);
    187181                          const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance);
    188182//                          Log() << Verbose(1) << "MinDistance is " << MinDistance << " and MaxDistance is " << MaxDistance << "." << endl;
     
    585579    // From OldGraphNr to CurrentGraphNr ranges an disconnected subgraph
    586580    DoLog(0) && (Log() << Verbose(0) << "Disconnected subgraph ranges from " << OldGraphNr << " to " << DFS.CurrentGraphNr << "." << endl);
    587     LeafWalker->Leaf->Output((ofstream *)&(Log() << Verbose(0)));
     581    LeafWalker->Leaf->Output((ofstream *)&cout);
    588582    DoLog(0) && (Log() << Verbose(0) << endl);
    589583
     
    670664  BFS.ColorList = new enum Shading[AtomCount];
    671665  BFS.BFSStack = new StackClass<atom *> (AtomCount);
     666  BFS.TouchedStack = new StackClass<atom *> (AtomCount);
    672667
    673668  for (int i = AtomCount; i--;) {
    674669    BFS.ShortestPathList[i] = -1;
    675670    BFS.PredecessorList[i] = 0;
     671    BFS.ColorList[i] = white;
    676672  }
    677673};
     
    687683  delete[](BFS.ColorList);
    688684  delete (BFS.BFSStack);
     685  delete (BFS.TouchedStack);
    689686  BFS.AtomCount = 0;
    690687};
     
    831828      MinRingSize = RingSize;
    832829  } else {
    833     DoLog(1) && (Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[Walker->GetTrueFather()->nr] << " found." << endl);
     830    DoLog(1) && (Log() << Verbose(1) << "No ring containing " << *BFS.Root << " with length equal to or smaller than " << MinimumRingSize[BFS.Root->GetTrueFather()->nr] << " found." << endl);
    834831  }
    835832};
Note: See TracChangeset for help on using the changeset viewer.