generate_mechanism
Draws step-by-step SN2, SN1, or Fischer esterification mechanisms with curved arrows using your substrates, showing each electron-flow step.
Instructions
Show a reaction mechanism step by step with curved arrows, drawn with the user's own substrates.
Three mechanism families, each with a stated limit: SN2 — a methyl, primary or secondary alkyl chloride, bromide or iodide with one anionic nucleophile (OH⁻, CN⁻, I⁻, Br⁻, RO⁻, N₃⁻, RS⁻/HS⁻); a stereocentre is inverted. SN1 — a tertiary, benzylic or allylic alkyl halide with water, an alcohol or one of those anions. Fischer esterification — one carboxylic acid with one primary or secondary alcohol. Substrates outside the limit return an error that names the reason. Without substrates, or if the drawing fails, the textbook example is shown and the result says so (substrates_drawn, fallback_reason).
Use this when the user asks about one of these mechanisms, electron-flow arrows, or wants to see how such a reaction proceeds step by step.
A question that starts "why does …" or "I don't understand why …" about a mechanism is the same request in disguise ("why does SN2 invert the centre?"). The arrows ARE the explanation; draw them and explain alongside, rather than describing them in words.
Not this tool for: the net equation educt → product without intermediates — that is generate_reaction. Only the mechanism types listed in reaction_type exist; for anything else use generate_reaction.
Args: reaction_type: "sn2", "sn1" or "fischer_ester". substrates: The user's substrates (names or SMILES): halide and nucleophile, or acid and alcohol. current_step: 0 = overview (all steps), 1-N = specific step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| substrates | Yes | ||
| current_step | No | ||
| reaction_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | No | mechanism | |
| steps | Yes | ||
| current_step | No | ||
| reaction_type | Yes | ||
| fallback_reason | No | ||
| substrates_drawn | No |