| 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 Graph; | 
|---|
| 28 | class KeySet; | 
|---|
| 29 | class molecule; | 
|---|
| 30 |  | 
|---|
| 31 | class Fragmentation | 
|---|
| 32 | { | 
|---|
| 33 | public: | 
|---|
| 34 | Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation); | 
|---|
| 35 | ~Fragmentation(); | 
|---|
| 36 |  | 
|---|
| 37 | int FragmentMolecule(int Order, std::string prefix, DepthFirstSearchAnalysis &DFS); | 
|---|
| 38 |  | 
|---|
| 39 | void setOutputTypes(const std::vector<std::string> &types); | 
|---|
| 40 |  | 
|---|
| 41 | private: | 
|---|
| 42 |  | 
|---|
| 43 | void FragmentBOSSANOVA(molecule *mol, Graph *&FragmentList, KeyStack &RootStack); | 
|---|
| 44 | int GuesstimateFragmentCount(int order); | 
|---|
| 45 |  | 
|---|
| 46 | bool CreateMappingLabelsToConfigSequence(int *&SortIndex); | 
|---|
| 47 |  | 
|---|
| 48 | // order at site | 
|---|
| 49 | bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, std::string path); | 
|---|
| 50 | bool StoreOrderAtSiteFile(std::string &path); | 
|---|
| 51 | bool ParseOrderAtSiteFromFile(std::string &path); | 
|---|
| 52 |  | 
|---|
| 53 | // storing fragments | 
|---|
| 54 | molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); | 
|---|
| 55 | int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, atom **SonList); | 
|---|
| 56 | void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, atom **SonList, bool IsAngstroem); | 
|---|
| 57 |  | 
|---|
| 58 | private: | 
|---|
| 59 | //!> pointer to molecule that is fragmented | 
|---|
| 60 | molecule *mol; | 
|---|
| 61 | //!> whether to saturate dangling bonds with hydrogen and hence treat hydrogen special | 
|---|
| 62 | const enum HydrogenSaturation saturation; | 
|---|
| 63 | //!> list of parser types for which a configuration file per fragment is stored | 
|---|
| 64 | std::vector<std::string> typelist; | 
|---|
| 65 | }; | 
|---|
| 66 |  | 
|---|
| 67 |  | 
|---|
| 68 | #endif /* FRAGMENTATION_HPP_ */ | 
|---|