1 | /*
|
---|
2 | * fragmentation_helpers.hpp
|
---|
3 | *
|
---|
4 | * Created on: Oct 18, 2011
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef FRAGMENTATION_HELPERS_HPP_
|
---|
9 | #define FRAGMENTATION_HELPERS_HPP_
|
---|
10 |
|
---|
11 |
|
---|
12 | #ifdef HAVE_CONFIG_H
|
---|
13 | #include <config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <list>
|
---|
17 | #include <map>
|
---|
18 | #include <string>
|
---|
19 | #include <vector>
|
---|
20 |
|
---|
21 | #include "graph.hpp"
|
---|
22 |
|
---|
23 | class bond;
|
---|
24 | class molecule;
|
---|
25 |
|
---|
26 | bool ScanBufferIntoKeySet(char *buffer, KeySet &CurrentSet);
|
---|
27 | bool ParseKeySetFile(std::string &path, Graph *&FragmentList);
|
---|
28 | bool ParseTEFactorsFile(char *path, Graph *FragmentList);
|
---|
29 | bool StoreKeySetFile(Graph &KeySetList, std::string &path);
|
---|
30 | bool StoreTEFactorsFile(Graph &KeySetList, char *path);
|
---|
31 | std::map<int,KeySet> * GraphToIndexedKeySet(Graph *GlobalKeySetList);
|
---|
32 | void InsertIntoAdaptiveCriteriaList(std::map<int, std::pair<double,int> > *AdaptiveCriteriaList, std::map<int,KeySet> &IndexKeySetList, int FragOrder, int No, double Value);
|
---|
33 | int CountLinesinFile(std::ifstream &InputFile);
|
---|
34 | std::map<int, std::pair<double,int> > * ScanAdaptiveFileIntoMap(std::string &path, std::map<int,KeySet> &IndexKeySetList);
|
---|
35 | std::map<double, std::pair<int,int> > * ReMapAdaptiveCriteriaListToValue(std::map<int, std::pair<double,int> > *AdaptiveCriteriaList, molecule *mol);
|
---|
36 | bool MarkUpdateCandidates(bool *AtomMask, std::map<double, std::pair<int,int> > &FinalRootCandidates, int Order, molecule *mol);
|
---|
37 | void PrintAtomMask(bool *AtomMask, int AtomCount);
|
---|
38 | void SPFragmentGenerator_ClearingTouched(int verbosity, int *&TouchedList, int SubOrder, int &TouchedIndex);
|
---|
39 | int AddPowersetToSnakeStack(int verbosity, int CurrentCombination, int SetDimension, KeySet *FragmentSet, std::vector<bond *> &BondsSet, int *&TouchedList, int &TouchedIndex);
|
---|
40 | int CountSetMembers(std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex);
|
---|
41 | int FillBondsList(std::vector<bond *> &BondsList, std::list<bond *>::const_iterator SetFirst, std::list<bond *>::const_iterator SetLast, int *&TouchedList, int TouchedIndex);
|
---|
42 | void RemoveAllTouchedFromSnakeStack(int verbosity, KeySet *FragmentSet, int *&TouchedList, int &TouchedIndex);
|
---|
43 | void InitialiseSPList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
44 | void FreeSPList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
45 | void SetSPList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
46 | void ResetSPList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
47 | void FillSPListandLabelVertices(int Order, struct UniqueFragments &FragmentSearch, molecule *mol, KeySet RestrictedKeySet);
|
---|
48 | void OutputSPList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
49 | int CountNumbersInBondsList(int Order, struct UniqueFragments &FragmentSearch);
|
---|
50 | int CombineAllOrderListIntoOne(Graph *&FragmentList, Graph ***FragmentLowerOrdersList, KeyStack &RootStack, molecule *mol);
|
---|
51 | void FreeAllOrdersList(Graph ***FragmentLowerOrdersList, KeyStack &RootStack, molecule *mol);
|
---|
52 |
|
---|
53 | #endif /* FRAGMENTATION_HELPERS_HPP_ */
|
---|