Skip to main content

display()

Show the graph in Jupyter.

Usage

Source

display(
    gra,
    *,
    atom_indices=False,
)

The drawing shows a Lewis structure (bond orders, formal charges and radicals, perceived with the graph’s charge and spin), the LS as wedges (undetermined ones marked; a CH3 or CH2 carbon’s only with atom_indices), and for a reaction graph its breaking and forming bonds on the reactant structure: breaking bonds red, forming bonds blue (dashed), and the site of a stereo change magenta. An undetermined atom LS has a “?” on its centre, and an undetermined bond LS is drawn as a crossed double bond (a cumulated chain’s has a “?” on its middle bond). Each graph type also draws itself in Jupyter (_repr_svg_), without the atom indices.

Known limit: of a species’ resonance structures (allyl, acetate), one is drawn.

Parameters

gra: AnyGraph

The graph.

atom_indices: bool = False
Label each atom with its index.

Raises

ImportError
If IPython isn’t installed.