HUGE REWRITE to allow for adaptive increase of the bond order, first working commit
Lots of code was thrown out:
-BottomUp, TopDown and GetAtomicFragments
-TEFactors are now used as "CreationCounters", i.e. the count how often a fragment as been created (ideal would be only once)
-ReduceToUniqueOnes and stuff all thrown out, since they are out-dated since use of hash table
Other changes:
-CreateListofUniqueFragments renamed to PowerSetGenerator
-PowerSetGenerator goes not over all reachable roots, but one given by calling function FragmentBOSSANOVA
-FragmentBOSSANOVA loops over all possible root sites and hands this over to PowerSetGenerator
-by the virtue of the hash table it is not important anymore whether created keysets are unique or not, as this is recognized in log(n). Hence, the label < label is not important anymore (and not applicable in an adaptive scheme with old, parsed keysets and unknown labels) (THIS IS HOWEVER NOT DONE YET!)
The setup is then as follows:
- FragmentMolecule
- parses adjacency, keysets and orderatsite files
- performs DFS to find connected subgraphs (to leave this in was a design decision: might be useful later)
- a RootStack is created for every subgraph (here, later we implement the "update 10 sites with highest energy contribution", and that's why this consciously not done in the following loop)
- in a loop over all subgraphs
d1. calls FragmentBOSSANOVA with this RootStack and within the subgraph molecule structure
d2. creates molecule (fragment)s from the returned keysets (StoreFragmentFromKeySet)
- combines the generated molecule lists from all subgraphs
- saves to disk: fragment configs, adjacency, orderatsite, keyset files
- FragmentBOSSANOVA
- constructs a complete keyset of the molecule
- In a loop over all possible roots from the given rootstack
b1. increases order of root site
b2. calls PowerSetGenerator with this order, the complete keyset and the rootkeynr
b3. for all consecutive lower levels PowerSetGenerator is called with the suborder, the higher order keyset as the restricted one and each site in the set as the root)
b4. these are merged into a fragment list of keysets
- All fragment lists (for all orders, i.e. from all destination fields) are merged into one list for return
- PowerSetGenerator
- initialises UniqueFragments structure
- fills edge list via BFS
- creates the fragment by calling recursive function SPFragmentGenerator with UniqueFragments structure, 0 as root distance, the edge set, its dimension and the current suborder
- Free'ing structure
- SPFragmentGenerator (nothing much has changed here)
- loops over every possible combination (2dimension of edge set)
a1. inserts current set, if there's still space left
a11. yes: calls SPFragmentGenerator with structure, created new edge list and size respective to root distance+1
a12. no: stores fragment into keyset list by calling InsertFragmentIntoGraph
a2. removes all items added into the snake stack (in UniqueFragments structure) added during level (root distance) and current set