Changeset d0b375b for src/Fragmentation


Ignore:
Timestamp:
Oct 25, 2011, 12:08:03 PM (13 years ago)
Author:
Frederik Heber <heber@…>
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, 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:
212c179
Parents:
f67817f
git-author:
Frederik Heber <heber@…> (10/18/11 13:28:37)
git-committer:
Frederik Heber <heber@…> (10/25/11 12:08:03)
Message:

Removed ShortestPathList.

  • there have been references in the code that ShortestPathList is probably obsolete meanwhile (seemingly it is).
Location:
src/Fragmentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/UniqueFragments.cpp

    rf67817f rd0b375b  
    8181
    8282/** Sets FragmenSearch to initial value.
    83  * Sets UniqueFragments::ShortestPathList entries to zero, UniqueFragments::BondsPerSPCount to zero (except zero level to 1) and
    84  * adds initial bond UniqueFragments::Root to UniqueFragments::Root to UniqueFragments::BondsPerSPList
     83 * Sets UniqueFragments::BondsPerSPCount to zero (except zero level to 1) and adds initial bond
     84 * UniqueFragments::Root to UniqueFragments::Root to UniqueFragments::BondsPerSPList
    8585 * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    8686 * \sa UniqueFragments::FreeSPList()
     
    8888void UniqueFragments::SetSPList(int Order)
    8989{
    90   // prepare Label and SP arrays of the BFS search
    91   ShortestPathList[Root->getNr()] = 0;
    92 
    9390  // prepare root level (SP = 0) and a loop bond denoting Root
    9491  for (int i=Order;i--;)
     
    9996};
    10097
    101 /** Resets UniqueFragments::ShortestPathList and cleans bonds from UniqueFragments::BondsPerSPList.
     98/** Cleans bonds from UniqueFragments::BondsPerSPList.
    10299 * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    103100 * \sa UniqueFragments::InitialiseSPList()
     
    108105  for(int i=Order;i--;) {
    109106    DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": ");
    110     for (UniqueFragments::BondsPerSP::const_iterator iter = BondsPerSPList[i].begin();
    111         iter != BondsPerSPList[i].end();
    112         ++iter) {
    113       // Log() << Verbose(0) << "Removing atom " << Binder->leftatom->getNr() << " and " << Binder->rightatom->getNr() << "." << endl; // make sure numbers are local
    114       ShortestPathList[(*iter)->leftatom->getNr()] = -1;
    115       ShortestPathList[(*iter)->rightatom->getNr()] = -1;
    116     }
    117107    // delete added bonds
    118108    for (UniqueFragments::BondsPerSP::iterator iter = BondsPerSPList[i].begin();
     
    183173          // set the label if not set (and push on root stack as well)
    184174          if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()->getNr() > RootKeyNr)) { // only pass through those with label bigger than Root's
    185             ShortestPathList[OtherWalker->getNr()] = SP+1;
    186             DoLog(3) && (Log() << Verbose(3) << "Set Shortest Path to " << ShortestPathList[OtherWalker->getNr()] << "." << endl);
    187175            // add the bond in between to the SP list
    188176            Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
     
    239227 * \param AtomCount number of nodes/atoms
    240228 */
    241 void UniqueFragments::Init(atom *_Root, size_t AtomCount)
     229void UniqueFragments::Init(atom *_Root)
    242230{
    243231  // initialise the fragments structure
     
    245233  FragmentSet = new KeySet;
    246234  Root = _Root;
    247   ShortestPathList = new int[AtomCount];
    248   for (int i=AtomCount;i--;) {
    249     ShortestPathList[i] = -1;
    250   }
    251235}
    252236
     
    256240void UniqueFragments::Cleanup()
    257241{
    258   delete[](ShortestPathList);
    259242  delete(FragmentSet);
    260243}
  • src/Fragmentation/UniqueFragments.hpp

    rf67817f rd0b375b  
    4242  void OutputSPList(int Order);
    4343  int CountNumbersInBondsList(int Order);
    44   void Init(atom *_Root, size_t AtomCount);
     44  void Init(atom *_Root);
    4545  void Cleanup();
    4646
     
    6262  int ANOVAOrder;
    6363  int CurrentIndex;
    64   int *ShortestPathList;
    6564  bool **UsedList;
    6665};
Note: See TracChangeset for help on using the changeset viewer.