3.1.11. GraphPrinter

3.1.11.1. Class GraphPrinter

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__(self)

The default constructor enables edges as bonds and raised charges.

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.

edgesAsBonds

Control whether edges with special labels are drawn as chemical bonds.

Type:bool
collapseHydrogens

Control whether vertices representing hydrogen atoms are collapsed into their neighbours labels.

Type:bool
raiseCharges

Control whether a vertex label suffix encoding a charge is written as a superscript to the rest of the label.

Type:bool
simpleCarbons

Control whether some vertices encoding carbon atoms are depicted without any label.

Type:bool
thick

Control whether all edges are drawn thicker than normal and all labels are written in bold.

Type:bool
withColour

Control whether colour is applied to certain elements of the graph which are molecule-like.

Type:bool
withIndex

Control whether the underlying indices of the vertices are printed.

Type:bool
withTexttt

Control whether the vertex and edge labels are written with typewriter font.

Type:bool
rotation

Rotation of internally computed coordinates.

Type:int