plot_aromatic_rings

go-to Plotly traces for aromatic ring outlines and fills; paired with compute_aromatic_cycles.

visualize.plot_aromatic_rings(
    ase_atoms,
    isomorphic_aromatic_cycles=None,
    kwargs_rings=dict(mode='lines', line=(dict(color='white', width=2)), showlegend=False, legendgroup='aromatics', legendgrouptitle_text='Aromatic rings', name='Aromatic rings'),
    kwargs_highlight=dict(color='skyblue', opacity=0.5, alphahull=(-1), showlegend=False, legendgroup='aromatics', legendgrouptitle_text='Aromatic rings', name='Aromatic highlights'),
)

Plotly traces for aromatic ring outlines and semi-transparent fills.

When isomorphic_aromatic_cycles is None, calls :func:~mofography.analyze.compute_aromatic_cycles (same path as Three.js; cached on ase_atoms.info["aromatic_cycles"]).

Parameters

Name Type Description Default
isomorphic_aromatic_cycles atom-index rings, or None to auto-detect None

Returns

Name Type Description
tuple of outline + highlight Plotly traces