| [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 |
|
|---|
| [07a47e] | 18 | #include "Fragmentation/HydrogenSaturation_enum.hpp"
|
|---|
| [ba94c5] | 19 | #include "Fragmentation/fragmentation_helpers.hpp"
|
|---|
| [d4d7a1] | 20 | #include "types.hpp"
|
|---|
| [dadc74] | 21 |
|
|---|
| [d4d7a1] | 22 | #include <map>
|
|---|
| [99b0dc] | 23 | #include <string>
|
|---|
| 24 | #include <vector>
|
|---|
| 25 |
|
|---|
| [246e13] | 26 | class atom;
|
|---|
| [f96874] | 27 | class AtomMask_t;
|
|---|
| [9511c7] | 28 | class CheckAgainstAdjacencyFile;
|
|---|
| [dadc74] | 29 | class Graph;
|
|---|
| [f0674a] | 30 | class KeySet;
|
|---|
| [246e13] | 31 | class molecule;
|
|---|
| 32 |
|
|---|
| 33 | class Fragmentation
|
|---|
| 34 | {
|
|---|
| 35 | public:
|
|---|
| [9511c7] | 36 | Fragmentation(molecule *_mol, CheckAgainstAdjacencyFile &_FileChecker, const enum HydrogenSaturation _saturation);
|
|---|
| [246e13] | 37 | ~Fragmentation();
|
|---|
| 38 |
|
|---|
| [2a0eb0] | 39 | int FragmentMolecule(const std::vector<atomId_t> &atomids, int Order, std::string prefix, DepthFirstSearchAnalysis &DFS);
|
|---|
| [99b0dc] | 40 |
|
|---|
| 41 | void setOutputTypes(const std::vector<std::string> &types);
|
|---|
| [246e13] | 42 |
|
|---|
| 43 | private:
|
|---|
| 44 |
|
|---|
| 45 | void FragmentBOSSANOVA(molecule *mol, Graph *&FragmentList, KeyStack &RootStack);
|
|---|
| 46 | int GuesstimateFragmentCount(int order);
|
|---|
| 47 |
|
|---|
| [d4d7a1] | 48 | bool CreateMappingLabelsToConfigSequence(std::map<atomId_t, int> &SortIndex);
|
|---|
| [246e13] | 49 |
|
|---|
| 50 | // order at site
|
|---|
| [f96874] | 51 | bool CheckOrderAtSite(AtomMask_t &AtomMask, Graph *GlobalKeySetList, int Order, std::string path, bool LoopDoneAlready);
|
|---|
| [246e13] | 52 | bool StoreOrderAtSiteFile(std::string &path);
|
|---|
| [2a0eb0] | 53 | bool ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, std::string &path);
|
|---|
| [246e13] | 54 |
|
|---|
| 55 | // storing fragments
|
|---|
| 56 | molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
|
|---|
| [f7307f] | 57 | int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
|
|---|
| 58 | void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
|
|---|
| [246e13] | 59 |
|
|---|
| 60 | private:
|
|---|
| [99b0dc] | 61 | //!> pointer to molecule that is fragmented
|
|---|
| [246e13] | 62 | molecule *mol;
|
|---|
| [07a47e] | 63 | //!> whether to saturate dangling bonds with hydrogen and hence treat hydrogen special
|
|---|
| 64 | const enum HydrogenSaturation saturation;
|
|---|
| [99b0dc] | 65 | //!> list of parser types for which a configuration file per fragment is stored
|
|---|
| 66 | std::vector<std::string> typelist;
|
|---|
| [9511c7] | 67 | //!> reference to an external adjacency for comparison
|
|---|
| 68 | CheckAgainstAdjacencyFile &FileChecker;
|
|---|
| [246e13] | 69 | };
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | #endif /* FRAGMENTATION_HPP_ */
|
|---|