[246e13] | 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 "Graph/DepthFirstSearchAnalysis.hpp"
|
---|
| 17 |
|
---|
[ba94c5] | 18 | #include "Fragmentation/fragmentation_helpers.hpp"
|
---|
[ca8bea] | 19 | #include "Fragmentation/Graph.hpp"
|
---|
| 20 | #include "Fragmentation/HydrogenSaturation_enum.hpp"
|
---|
[d4d7a1] | 21 | #include "types.hpp"
|
---|
[dadc74] | 22 |
|
---|
[d4d7a1] | 23 | #include <map>
|
---|
[99b0dc] | 24 | #include <string>
|
---|
| 25 | #include <vector>
|
---|
| 26 |
|
---|
[246e13] | 27 | class atom;
|
---|
[f96874] | 28 | class AtomMask_t;
|
---|
[0fad93] | 29 | class AdjacencyList;
|
---|
[f0674a] | 30 | class KeySet;
|
---|
[246e13] | 31 | class molecule;
|
---|
| 32 |
|
---|
| 33 | class Fragmentation
|
---|
| 34 | {
|
---|
| 35 | public:
|
---|
[9291d04] | 36 | Fragmentation(
|
---|
| 37 | molecule *_mol,
|
---|
| 38 | AdjacencyList &_FileChecker,
|
---|
| 39 | const enum HydrogenTreatment _treatment);
|
---|
[246e13] | 40 | ~Fragmentation();
|
---|
| 41 |
|
---|
[bfbd4a] | 42 | int FragmentMolecule(const std::vector<atomId_t> &atomids, int Order, const std::string &prefix, DepthFirstSearchAnalysis &DFS, const Graph &ParsedFragmentList);
|
---|
[99b0dc] | 43 |
|
---|
[ca8bea] | 44 | const Graph& getGraph() const {
|
---|
| 45 | return TotalGraph;
|
---|
| 46 | }
|
---|
[246e13] | 47 |
|
---|
| 48 | private:
|
---|
| 49 |
|
---|
[339910] | 50 | void FragmentBOSSANOVA(molecule *mol, Graph &FragmentList, KeyStack &RootStack);
|
---|
[246e13] | 51 | int GuesstimateFragmentCount(int order);
|
---|
| 52 |
|
---|
| 53 | // order at site
|
---|
[e71325] | 54 | bool CheckOrderAtSite(AtomMask_t &AtomMask, const Graph &GlobalKeySetList, int Order, const std::string &path, bool LoopDoneAlready);
|
---|
| 55 | bool StoreOrderAtSiteFile(const std::string &path);
|
---|
| 56 | bool ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, const std::string &path);
|
---|
[246e13] | 57 |
|
---|
| 58 | // storing fragments
|
---|
[339910] | 59 | void FillRootStackForSubgraphs(KeyStack &RootStack, const AtomMask_t &AtomMask);
|
---|
[bfbd4a] | 60 | bool AssignKeySetsToFragment(const Graph &KeySetList, ListOfLocalAtoms_t &ListOfLocalAtoms, Graph &FragmentList, bool FreeList = false);
|
---|
[339910] | 61 | void TranslateIndicesToGlobalIDs(Graph &FragmentList, int &TotalNumberOfKeySets, Graph &TotalGraph);
|
---|
[246e13] | 62 |
|
---|
| 63 | private:
|
---|
[99b0dc] | 64 | //!> pointer to molecule that is fragmented
|
---|
[246e13] | 65 | molecule *mol;
|
---|
[9291d04] | 66 | //!> whether to treat hydrogen special
|
---|
| 67 | const enum HydrogenTreatment treatment;
|
---|
[9511c7] | 68 | //!> reference to an external adjacency for comparison
|
---|
[0fad93] | 69 | AdjacencyList &FileChecker;
|
---|
[ca8bea] | 70 | //!> Resulting Graph with all keysets
|
---|
| 71 | Graph TotalGraph;
|
---|
[246e13] | 72 | };
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | #endif /* FRAGMENTATION_HPP_ */
|
---|