.. _py-graph/Printer: ********************************************************** graph/Printer ********************************************************** .. default-domain:: py .. py:currentmodule:: mod .. cpp:namespace:: mod .. class:: 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. .. method:: __init__() The default constructor enables edges as bonds, raised charges, and raised isotopes. .. method:: setMolDefault() Shortcut for enabling all but thickening and index printing. .. method:: setReactionDefault() Shortcut for enabling all but thickening, index printing and simplification of carbon atoms. .. method:: disableAll() Disable all special printing features. .. method:: enableAll() Enable all special printing features, except typewriter font. .. attribute:: edgesAsBonds Control whether edges with special labels are drawn as chemical bonds. :type: bool .. attribute:: collapseHydrogens Control whether vertices representing hydrogen atoms are collapsed into their neighbours labels. :type: bool .. attribute:: raiseIsotopes Control whether a vertex label prefix encoding an isotope is written as a superscript to the rest of the label. :type: bool .. attribute:: raiseCharges Control whether a vertex label suffix encoding a charge is written as a superscript to the rest of the label. :type: bool .. attribute:: simpleCarbons Control whether some vertices encoding carbon atoms are depicted without any label. :type: bool .. attribute:: thick Control whether all edges are drawn thicker than normal and all labels are written in bold. :type: bool .. attribute:: withColour Control whether colour is applied to certain elements of the graph which are molecule-like. :type: bool .. attribute:: withIndex Control whether the underlying indices of the vertices are printed. :type: bool .. attribute:: withTexttt Control whether the vertex and edge labels are written with typewriter font. :type: bool .. attribute:: withRawStereo Control whether the vertices and edges are annotated with the raw stereo properties. :type: bool .. attribute:: withPrettyStereo Control whether the vertices and edges are annotated with stylized stereo properties. :type: bool .. attribute:: rotation Rotation of internally computed coordinates. :type: int .. attribute:: mirror Mirror internally computed coordinates in the y-axis. :type: bool .. attribute:: 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: bool .. attribute:: graphvizPrefix The string that will be inserted into generated DOT files, just after the graph declaration. DOT files are only generated when ``withGraphvizCoords == True``. :type: str