| 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 |
|
|---|
| 18 | #include "Fragmentation/HydrogenSaturation_enum.hpp"
|
|---|
| 19 | #include "Fragmentation/fragmentation_helpers.hpp"
|
|---|
| 20 | #include "types.hpp"
|
|---|
| 21 |
|
|---|
| 22 | #include <map>
|
|---|
| 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(const std::vector<atomId_t> &atomids, 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(std::map<atomId_t, 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(const std::vector<atomId_t> &atomids, 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_ */
|
|---|