Changeset a564be for src/molecule_fragmentation.cpp
- Timestamp:
- Dec 6, 2010, 7:37:05 PM (15 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 4c1230
- Parents:
- fd19ff
- git-author:
- Frederik Heber <heber@…> (12/06/10 19:15:03)
- git-committer:
- Frederik Heber <heber@…> (12/06/10 19:37:05)
- File:
-
- 1 edited
-
src/molecule_fragmentation.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_fragmentation.cpp
rfd19ff ra564be 36 36 #include "LinearAlgebra/RealSpaceMatrix.hpp" 37 37 #include "Box.hpp" 38 #include "stackclass.hpp"39 38 40 39 /************************************* Functions for class molecule *********************************/ … … 613 612 fstream File; 614 613 bool FragmentationToDo = true; 615 class StackClass<bond *> *BackEdgeStack = NULL, *LocalBackEdgeStack = NULL;614 std::deque<bond *> *BackEdgeStack = NULL, *LocalBackEdgeStack = NULL; 616 615 bool CheckOrder = false; 617 616 Graph **FragmentList = NULL; … … 656 655 MolecularWalker->FillBondStructureFromReference(this, ListOfAtoms, false); // we want to keep the created ListOfLocalAtoms 657 656 DoLog(0) && (Log() << Verbose(0) << "Analysing the cycles of subgraph " << MolecularWalker->Leaf << " with nr. " << FragmentCounter << "." << endl); 658 LocalBackEdgeStack = new StackClass<bond *>(MolecularWalker->Leaf->BondCount);657 LocalBackEdgeStack = new std::deque<bond *>; // (MolecularWalker->Leaf->BondCount); 659 658 // // check the list of local atoms for debugging 660 659 // Log() << Verbose(0) << "ListOfLocalAtoms for this subgraph is:" << endl; … … 884 883 885 884 886 /** Looks through a StackClass<atom *> and returns the likeliest removal candiate.885 /** Looks through a std::deque<atom *> and returns the likeliest removal candiate. 887 886 * \param *out output stream for debugging messages 888 887 * \param *&Leaf KeySet to look through … … 1743 1742 double tmp; 1744 1743 Vector Translationvector; 1745 // class StackClass<atom *> *CompStack = NULL;1746 class StackClass<atom *> *AtomStack = new StackClass<atom *>(getAtomCount());1744 //std::deque<atom *> *CompStack = NULL; 1745 std::deque<atom *> *AtomStack = new std::deque<atom *>; // (getAtomCount()); 1747 1746 bool flag = true; 1748 1747 … … 1785 1784 for (int i=getAtomCount();i--;) 1786 1785 ColorList[i] = white; 1787 AtomStack->Push(Binder->leftatom); 1788 while (!AtomStack->IsEmpty()) { 1789 Walker = AtomStack->PopFirst(); 1786 AtomStack->push_front(Binder->leftatom); 1787 while (!AtomStack->empty()) { 1788 Walker = AtomStack->front(); 1789 AtomStack->pop_front(); 1790 1790 //Log() << Verbose (3) << "Current Walker is: " << *Walker << "." << endl; 1791 1791 ColorList[Walker->nr] = black; // mark as explored … … 1795 1795 OtherWalker = (*Runner)->GetOtherAtom(Walker); 1796 1796 if (ColorList[OtherWalker->nr] == white) { 1797 AtomStack-> Push(OtherWalker); // push if yet unexplored1797 AtomStack->push_front(OtherWalker); // push if yet unexplored 1798 1798 } 1799 1799 }
Note:
See TracChangeset
for help on using the changeset viewer.
