1 | /*
|
---|
2 | * Fragmentation.hpp
|
---|
3 | *
|
---|
4 | * Created on: Oct 18, 2011
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef FRAGMENTATION_HPP_
|
---|
9 | #define FRAGMENTATION_HPP_
|
---|
10 |
|
---|
11 |
|
---|
12 | #ifdef HAVE_CONFIG_H
|
---|
13 | #include <config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <string>
|
---|
17 |
|
---|
18 | #include "Graph/DepthFirstSearchAnalysis.hpp"
|
---|
19 |
|
---|
20 | #include "Fragmentation/HydrogenSaturation_enum.hpp"
|
---|
21 | #include "Fragmentation/fragmentation_helpers.hpp"
|
---|
22 |
|
---|
23 | #include <string>
|
---|
24 | #include <vector>
|
---|
25 |
|
---|
26 | class atom;
|
---|
27 | class AtomMask_t;
|
---|
28 | class Graph;
|
---|
29 | class KeySet;
|
---|
30 | class molecule;
|
---|
31 |
|
---|
32 | class Fragmentation
|
---|
33 | {
|
---|
34 | public:
|
---|
35 | Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation);
|
---|
36 | ~Fragmentation();
|
---|
37 |
|
---|
38 | int FragmentMolecule(int Order, std::string prefix, DepthFirstSearchAnalysis &DFS);
|
---|
39 |
|
---|
40 | void setOutputTypes(const std::vector<std::string> &types);
|
---|
41 |
|
---|
42 | private:
|
---|
43 |
|
---|
44 | void FragmentBOSSANOVA(molecule *mol, Graph *&FragmentList, KeyStack &RootStack);
|
---|
45 | int GuesstimateFragmentCount(int order);
|
---|
46 |
|
---|
47 | bool CreateMappingLabelsToConfigSequence(int *&SortIndex);
|
---|
48 |
|
---|
49 | // order at site
|
---|
50 | bool CheckOrderAtSite(AtomMask_t &AtomMask, Graph *GlobalKeySetList, int Order, std::string path, bool LoopDoneAlready);
|
---|
51 | bool StoreOrderAtSiteFile(std::string &path);
|
---|
52 | bool ParseOrderAtSiteFromFile(std::string &path);
|
---|
53 |
|
---|
54 | // storing fragments
|
---|
55 | molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
|
---|
56 | int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
|
---|
57 | void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
|
---|
58 |
|
---|
59 | private:
|
---|
60 | //!> pointer to molecule that is fragmented
|
---|
61 | molecule *mol;
|
---|
62 | //!> whether to saturate dangling bonds with hydrogen and hence treat hydrogen special
|
---|
63 | const enum HydrogenSaturation saturation;
|
---|
64 | //!> list of parser types for which a configuration file per fragment is stored
|
---|
65 | std::vector<std::string> typelist;
|
---|
66 | };
|
---|
67 |
|
---|
68 |
|
---|
69 | #endif /* FRAGMENTATION_HPP_ */
|
---|