rdtools.reaction.draw#

Draw a reaction using RDKit.

rdtools.reaction.draw.draw_reaction(rxn: ChemicalReaction, figsize: tuple[int, int] = (800, 300), font_scale: float = 1.0, highlight_by_reactant: bool = True) str#

Generate SVG str for a RDKit reaction.

Parameters:
  • rxn (ChemicalReaction) – The reaction to be drawn.

  • figsize (tuple[int, int], optional) – The size of the figure. Defaults to (800, 300).

  • font_scale (float, optional) – The font scale. Defaults to 1.0.

  • highlight_by_reactant (bool, optional) – Whether to highlight by reactant. Defaults to True.

Returns:

str – The SVG string of the reaction.