chemparseplot.plot.reaction#

Molecular reaction panels from retained coordinates and xTB properties.

Module Contents#

Functions#

align_reaction

Keep atom identities and apply proper rigid rotations into one view.

read_wbo

Parse xTB’s sparse, one-based Wiberg bond-order table.

changed_bonds

Largest endpoint distance changes among initially or finally close pairs.

_bond_order_cmap

Bond-order colours: the part of ruhi_seq that reaches the WCAG 3:1 contrast for graphics on white, light for weak bonds to dark for strong.

apply_wbo_style

Replace geometric connectivity with measured Wiberg bond orders.

render_reaction_state

Render a fixed common orientation; density is a qualitative surface.

plot_reaction_atlas

Render images and measured bond annotations in aligned reaction rows.

plot_reaction_gallery

Render one structure per reaction in a grid of labelled tiles.

Data#

API#

chemparseplot.plot.reaction.WBO_COLUMNS#

3

chemparseplot.plot.reaction.MIN_BOND_CHANGE_A#

0.25

chemparseplot.plot.reaction.COMPARATOR_COLUMN#

3

chemparseplot.plot.reaction.align_reaction(atoms_list, reference=1)#

Keep atom identities and apply proper rigid rotations into one view.

chemparseplot.plot.reaction.read_wbo(path, natoms)#

Parse xTB’s sparse, one-based Wiberg bond-order table.

Missing entries remain missing: a print threshold is not a measured zero.

chemparseplot.plot.reaction.changed_bonds(reactant, product, limit=3)#

Largest endpoint distance changes among initially or finally close pairs.

chemparseplot.plot.reaction._bond_order_cmap()#

Bond-order colours: the part of ruhi_seq that reaches the WCAG 3:1 contrast for graphics on white, light for weak bonds to dark for strong.

chemparseplot.plot.reaction.apply_wbo_style(molecule, bond_orders, *, minimum=0.1, weak=0.5, vmax=3.0, max_contact=2.5)#

Replace geometric connectivity with measured Wiberg bond orders.

Atom numbering follows the source file. Dotted edges encode WBO below weak; colour and width use a common scale across all structures. A pair farther apart than max_contact times its covalent-radius sum gets no edge: a closed-shell density at a near-degenerate geometry can assign bond order to separated radical centres, which is not a bond.

chemparseplot.plot.reaction.render_reaction_state(xyz, output, *, cube=None, charge=0, multiplicity=1, iso=0.02, bond_orders=None, labels=None)#

Render a fixed common orientation; density is a qualitative surface.

chemparseplot.plot.reaction.plot_reaction_atlas(cases, *, density=False, width=7.2)#

Render images and measured bond annotations in aligned reaction rows.

Render one structure per reaction in a grid of labelled tiles.

Each tile holds a title (the name other figures use for the reaction), an optional subtitle naming the chemistry, the rendered image (or density_image) and the measured bonds to annotate, in the format of :func:plot_reaction_atlas.