4.1.9.4. graph/Printer¶
- class mod.GraphPrinter¶
This class is used to configure how graphs are visualised.
Warning
Some of these options greatly alter how graphs are depicted and the result may not accurately represent the underlying graph, and may make non-molecules look like molecules.
- __init__()¶
The default constructor enables edges as bonds, raised charges, and raised isotopes.
- setMolDefault()¶
Shortcut for enabling all but thickening and index printing.
- setReactionDefault()¶
Shortcut for enabling all but thickening, index printing and simplification of carbon atoms.
- disableAll()¶
Disable all special printing features.
- enableAll()¶
Enable all special printing features, except typewriter font.
- collapseHydrogens¶
Control whether vertices representing hydrogen atoms are collapsed into their neighbours labels.
- Type:
- raiseIsotopes¶
Control whether a vertex label prefix encoding an isotope is written as a superscript to the rest of the label.
- Type:
- raiseCharges¶
Control whether a vertex label suffix encoding a charge is written as a superscript to the rest of the label.
- Type:
- simpleCarbons¶
Control whether some vertices encoding carbon atoms are depicted without any label.
- Type:
- thick¶
Control whether all edges are drawn thicker than normal and all labels are written in bold.
- Type:
- withColour¶
Control whether colour is applied to certain elements of the graph which are molecule-like.
- Type:
- withRawStereo¶
Control whether the vertices and edges are annotated with the raw stereo properties.
- Type:
- withPrettyStereo¶
Control whether the vertices and edges are annotated with stylized stereo properties.
- Type:
- withGraphvizCoords¶
Do not use Open Babel for coordinate generation, but only the Graphviz fallback during post-processing. When setting this to
True
consider setting simpleCarbons = False` to avoid misleading depictions due to collinear carbon chains.- Type: