/* * Fragmentation.hpp * * Created on: Oct 18, 2011 * Author: heber */ #ifndef FRAGMENTATION_HPP_ #define FRAGMENTATION_HPP_ #ifdef HAVE_CONFIG_H #include #endif #include "Graph/DepthFirstSearchAnalysis.hpp" #include "Fragmentation/HydrogenSaturation_enum.hpp" #include "Fragmentation/fragmentation_helpers.hpp" #include "types.hpp" #include #include #include class atom; class AtomMask_t; class Graph; class KeySet; class molecule; class Fragmentation { public: Fragmentation(molecule *_mol, const enum HydrogenSaturation _saturation); ~Fragmentation(); int FragmentMolecule(const std::vector &atomids, 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(std::map &SortIndex); // order at site bool CheckOrderAtSite(AtomMask_t &AtomMask, Graph *GlobalKeySetList, int Order, std::string path, bool LoopDoneAlready); bool StoreOrderAtSiteFile(std::string &path); bool ParseOrderAtSiteFromFile(const std::vector &atomids, std::string &path); // storing fragments molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem); int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList); void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &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_ */