Changeset 212c179


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:
246e13
Parents:
d0b375b
git-author:
Frederik Heber <heber@…> (10/18/11 13:16:51)
git-committer:
Frederik Heber <heber@…> (10/25/11 12:08:03)
Message:

Placed all functions related to BondsPerSPList into own class BondsPerShortestPath.

Location:
src
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Makefile.am

    rd0b375b r212c179  
    33
    44FRAGMENTATIONSOURCE = \
     5        Fragmentation/BondsPerShortestPath.cpp \
    56        Fragmentation/EnergyMatrix.cpp \
    67        Fragmentation/ForceMatrix.cpp \
     
    1415
    1516FRAGMENTATIONHEADER = \
     17        Fragmentation/BondsPerShortestPath.hpp \
    1618        Fragmentation/defs.hpp \
    1719        Fragmentation/EnergyMatrix.hpp \
  • src/Fragmentation/PowerSetGenerator.cpp

    rd0b375b r212c179  
    3131 *
    3232 */
    33 PowerSetGenerator::PowerSetGenerator() :
    34   FragmentSearch(NULL)
     33PowerSetGenerator::PowerSetGenerator(class UniqueFragments *_FragmentSearch, int Order) :
     34  BondsPerSPList(Order),
     35  FragmentSearch(_FragmentSearch)
    3536{}
    3637
     
    4445
    4546/** Clears the touched list
    46  * \param *out output stream for debugging
    4747 * \param verbosity verbosity level
    4848 * \param *&TouchedList touched list
     
    6060
    6161/** Adds the current combination of the power set to the snake stack.
    62  * \param *out output stream for debugging
    6362 * \param verbosity verbosity level
    6463 * \param CurrentCombination
     
    141140
    142141/** Remove all items that were added on this SP level.
    143  * \param *out output stream for debugging
    144142 * \param verbosity verbosity level
    145143 * \param *FragmentSet snake stack to remove from
     
    172170 * Note that we may use the fact that the atoms are SP-ordered on the atomstack. I.e. when popping always the last, we first get all
    173171 * with SP of 2, then those with SP of 3, then those with SP of 4 and so on.
    174  * \param *_FragmentSearch helpful structure containing additional information
    175  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    176172 * \param RestrictedKeySet Restricted vertex set to use in context of molecule
    177173 * \return number of inserted fragments
    178174 * \note ShortestPathList in FragmentSearch structure is probably due to NumberOfAtomsSPLevel and SP not needed anymore
    179175 */
    180 int PowerSetGenerator::operator()(struct UniqueFragments *_FragmentSearch, int Order, KeySet RestrictedKeySet)
    181 {
    182   FragmentSearch = _FragmentSearch;
     176int PowerSetGenerator::operator()(KeySet &RestrictedKeySet)
     177{
    183178  int Counter = FragmentSearch->FragmentCounter; // mark current value of counter
    184179
    185180  DoLog(0) && (Log() << Verbose(0) << endl);
    186   DoLog(0) && (Log() << Verbose(0) << "Begin of PowerSetGenerator with order " << Order << " at Root " << *FragmentSearch->getRoot() << "." << endl);
    187 
    188   FragmentSearch->SetSPList(Order);
     181  DoLog(0) && (Log() << Verbose(0) << "Begin of PowerSetGenerator with order " << BondsPerSPList.getOrder() << " at Root " << *FragmentSearch->getRoot() << "." << endl);
     182
     183  BondsPerSPList.SetSPList(FragmentSearch->getRoot());
    189184
    190185  // do a BFS search to fill the SP lists and label the found vertices
    191   FragmentSearch->FillSPListandLabelVertices(Order, RestrictedKeySet);
     186  BondsPerSPList.FillSPListandLabelVertices(FragmentSearch->getRoot()->GetTrueFather()->getNr(), RestrictedKeySet);
    192187
    193188  // outputting all list for debugging
    194   FragmentSearch->OutputSPList(Order);
     189  BondsPerSPList.OutputSPList();
    195190
    196191  // creating fragments with the found edge sets  (may be done in reverse order, faster)
    197   int SP = FragmentSearch->CountNumbersInBondsList(Order);
     192  int SP = BondsPerSPList.CountNumbersInBondsList();
    198193  DoLog(0) && (Log() << Verbose(0) << "Total number of edges is " << SP << "." << endl);
    199   if (SP >= (Order-1)) {
     194  if (SP >= (BondsPerSPList.getOrder()-1)) {
    200195    // start with root (push on fragment stack)
    201196    DoLog(0) && (Log() << Verbose(0) << "Starting fragment generation with " << *FragmentSearch->getRoot() << ", local nr is " << FragmentSearch->getRoot()->getNr() << "." << endl);
     
    205200    // prepare the subset and call the generator
    206201    std::vector<bond*> BondsList;
    207     BondsList.resize(FragmentSearch->BondsPerSPCount[0]);
    208     ASSERT(FragmentSearch->BondsPerSPList[0].size() != 0,
    209         "molecule::PowerSetGenerator() - FragmentSearch->BondsPerSPList[0] contains no root bond.");
    210     BondsList[0] = (*FragmentSearch->BondsPerSPList[0].begin());  // on SP level 0 there's only the root bond
    211 
    212     SPFragmentGenerator(0, BondsList, FragmentSearch->BondsPerSPCount[0], Order);
     202    BondsList.resize(BondsPerSPList.BondsPerSPCount[0]);
     203    ASSERT(BondsPerSPList.BondsPerSPList[0].size() != 0,
     204        "molecule::PowerSetGenerator() - BondsPerSPList.BondsPerSPList[0] contains no root bond.");
     205    BondsList[0] = (*BondsPerSPList.BondsPerSPList[0].begin());  // on SP level 0 there's only the root bond
     206
     207    SPFragmentGenerator(0, BondsList, BondsPerSPList.BondsPerSPCount[0], BondsPerSPList.getOrder());
    213208  } else {
    214     DoLog(0) && (Log() << Verbose(0) << "Not enough total number of edges to build " << Order << "-body fragments." << endl);
     209    DoLog(0) && (Log() << Verbose(0) << "Not enough total number of edges to build " << BondsPerSPList.getOrder() << "-body fragments." << endl);
    215210  }
    216211
     
    221216
    222217  // free'ing the bonds lists
    223   FragmentSearch->ResetSPList(Order);
     218  BondsPerSPList.ResetSPList();
    224219
    225220  // return list
     
    283278
    284279          // first count the members in the subset
    285           SubSetDimension = CountSetMembers(FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
     280          SubSetDimension = CountSetMembers(BondsPerSPList.BondsPerSPList[SP].begin(), BondsPerSPList.BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
    286281
    287282          // then allocate and fill the list
    288283          std::vector<bond *> BondsList;
    289284          BondsList.resize(SubSetDimension);
    290           SubSetDimension = FillBondsList(BondsList, FragmentSearch->BondsPerSPList[SP].begin(), FragmentSearch->BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
     285          SubSetDimension = FillBondsList(BondsList, BondsPerSPList.BondsPerSPList[SP].begin(), BondsPerSPList.BondsPerSPList[SP].end(), TouchedList, TouchedIndex);
    291286
    292287          // then iterate
  • src/Fragmentation/PowerSetGenerator.hpp

    rd0b375b r212c179  
    1717#include <vector>
    1818
     19#include "Fragmentation/BondsPerShortestPath.hpp"
    1920#include "graph.hpp"
    2021
     
    2526{
    2627public:
    27   PowerSetGenerator();
     28  PowerSetGenerator(UniqueFragments *_FragmentSearch, int Order);
    2829  ~PowerSetGenerator();
    2930
    3031  void SPFragmentGenerator(int RootDistance, std::vector<bond *> &BondsSet, int SetDimension, int SubOrder);
    31   int operator()(struct UniqueFragments *_FragmentSearch, int Order, KeySet RestrictedKeySet);
     32  int operator()(KeySet &RestrictedKeySet);
    3233  void RemoveAllTouchedFromSnakeStack(int verbosity, KeySet *FragmentSet, int *&TouchedList, int &TouchedIndex);
    3334  int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex);
     
    3738
    3839private:
     40  BondsPerShortestPath BondsPerSPList;
     41
    3942  class UniqueFragments *FragmentSearch;
    4043};
  • src/Fragmentation/UniqueFragments.cpp

    rd0b375b r212c179  
    5858};
    5959
    60 /** Allocates memory for UniqueFragments::BondsPerSPList.
    61  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    62  * \sa UniqueFragments::FreeSPList()
    63  */
    64 void UniqueFragments::InitialiseSPList(int Order)
    65 {
    66   BondsPerSPList.resize(Order);
    67   BondsPerSPCount = new int[Order];
    68   for (int i=Order;i--;) {
    69     BondsPerSPCount[i] = 0;
    70   }
    71 };
    72 
    73 /** Free's memory for for UniqueFragments::BondsPerSPList.
    74  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    75  * \sa UniqueFragments::InitialiseSPList()
    76  */
    77 void UniqueFragments::FreeSPList(int Order)
    78 {
    79   delete[](BondsPerSPCount);
    80 };
    81 
    82 /** Sets FragmenSearch to initial value.
    83  * Sets UniqueFragments::BondsPerSPCount to zero (except zero level to 1) and adds initial bond
    84  * UniqueFragments::Root to UniqueFragments::Root to UniqueFragments::BondsPerSPList
    85  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    86  * \sa UniqueFragments::FreeSPList()
    87  */
    88 void UniqueFragments::SetSPList(int Order)
    89 {
    90   // prepare root level (SP = 0) and a loop bond denoting Root
    91   for (int i=Order;i--;)
    92     BondsPerSPCount[i] = 0;
    93   BondsPerSPCount[0] = 1;
    94   bond *Binder = new bond(Root, Root);
    95   BondsPerSPList[0].push_back(Binder);
    96 };
    97 
    98 /** Cleans bonds from UniqueFragments::BondsPerSPList.
    99  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    100  * \sa UniqueFragments::InitialiseSPList()
    101  */
    102 void UniqueFragments::ResetSPList(int Order)
    103 {
    104   DoLog(0) && (Log() << Verbose(0) << "Free'ing all found lists. and resetting index lists" << endl);
    105   for(int i=Order;i--;) {
    106     DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << ": ");
    107     // delete added bonds
    108     for (UniqueFragments::BondsPerSP::iterator iter = BondsPerSPList[i].begin();
    109         iter != BondsPerSPList[i].end();
    110         ++iter) {
    111       delete(*iter);
    112     }
    113     BondsPerSPList[i].clear();
    114     // also start and end node
    115     DoLog(0) && (Log() << Verbose(0) << "cleaned." << endl);
    116   }
    117 };
    118 
    119 
    120 /** Fills the Bonds per Shortest Path List and set the vertex labels.
    121  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    122  * \param RestrictedKeySet Restricted vertex set to use in context of molecule
    123  */
    124 void UniqueFragments::FillSPListandLabelVertices(int Order, KeySet &RestrictedKeySet)
    125 {
    126   // Actually, we should construct a spanning tree vom the root atom and select all edges therefrom and put them into
    127   // according shortest path lists. However, we don't. Rather we fill these lists right away, as they do form a spanning
    128   // tree already sorted into various SP levels. That's why we just do loops over the depth (CurrentSP) and breadth
    129   // (EdgeinSPLevel) of this tree ...
    130   // In another picture, the bonds always contain a direction by rightatom being the one more distant from root and hence
    131   // naturally leftatom forming its predecessor, preventing the BFS"seeker" from continuing in the wrong direction.
    132   int AtomKeyNr = -1;
    133   atom *Walker = NULL;
    134   atom *OtherWalker = NULL;
    135   atom *Predecessor = NULL;
    136   bond *Binder = NULL;
    137   int RootKeyNr = Root->GetTrueFather()->getNr();
    138   int RemainingWalkers = -1;
    139   int SP = -1;
    140 
    141   DoLog(0) && (Log() << Verbose(0) << "Starting BFS analysis ..." << endl);
    142   for (SP = 0; SP < (Order-1); SP++) {
    143     DoLog(1) && (Log() << Verbose(1) << "New SP level reached: " << SP << ", creating new SP list with " << BondsPerSPCount[SP] << " item(s)");
    144     if (SP > 0) {
    145       DoLog(0) && (Log() << Verbose(0) << ", old level closed with " << BondsPerSPCount[SP-1] << " item(s)." << endl);
    146       BondsPerSPCount[SP] = 0;
    147     } else
    148       DoLog(0) && (Log() << Verbose(0) << "." << endl);
    149 
    150     RemainingWalkers = BondsPerSPCount[SP];
    151     for (BondsPerSP::const_iterator CurrentEdge = BondsPerSPList[SP].begin();
    152         CurrentEdge != BondsPerSPList[SP].end();
    153         ++CurrentEdge) { /// start till end of this SP level's list
    154       RemainingWalkers--;
    155       Walker = (*CurrentEdge)->rightatom;    // rightatom is always the one more distant
    156       Predecessor = (*CurrentEdge)->leftatom;    // ... and leftatom is predecessor
    157       AtomKeyNr = Walker->getNr();
    158       DoLog(0) && (Log() << Verbose(0) << "Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level." << endl);
    159       // check for new sp level
    160       // go through all its bonds
    161       DoLog(1) && (Log() << Verbose(1) << "Going through all bonds of Walker." << endl);
    162       const BondList& ListOfBonds = Walker->getListOfBonds();
    163       for (BondList::const_iterator Runner = ListOfBonds.begin();
    164           Runner != ListOfBonds.end();
    165           ++Runner) {
    166         OtherWalker = (*Runner)->GetOtherAtom(Walker);
    167         if ((RestrictedKeySet.find(OtherWalker->getNr()) != RestrictedKeySet.end())
    168   #ifdef ADDHYDROGEN
    169          && (OtherWalker->getType()->getAtomicNumber() != 1)
    170   #endif
    171                                                               ) {  // skip hydrogens and restrict to fragment
    172           DoLog(2) && (Log() << Verbose(2) << "Current partner is " << *OtherWalker << " with nr " << OtherWalker->getNr() << " in bond " << *(*Runner) << "." << endl);
    173           // set the label if not set (and push on root stack as well)
    174           if ((OtherWalker != Predecessor) && (OtherWalker->GetTrueFather()->getNr() > RootKeyNr)) { // only pass through those with label bigger than Root's
    175             // add the bond in between to the SP list
    176             Binder = new bond(Walker, OtherWalker); // create a new bond in such a manner, that bond::rightatom is always the one more distant
    177             BondsPerSPList[SP+1].push_back(Binder);
    178             BondsPerSPCount[SP+1]++;
    179             DoLog(3) && (Log() << Verbose(3) << "Added its bond to SP list, having now " << BondsPerSPCount[SP+1] << " item(s)." << endl);
    180           } else {
    181             if (OtherWalker != Predecessor)
    182               DoLog(3) && (Log() << Verbose(3) << "Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << "." << endl);
    183             else
    184               DoLog(3) && (Log() << Verbose(3) << "This is my predecessor " << *Predecessor << "." << endl);
    185           }
    186         } else Log() << Verbose(2) << "Is not in the restricted keyset or skipping hydrogen " << *OtherWalker << "." << endl;
    187       }
    188     }
    189   }
    190 };
    191 
    192 /** prints the Bonds per Shortest Path list in UniqueFragments.
    193  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    194  */
    195 void UniqueFragments::OutputSPList(int Order)
    196 {
    197   DoLog(0) && (Log() << Verbose(0) << "Printing all found lists." << endl);
    198   for(int i=1;i<Order;i++) {    // skip the root edge in the printing
    199     DoLog(1) && (Log() << Verbose(1) << "Current SP level is " << i << "." << endl);
    200     for (UniqueFragments::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin();
    201         Binder != BondsPerSPList[i].end();
    202         ++Binder) {
    203       DoLog(2) && (Log() << Verbose(2) << *Binder << endl);
    204     }
    205   }
    206 };
    207 
    208 /** Simply counts all bonds in all UniqueFragments::BondsPerSPList lists.
    209  * \param Order bond order (limits BFS exploration and "number of digits" in power set generation
    210  */
    211 int UniqueFragments::CountNumbersInBondsList(int Order)
    212 {
    213   int SP = -1;  // the Root <-> Root edge must be subtracted!
    214   for(int i=Order;i--;) { // sum up all found edges
    215     for (UniqueFragments::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin();
    216         Binder != BondsPerSPList[i].end();
    217         ++Binder) {
    218       SP++;
    219     }
    220   }
    221   return SP;
    222 };
    223 
    22460/** Initialization for UniqueFragments.
    22561 *
     
    24783 * @return const ref to root atom.
    24884 */
    249 const atom *UniqueFragments::getRoot() const
     85atom * const UniqueFragments::getRoot() const
    25086{
    25187  return Root;
     
    26096  Root=_root;
    26197}
     98
     99/** Sets initial values before PowerSetGenerator uses this class.
     100 *
     101 * @param _TEFactor total energy factor
     102 * @param _Leaflet current graph to work on
     103 * @param _Root root atom
     104 */
     105void UniqueFragments::PrepareForPowersetGeneration(double _TEFactor, Graph *_Leaflet, atom *_Root)
     106{
     107  TEFactor = _TEFactor;
     108  Leaflet = _Leaflet;
     109  Root = _Root;
     110}
  • src/Fragmentation/UniqueFragments.hpp

    rd0b375b r212c179  
    3131  ~UniqueFragments();
    3232
    33   typedef std::list<bond*> BondsPerSP;
    34   typedef std::vector< BondsPerSP > AllSPBonds;
    35 
    3633  void InsertFragmentIntoGraph(); // Insert a KeySet into a Graph
    37   void InitialiseSPList(int Order);
    38   void FreeSPList(int Order);
    39   void SetSPList(int Order);
    40   void ResetSPList(int Order);
    41   void FillSPListandLabelVertices(int Order, KeySet &RestrictedKeySet);
    42   void OutputSPList(int Order);
    43   int CountNumbersInBondsList(int Order);
    4434  void Init(atom *_Root);
    4535  void Cleanup();
    4636
    47   const atom *getRoot() const;
     37  atom * const getRoot() const;
    4838  void setRoot(atom *_root);
     39
     40  void PrepareForPowersetGeneration(double _TEFactor, Graph *_Leaflet, atom *_Root);
    4941
    5042  KeySet *FragmentSet;
    5143  int FragmentCounter;
    52   int *BondsPerSPCount;
    53   double TEFactor;
    54   Graph *Leaflet;
    55   AllSPBonds BondsPerSPList;
    56 
    5744
    5845private:
    5946  atom *Root;
     47  double TEFactor;
     48  Graph *Leaflet;
    6049
    6150private:
  • src/molecule_fragmentation.cpp

    rd0b375b r212c179  
    661661  int RootNr = 0;
    662662  struct UniqueFragments FragmentSearch;
    663   class PowerSetGenerator PSG;
    664663
    665664  DoLog(0) && (Log() << Verbose(0) << "Begin of FragmentBOSSANOVA." << endl);
     
    702701
    703702      // initialise Order-dependent entries of UniqueFragments structure
    704       FragmentSearch.InitialiseSPList(Order);
     703      class PowerSetGenerator PSG(&FragmentSearch, Walker->AdaptiveOrder);
    705704
    706705      // allocate memory for all lower level orders in this 1D-array of ptrs
     
    715714
    716715      // Create list of Graphs of current Bond Order (i.e. F_{ij})
    717       FragmentLowerOrdersList[RootNr][0] =  new Graph;
    718       FragmentSearch.TEFactor = 1.;
    719       FragmentSearch.Leaflet = FragmentLowerOrdersList[RootNr][0];      // set to insertion graph
    720       FragmentSearch.setRoot(Walker);
    721       NumMoleculesOfOrder[RootNr] = PSG(&FragmentSearch, Walker->AdaptiveOrder, CompleteMolecule);
     716      FragmentLowerOrdersList[RootNr][0] = new Graph;
     717      FragmentSearch.PrepareForPowersetGeneration(1., FragmentLowerOrdersList[RootNr][0], Walker);
     718      NumMoleculesOfOrder[RootNr] = PSG(CompleteMolecule);
    722719
    723720      // output resulting number
     
    734731      RootStack.push_back(RootKeyNr); // put back on stack
    735732      RootNr++;
    736 
    737       // free Order-dependent entries of UniqueFragments structure for next loop cycle
    738       FragmentSearch.FreeSPList(Order);
    739733    }
    740734  }
Note: See TracChangeset for help on using the changeset viewer.