From mims-harvard-tooluniverse
Teaches first-principles reasoning for organic chemistry problems: predict reaction products, interpret spectra, analyze stereochemistry, perform calculations. Useful for mechanisms, spectra, formulas.
npx claudepluginhub joshuarweaver/cascade-data-analytics --plugin mims-harvard-tooluniverseThis skill uses the workspace's default tool permissions.
This skill teaches **how to think through** organic chemistry problems, not what to memorize.
Conducts multi-round deep research on GitHub repos via API and web searches, generating markdown reports with executive summaries, timelines, metrics, and Mermaid diagrams.
Dynamically discovers and combines enabled skills into cohesive, unexpected delightful experiences like interactive HTML or themed artifacts. Activates on 'surprise me', inspiration, or boredom cues.
Generates images from structured JSON prompts via Python script execution. Supports reference images and aspect ratios for characters, scenes, products, visuals.
This skill teaches how to think through organic chemistry problems, not what to memorize.
Do NOT pattern-match to a named reaction. Instead, reason from first principles:
Look at each molecule and ask: where is the electron density?
The reaction will happen where the strongest nucleophile meets the strongest electrophile.
Three fundamental categories:
Draw the arrow from nucleophile to electrophile. Ask:
Every reaction needs a thermodynamic reason to proceed:
Before reporting an answer:
Identify the reaction type from reagents/conditions, then apply its product topology:
| Reagent/Condition Pattern | Reaction Type | Product Logic |
|---|---|---|
| RMgBr (or RLi) + ArX + Pd or Ni catalyst | Kumada coupling | R replaces X on Ar; excess RMgBr replaces ALL X |
| Ph3P=CHR + aldehyde/ketone | Wittig | C=C replaces C=O; unstabilized ylide → Z-alkene; stabilized (ester/CN) → E-alkene |
| Sulfoxide + strong electrophile (Tf2O, Ac2O) | Pummerer rearrangement | S-oxidation state drops; alpha-carbon gets new bond to nucleophile/leaving group |
| Allyl vinyl ether heated (or 1,5-dien-3-ol + base) | [3,3]-sigmatropic (oxy-Cope/Claisen) | Redraw 6-membered chair TS; new sigma bond at 1,6 positions; old 3,4 bond breaks |
| Diene + dienophile, heat | Diels-Alder | [4+2] cycloaddition; endo rule for stereochemistry; cis dienophile substituents stay cis |
| ArX + excess organometallic (no catalyst) | Nucleophilic aromatic substitution or benzyne | Each X replaced by nucleophile; count equivalents to determine degree of substitution |
Work backward from product to starting materials by identifying how key bonds were formed:
Robinson Annulation (product is a 2-cyclohexenone fused or substituted system):
Intramolecular Aldol (fused ring from KOH/base on an open-chain substrate):
General disconnection heuristic — identify the new bond, then choose the right reaction:
MolecularFormula_analyze tool (via MCP/SDK) with sample_g, CO2_g, H2O_g, and molar_mass parameters. Fallback: run molecular_formula.py directly.DegreesOfUnsaturation_calculate tool with formula parameter. Fallback: run degrees_of_unsaturation.py --formula <result>.Do NOT look up tables of chemical shifts. Instead, follow this systematic approach:
If given, calculate degrees of unsaturation first. This immediately tells you:
This single number eliminates huge categories of structures before you look at any spectrum.
Do not try to assign every peak. Instead, ask three questions:
If you can answer these three questions, you have identified the major functional groups. Everything else is confirmatory.
Every signal tells you three things — use all of them:
No single spectrum gives the answer. Combine them:
A stereocenter is a carbon with four DIFFERENT substituents. To find them:
Ask: what is the mechanism?
These ready-to-run scripts live in skills/tooluniverse-organic-chemistry/scripts/.
Use them via the Bash tool instead of computing by hand — they validate inputs and print verification lines.
chemistry_facts.py — Chemical and physical facts referenceA lookup tool for facts that are easy to mis-remember. Query this script instead of guessing.
Three categories: allotropes, point_group, common_reagents. Run with no extra args to list all entries in a category.
python chemistry_facts.py --type allotropes --element P
python chemistry_facts.py --type point_group --molecule "benzene"
python chemistry_facts.py --type common_reagents --reagent "LiAlH4"
python chemistry_facts.py --type allotropes # list all elements
Coverage: Allotropes for P, C, S, O. Point groups for 15 molecules (water C2v through H2 D∞h). 24 reagents (LiAlH4 through DMDO) with full name, function, selectivity, stereochemistry, and KEY DISTINCTION notes.
When to use: Any question about allotropes, molecular symmetry/point groups, or reagent selectivity. Always query before reporting reagent facts.
crystal_validator.py — Crystal structure density validatorPreferred: use CrystalStructure_validate tool (via MCP/SDK) with unit cell parameters (a, b, c, alpha, beta, gamma, Z, MW, density). Fallback: run crystal_validator.py directly.
Validates crystal structure data by computing theoretical density from unit cell parameters and comparing against a reported value. Flags inconsistencies that indicate errors in published datasets.
Supports all seven crystal systems (cubic, tetragonal, orthorhombic, hexagonal, trigonal, monoclinic, triclinic).
python crystal_validator.py --a 5.43 --b 5.43 --c 5.43 --Z 8 --MW 28.085 --density 2.329
python crystal_validator.py --datasets datasets.json # batch mode: JSON array of datasets
Angles default to 90deg. Output: crystal system, volume, calculated density, %error, verdict (OK/WARNING/MISMATCH). Batch mode compares multiple datasets to find the outlier. Density formula: d = (Z * MW) / (V * Na).
When to use: Crystal structure verification, density consistency checks, finding erroneous datasets.
stereochem_tracker.py — Stereochemistry through reaction sequencesTracks R/S configuration at a stereocenter through a series of reactions, predicting the stereochemical outcome at each step.
python stereochem_tracker.py --start R --reactions "SN2, oxidation, SN1"
Supported reactions: SN2 (inversion), SN1 (racemization), E2/E1 (elimination), reduction/oxidation/hydrogenation/hydroboration/epoxidation (retention), mitsunobu (inversion), double_inversion (retention), racemization/epimerization/enolization (racemization).
When to use: Multi-step synthesis chirality tracking, verifying net retention/inversion.
smiles_verifier.py — SMILES molecular property verifier (no RDKit)Preferred: use SMILES_verify tool (via MCP/SDK) with smiles and optional constraint parameters (mw, heavy_atoms, valence_electrons, total_atoms, formal_charge). Fallback: run smiles_verifier.py directly.
Parses a SMILES string without external dependencies and computes molecular weight, heavy atom count, valence electron count, total atom count, and formal charge. Then optionally checks these against user-supplied constraints. Use this every time you design or propose a SMILES answer.
python smiles_verifier.py --smiles "CC(C)(C(=N)N)N=NC(C)(C)C(=N)N" --mw 198.15 --heavy_atoms 14 --valence_electrons 80
Constraint flags: --mw (tolerance 0.5), --heavy_atoms, --valence_electrons, --total_atoms, --formal_charge
When to use: Always verify SMILES answers before reporting. Catches MW, atom count, and electron count errors.
degrees_of_unsaturation.py — Degrees of unsaturation (DoU) calculatorPreferred: use DegreesOfUnsaturation_calculate tool (via MCP/SDK) with formula or individual atom count parameters. Fallback: run degrees_of_unsaturation.py directly.
Computes DoU = (2C + 2 + N − H − X) / 2 from a formula string or individual atom counts. Handles all halogens (F, Cl, Br, I) and notes that O and S do not affect DoU. Prints the full arithmetic, a structural interpretation, and a round-trip verification.
python degrees_of_unsaturation.py --formula C6H6
python degrees_of_unsaturation.py --C 10 --H 14 --O 2 --N 1
Output: atom counts, step-by-step formula, result, structural interpretation, non-integer DoU warning.
molecular_formula.py — Combustion analysis and formula analysisPreferred: use MolecularFormula_analyze tool (via MCP/SDK) with combustion or formula parameters. Fallback: run molecular_formula.py directly.
Two modes in one script.
Mode 1: combustion analysis — --sample_g, --CO2_g, --H2O_g, optional --molar_mass
Mode 2: formula analysis — --formula C6H6 (MW, DoU, elemental composition)
python molecular_formula.py --sample_g 0.2 --CO2_g 0.4874 --H2O_g 0.1998 --molar_mass 78
python molecular_formula.py --formula C6H6
ALWAYS EXECUTE as Python scripts using the Bash tool — do not compute mentally. Prefer the bundled scripts (molecular_formula.py, degrees_of_unsaturation.py) over writing code from scratch.
Key formulas (write and run Python when bundled scripts don't cover the case):
CrystalStructure_validate tool. Fallback: crystal_validator.py (never compute unit cell volumes by hand)stereochem_tracker.py (tracks R/S through SN2, SN1, etc.)DegreesOfUnsaturation_calculate tool. Fallback: degrees_of_unsaturation.pyMolecularFormula_analyze tool. Fallback: molecular_formula.pySMILES_verify tool. Fallback: smiles_verifier.py (always verify SMILES answers)chemistry_facts.py --type allotropes --element Xchemistry_facts.py --type point_group --molecule "name"chemistry_facts.py --type common_reagents --reagent "name"PubChem_get_CID_by_compound_name then PubChem_get_compound_properties_by_CIDPubChem_get_CID_by_compound_name or PubChem_get_compound_properties_by_CIDChEMBL_get_molecule or ChEMBL_search_moleculesHMDB_get_metaboliteExtract unit cell params, Z, MW, density for each dataset. Run crystal_validator.py --datasets datasets.json in batch. Largest %error = the error. Common errors: wrong Z, swapped params, angle transcription errors.
python smiles_verifier.py --smiles "..." --mw X --heavy_atoms Y --valence_electrons Z