Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MolGraphWriter.h
Go to the documentation of this file.
1 
11 #ifndef INCLUDE_MOLASSEMBLER_MOL_GRAPH_WRITER_H
12 #define INCLUDE_MOLASSEMBLER_MOL_GRAPH_WRITER_H
13 
15 
16 namespace Scine {
17 namespace Molassembler {
18 
19 class StereopermutatorList;
20 class AtomStereopermutator;
21 class BondStereopermutator;
22 
27  static const std::map<std::string, std::string>& elementBGColorMap();
28  static const std::map<std::string, std::string>& elementTextColorMap();
30 
38  const PrivateGraph* const graphPtr;
43 
45  const PrivateGraph* passGraphPtr,
46  const StereopermutatorList* passPermutatorListPtr
47  );
48 
49  virtual ~MolGraphWriter() = default;
50 
51  /* Information */
52  void operator() (std::ostream& os) const;
53  void operator() (std::ostream& os, PrivateGraph::Vertex v) const;
54  void operator() (std::ostream& os, const PrivateGraph::Edge& e) const;
55 
56  /* Display customization */
58  virtual std::map<std::string, std::string> vertexAttributes(PrivateGraph::Vertex v) const;
59 
61  virtual std::string vertexLabel(PrivateGraph::Vertex v) const;
62 
64  virtual std::pair<std::string, std::string> fillFontColors(PrivateGraph::Vertex v) const;
65 
67  virtual std::map<std::string, std::string> edgeAttributes(const PrivateGraph::Edge& e) const;
68 
70  virtual std::string edgeColor(const PrivateGraph::Edge& e) const;
71 
73  virtual std::vector<std::string> edgeTooltips(AtomIndex source, AtomIndex target) const;
74 
76  virtual std::vector<std::string> atomStereopermutatorTooltips(
77  const AtomStereopermutator& permutator
78  ) const;
79 
81  virtual std::vector<std::string> bondStereopermutatorTooltips(
82  const BondStereopermutator& permutator
83  ) const;
84 };
85 
86 } // namespace Molassembler
87 } // namespace Scine
88 
89 #endif
const PrivateGraph *const graphPtr
Non-null pointer to private graph.
Definition: MolGraphWriter.h:39
virtual std::vector< std::string > bondStereopermutatorTooltips(const BondStereopermutator &permutator) const
Tooltips for a bond stereopermutator.
virtual std::map< std::string, std::string > vertexAttributes(PrivateGraph::Vertex v) const
All attributes to display for a vertex.
Handles the steric permutation of substituents of a non-terminal central atom.
Definition: AtomStereopermutator.h:79
virtual std::map< std::string, std::string > edgeAttributes(const PrivateGraph::Edge &e) const
All attributes to display for an edge.
Handles specific relative arrangements of two atom stereopermutators joined by a bond.
Definition: BondStereopermutator.h:46
Manages all stereopermutators that are part of a Molecule.
Definition: StereopermutatorList.h:30
virtual std::pair< std::string, std::string > fillFontColors(PrivateGraph::Vertex v) const
Fill and font color for a vertex.
virtual std::string edgeColor(const PrivateGraph::Edge &e) const
Display attribute pair for bond type (arbitrary)
virtual std::string vertexLabel(PrivateGraph::Vertex v) const
Label string for a vertex.
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
Library internal graph class wrapping BGL types.
Definition: PrivateGraph.h:26
const StereopermutatorList *const stereopermutatorListPtr
Maybe pointer to stereopermutator list, maybe nullptr.
Definition: MolGraphWriter.h:41
BglType::edge_descriptor Edge
Definition: PrivateGraph.h:71
virtual std::vector< std::string > edgeTooltips(AtomIndex source, AtomIndex target) const
Tooltips for an edge.
virtual std::vector< std::string > atomStereopermutatorTooltips(const AtomStereopermutator &permutator) const
Tooltips for an atom stereopermutator.
Helper class to write the Graph as Graphviz output.
Definition: MolGraphWriter.h:24
Boost Graph Library wrapper to help in concealing underlying type.
BglType::vertex_descriptor Vertex
Definition: PrivateGraph.h:70