generate_reaction
Draw net reaction schemes from reactant and product names or SMILES, with conditions above and below arrows, and export PNG, SVG, or ChemDraw-editable CDXML.
Instructions
Draw a reaction scheme from reactants, products and conditions.
Writes PNG/SVG files and returns a panel with conditions above and below the arrow. arrow: "forward" (→), "equilibrium" (⇌, reversible) or "retro" (⇒). Use it when explaining a reaction as well as for explicit drawing requests. This draws the net reaction, without step-by-step electron-flow mechanisms. Pass English or IUPAC compound names, or SMILES.
Not this tool for: one compound or a property of one compound such as its acidity (use generate_molecule), independent structures (use batch_generate), or structural differences (use compare_molecules).
Args: reactants: List of English/IUPAC reactant names or SMILES strings. products: List of English/IUPAC product names or SMILES strings. conditions: Text above the arrow (e.g. 'H2SO4, 0-5 °C'); formula digits are subscripted, a line break starts a new line. conditions_below: Text under the arrow (e.g. 'reflux, 2 h'). arrow: "forward" (→), "equilibrium" (⇌, reversible reaction) or "retro" (⇒, retrosynthesis: target as reactants, precursors as products). name: Display name for the reaction step (can be localized). formats: Any of "png", "svg", "cdxml" (default: png + svg). Add "cdxml" only when the scheme is to be edited in ChemDraw. abbreviate_groups: True draws common substituents as short labels (Ph, OAc, OMe, CO2H, tBu, Boc …); the CDXML keeps full structures. render_style: "" standard · "compact" small print · "presentation" slides · "grayscale" b/w palette. coefficients: One integer per species, reactants then products ([2, 1, 2] draws 2 H2 + O2 → 2 H2O). Set only when the user asks for a balanced equation; otherwise draw as given — the panel's "Apply coefficients" button sets them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| arrow | No | forward | |
| formats | No | ||
| products | Yes | ||
| reactants | Yes | ||
| conditions | No | ||
| coefficients | No | ||
| render_style | No | ||
| conditions_below | No | ||
| abbreviate_groups | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| type | No | reaction | |
| arrow | No | forward | |
| files | No | ||
| balance | No | ||
| request | No | ||
| products | No | ||
| reactants | No | ||
| cdxml_path | No | ||
| conditions | No | ||
| coefficients | No | ||
| conditions_below | No |