/* * Fragmentation.hpp * * Created on: Oct 18, 2011 * Author: heber */ #ifndef FRAGMENTATION_HPP_ #define FRAGMENTATION_HPP_ #ifdef HAVE_CONFIG_H #include #endif #include #include "Graph/DepthFirstSearchAnalysis.hpp" #include "Fragmentation/HydrogenSaturation_enum.hpp" #include "Fragmentation/fragmentation_helpers.hpp" #include #include class atom; class Graph; class KeySet; class molecule; class Fragmentation { public: Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation); ~Fragmentation(); int FragmentMolecule(int Order, std::string prefix, DepthFirstSearchAnalysis &DFS); void setOutputTypes(const std::vector &types); private: void FragmentBOSSANOVA(molecule *mol, Graph *&FragmentList, KeyStack &RootStack); int GuesstimateFragmentCount(int order); bool CreateMappingLabelsToConfigSequence(int *&SortIndex); // order at site bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, std::string path); bool StoreOrderAtSiteFile(std::string &path); bool ParseOrderAtSiteFromFile(std::string &path); // storing fragments molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, atom **SonList); void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, atom **SonList, bool IsAngstroem); private: //!> pointer to molecule that is fragmented molecule *mol; //!> whether to saturate dangling bonds with hydrogen and hence treat hydrogen special const enum HydrogenSaturation saturation; //!> list of parser types for which a configuration file per fragment is stored std::vector typelist; }; #endif /* FRAGMENTATION_HPP_ */