Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Retrosynthetic analysis and computational reaction prediction
.claude/skills/brycewang-stanford-retrosynthesis-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 95% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 95% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 137% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 89% | 0% |
Plan synthetic routes for target molecules using retrosynthetic analysis principles and computational tools, from Corey's logic to modern AI-driven approaches.
Retrosynthesis works backward from a target molecule to identify simpler, commercially available precursors:
Target Molecule (TM)
|
[Disconnection 1] ← Apply transform (reverse of a known reaction)
|
Synthon A + Synthon B
| |
[Available] [Disconnection 2]
|
Synthon C + Synthon D
| |
[Available] [Available]Key terminology:
| Strategy | Description | When to Use | |----------|-------------|------------| | FGI | Convert functional groups to enable disconnections | When direct disconnection is not possible | | C-C Bond disconnection | Break carbon-carbon bonds | Building the carbon skeleton | | C-X Bond disconnection | Break carbon-heteroatom bonds | Functional group installation | | Ring disconnection | Open rings to identify acyclic precursors | Cyclic target molecules | | Symmetry exploitation | Use molecular symmetry to simplify analysis | Symmetric molecules | | Convergent synthesis | Combine two complex fragments late | Minimize linear step count |
# Alcohol (C-OH) → Carbonyl reduction
R-CH(OH)-R' ⟹ R-CO-R' + NaBH4/LiAlH4
# Amine (C-N) → Reductive amination
R-CH2-NH-R' ⟹ R-CHO + R'-NH2
# C-C Bond (aldol) → Aldol retro
R-CH(OH)-CH2-CO-R' ⟹ R-CHO + CH3-CO-R'
# C-C Bond (Grignard) → Grignard retro
R-CH(OH)-R' ⟹ R-CHO + R'-MgBr
# Ester (C-O) → Fischer esterification retro
R-COO-R' ⟹ R-COOH + R'-OH
# Amide (C-N) → Amide coupling retro
R-CO-NH-R' ⟹ R-COOH + R'-NH2
# Diels-Alder → Retro Diels-Alder
Cyclohexene derivative ⟹ Diene + Dienophile
# Wittig → Retro Wittig
R-CH=CH-R' ⟹ R-CHO + R'-CH2-PPh3| Tool | Developer | Method | Access | |------|-----------|--------|--------| | ASKCOS | MIT | Template-based + neural | Free (askcos.mit.edu) | | IBM RXN | IBM Research | Transformer seq2seq | Free (rxn.res.ibm.com) | | Reaxys | Elsevier | Database-backed | Subscription | | SciFinder-n | CAS | Database + AI | Subscription | | Spaya | Iktos | Graph neural network | Commercial | | AiZynthFinder | AstraZeneca | Monte Carlo tree search | Open source |
pythonimport requests # ASKCOS API for retrosynthetic planning # (requires running ASKCOS locally or using the hosted version) target_smiles = "CC(=O)Oc1ccccc1C(=O)O" # Aspirin # One-step retrosynthesis response = requests.post( "https://askcos.mit.edu/api/retro/", json={ "smiles": target_smiles, "num_results": 10, "max_depth": 5 } ) results = response.json() for i, result in enumerate(results.get("precursors", [])[:5]): print(f"Route {i+1}:") print(f" Precursors: {result['smiles']}") print(f" Template: {result.get('template', 'N/A')}") print(f" Score: {result.get('score', 'N/A')}")
python# IBM RXN API from rxn4chemistry import RXN4ChemistryWrapper api_key = os.environ["RXN4CHEM_API_KEY"] rxn = RXN4ChemistryWrapper(api_key=api_key) rxn.create_project("retrosynthesis_example") # Predict retrosynthesis response = rxn.predict_automatic_retrosynthesis( product="CC(=O)Oc1ccccc1C(=O)O", # Aspirin max_steps=3 ) # Get results results = rxn.get_predict_automatic_retrosynthesis_results(response["prediction_id"]) for route in results.get("retrosynthetic_paths", []): print(f"Route confidence: {route.get('confidence', 'N/A')}") for step in route.get("steps", []): print(f" Reaction: {step.get('reaction_smiles', 'N/A')}")
pythonfrom aizynthfinder.aizynthfinder import AiZynthFinder # Configure the finder finder = AiZynthFinder() finder.stock.load("zinc_stock.hdf5") # Commercial building blocks finder.expansion_policy.load("expansion_policy_model.onnx") # Retro model # Set target finder.target_smiles = "CC(=O)Oc1ccccc1C(=O)O" # Aspirin # Run tree search finder.config.search.time_limit = 120 # seconds finder.config.search.iteration_limit = 500 finder.tree_search() # Extract and analyze routes finder.build_routes() for i, route in enumerate(finder.routes): print(f"Route {i+1} (score: {route.score:.3f}):") print(f" Steps: {len(route.reactions)}") for rxn in route.reactions: print(f" {rxn}")
SMILES (Simplified Molecular Input Line Entry System) is the standard text representation:
# Common SMILES patterns
Water: O
Ethanol: CCO
Benzene: c1ccccc1
Aspirin: CC(=O)Oc1ccccc1C(=O)O
Caffeine: Cn1c(=O)c2c(ncn2C)n(C)c1=O
Ibuprofen: CC(C)Cc1ccc(cc1)C(C)C(=O)O
# SMILES rules
# Atoms: C, N, O, S, P, F, Cl, Br, I
# Bonds: - (single, implicit), = (double), # (triple)
# Branches: () for branching
# Rings: numbers for ring closure (c1ccccc1 = benzene)
# Aromatic: lowercase letters
# Stereochemistry: / \ for E/Z, @ @@ for R/S| Database | Coverage | Features | Access | |----------|----------|----------|--------| | Reaxys | 130M+ reactions | Experimental conditions, yields | Subscription | | SciFinder / CAS | 160M+ reactions | Commercial availability, safety data | Subscription | | USPTO | 3.7M reactions | US patent reactions | Free (open data) | | Open Reaction Database (ORD) | Growing | Structured reaction data, conditions | Free | | RMG (Reaction Mechanism Generator) | Kinetics | Automated mechanism generation | Free (MIT) |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 26,409 | 24,798 | -6% | 1 | 1 | 0% | 4,162 | 5,470 | +31% | 0 | 0 | — |
case-02 | fail→pass | 10,959 | 8,459 | -23% | 1 | 1 | 0% | 1,818 | 3,550 | +95% | 0 | 0 | — |
case-03 | fail→pass | 8,351 | 5,877 | -30% | 1 | 1 | 0% | 1,607 | 3,133 | +95% | 0 | 0 | — |
case-04 | pass→pass | 9,551 | 6,433 | -33% | 1 | 1 | 0% | 1,665 | 3,139 | +89% | 0 | 0 | — |
case-05 | pass→pass | 7,141 | 7,026 | -2% | 1 | 1 | 0% | 1,283 | 3,242 | +153% | 0 | 0 | — |
case-06 | fail→pass | 7,315 | 5,314 | -27% | 1 | 1 | 0% | 1,261 | 2,984 | +137% | 0 | 0 | — |
case-07 | pass→pass | 8,978 | 10,728 | +19% | 1 | 1 | 0% | 1,883 | 3,993 | +112% | 0 | 0 | — |
case-08 | pass→pass | 5,095 | 1,847 | -64% | 1 | 1 | 0% | 805 | 2,284 | +184% | 0 | 0 | — |
case-09 | pass→pass | 15,591 | 16,502 | +6% | 1 | 1 | 0% | 2,491 | 4,494 | +80% | 0 | 0 | — |
case-10 | pass→pass | 4,373 | 2,587 | -41% | 1 | 1 | 0% | 646 | 2,403 | +272% | 0 | 0 | — |
case-11 | pass→pass | 16,391 | 15,212 | -7% | 1 | 1 | 0% | 2,522 | 4,363 | +73% | 0 | 0 | — |
case-12 | pass→pass | 11,402 | 3,439 | -70% | 1 | 1 | 0% | 1,760 | 2,569 | +46% | 0 | 0 | — |
case-13 | pass→pass | 11,804 | 6,895 | -42% | 1 | 1 | 0% | 1,546 | 3,095 | +100% | 0 | 0 | — |
case-14 | pass→pass | 4,235 | 3,061 | -28% | 1 | 1 | 0% | 732 | 2,523 | +245% | 0 | 0 | — |
case-15 | pass→pass | 8,694 | 7,280 | -16% | 1 | 1 | 0% | 1,501 | 3,233 | +115% | 0 | 0 | — |
case-16 | pass→pass | 15,106 | 12,518 | -17% | 1 | 1 | 0% | 2,246 | 3,858 | +72% | 0 | 0 | — |
case-17 | pass→pass | 30,806 | 13,392 | -57% | 1 | 1 | 0% | 2,026 | 4,023 | +99% | 0 | 0 | — |
case-18 | pass→pass | 4,320 | 3,632 | -16% | 1 | 1 | 0% | 698 | 2,661 | +281% | 0 | 0 | — |
case-19 | pass→pass | 6,048 | 5,960 | -1% | 1 | 1 | 0% | 1,015 | 3,084 | +204% | 0 | 0 | — |
case-20 | pass→pass | 12,406 | 12,996 | +5% | 1 | 1 | 0% | 1,662 | 3,900 | +135% | 0 | 0 | — |
case-21 | pass→pass | 18,244 | 19,328 | +6% | 1 | 1 | 0% | 2,815 | 4,778 | +70% | 0 | 0 | — |
case-22 | pass→pass | 11,540 | 8,750 | -24% | 1 | 1 | 0% | 2,241 | 3,854 | +72% | 0 | 0 | — |
case-23 | pass→pass | 7,385 | 10,508 | +42% | 1 | 1 | 0% | 1,362 | 3,837 | +182% | 0 | 0 | — |
case-24 | pass→pass | 17,037 | 15,426 | -9% | 1 | 1 | 0% | 2,787 | 4,791 | +72% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +17 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.