1 | /*
|
---|
2 | * ExportGraph_ToFiles.hpp
|
---|
3 | *
|
---|
4 | * Created on: 08.03.2012
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef EXPORTGRAPH_TOFILES_HPP_
|
---|
9 | #define EXPORTGRAPH_TOFILES_HPP_
|
---|
10 |
|
---|
11 | // include config.h
|
---|
12 | #ifdef HAVE_CONFIG_H
|
---|
13 | #include <config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <string>
|
---|
17 | #include <vector>
|
---|
18 |
|
---|
19 | #include "Fragmentation/HydrogenSaturation_enum.hpp"
|
---|
20 | #include "Fragmentation/Exporters/ExportGraph.hpp"
|
---|
21 | #include "MoleculeListClass.hpp"
|
---|
22 |
|
---|
23 | class ListOfLocalAtoms_t;
|
---|
24 |
|
---|
25 | /** ExportGraph_ToFiles implements an ExportGraph as storing all fragmentary
|
---|
26 | * systems to files.
|
---|
27 | */
|
---|
28 | class ExportGraph_ToFiles : public ExportGraph
|
---|
29 | {
|
---|
30 | public:
|
---|
31 | ExportGraph_ToFiles(const Graph &_graph, molecule *&_mol, const enum HydrogenSaturation _saturation);
|
---|
32 | virtual ~ExportGraph_ToFiles();
|
---|
33 |
|
---|
34 | void operator()();
|
---|
35 |
|
---|
36 | void setPrefix(const std::string &_prefix) {
|
---|
37 | prefix = _prefix;
|
---|
38 | }
|
---|
39 |
|
---|
40 | void setOutputTypes(const std::vector<std::string> &_typelist) {
|
---|
41 | typelist = _typelist;
|
---|
42 | }
|
---|
43 |
|
---|
44 | private:
|
---|
45 |
|
---|
46 | void prepareMolecule();
|
---|
47 | molecule * StoreFragmentFromKeySet(molecule *mol, KeySet &Leaflet, bool IsAngstroem);
|
---|
48 | int StoreFragmentFromKeySet_Init(molecule *mol, molecule *Leaf, KeySet &Leaflet, ListOfLocalAtoms_t &SonList);
|
---|
49 | void CreateInducedSubgraphOfFragment(molecule *mol, molecule *Leaf, ListOfLocalAtoms_t &SonList, bool IsAngstroem);
|
---|
50 | bool CreateMappingLabelsToConfigSequence(std::map<atomId_t, int> &SortIndex);
|
---|
51 |
|
---|
52 |
|
---|
53 | private:
|
---|
54 | //!> molecule as reference
|
---|
55 | molecule *mol;
|
---|
56 | //!> internal list of created molecules
|
---|
57 | MoleculeListClass BondFragments;
|
---|
58 | //!> prefix for fragment files
|
---|
59 | std::string prefix;
|
---|
60 | //!> list of parser types for which a configuration file per fragment is stored
|
---|
61 | std::vector<std::string> typelist;
|
---|
62 | //!> whether to saturate dangling bonds or not
|
---|
63 | const enum HydrogenSaturation saturation;
|
---|
64 | };
|
---|
65 |
|
---|
66 | #endif /* EXPORTGRAPH_TOFILES_HPP_ */
|
---|