Changes in src/molecule_graph.cpp [aafd77:c27778]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_graph.cpp
raafd77 rc27778 5 5 * Author: heber 6 6 */ 7 8 #ifdef HAVE_CONFIG_H9 #include <config.h>10 #endif11 7 12 8 #include "Helpers/MemDebug.hpp" … … 22 18 #include "linkedcell.hpp" 23 19 #include "lists.hpp" 24 #include "verbose.hpp"25 20 #include "log.hpp" 21 #include "memoryallocator.hpp" 26 22 #include "molecule.hpp" 27 23 #include "World.hpp" 28 24 #include "Helpers/fast_functions.hpp" 29 25 #include "Helpers/Assert.hpp" 30 #include "Matrix.hpp" 31 #include "Box.hpp" 32 #include "stackclass.hpp" 26 33 27 34 28 struct BFSAccounting … … 127 121 LinkedCell *LC = NULL; 128 122 bool free_BG = false; 129 Box &domain= World::getInstance().getDomain();123 double * const cell_size = World::getInstance().getDomain(); 130 124 131 125 if (BG == NULL) { … … 184 178 //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl; 185 179 (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); 187 181 const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance); 188 182 // Log() << Verbose(1) << "MinDistance is " << MinDistance << " and MaxDistance is " << MaxDistance << "." << endl; … … 585 579 // From OldGraphNr to CurrentGraphNr ranges an disconnected subgraph 586 580 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); 588 582 DoLog(0) && (Log() << Verbose(0) << endl); 589 583 … … 670 664 BFS.ColorList = new enum Shading[AtomCount]; 671 665 BFS.BFSStack = new StackClass<atom *> (AtomCount); 666 BFS.TouchedStack = new StackClass<atom *> (AtomCount); 672 667 673 668 for (int i = AtomCount; i--;) { 674 669 BFS.ShortestPathList[i] = -1; 675 670 BFS.PredecessorList[i] = 0; 671 BFS.ColorList[i] = white; 676 672 } 677 673 }; … … 687 683 delete[](BFS.ColorList); 688 684 delete (BFS.BFSStack); 685 delete (BFS.TouchedStack); 689 686 BFS.AtomCount = 0; 690 687 }; … … 831 828 MinRingSize = RingSize; 832 829 } 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); 834 831 } 835 832 };
Note:
See TracChangeset
for help on using the changeset viewer.