chem-nmr-predict
Skill174 starsChanged 6 months agoMITView on GitHub
Predict 1H NMR spectra from SMILES strings via NMRdb.org SPINUS neural network prediction and nmrsim quantum mechanical spin simulation.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/atomisticskills.mdcCursor rule
- .cursor/rules/use-agent-skills.mdcCursor rule
- chem-bond-dissociationSkill
- chem-conformer-searchSkill
- chem-db-mofSkill
- chem-db-qmofSkill
- chem-db-spectraSkill
- chem-dft-orca-advanced-calculationSkill
- chem-dft-orca-optimizationSkill
- chem-dft-orca-singlepointSkill
- chem-docking-voidSkill
- chem-hazard-toxicitySkill
- chem-irc-verificationSkill
- chem-msms-predictSkill
- chem-neb-barrierSkill
- chem-nmr-analysisSkill
- chem-react-otSkill
- chem-similarity-searchSkill
- chem-solution-mdSkill
- chem-sorption-gcmcSkill
- chem-sorption-relaxSkill
- chem-sorption-widomSkill
- chem-spectrum-matcherSkill
- chem-thermochemistrySkill
- chem-ts-optimizationSkill
- chem-vibrationSkill
- drug-admet-predictionSkill
- drug-binding-site-definitionSkill
- drug-bioactivity-assaySkill
- drug-complex-system-builderSkill
- drug-db-chemblSkill
- drug-db-pdbSkill
- drug-db-pubchemSkill
- drug-docking-analysisSkill
- drug-docking-vinaSkill
- drug-ligand-prepSkill
- drug-mmpbsa-gbsaSkill
- drug-molecular-fingerprintsSkill
- drug-pocket-detectionSkill
- drug-pose-validationSkill
- drug-protein-ligand-mdSkill
- drug-protein-prepSkill
- drug-redocking-rmsdSkill
- drug-retrosynthesisSkill
- drug-trajectory-analysisSkill
- general-arxiv-searchSkill
- general-biorxiv-searchSkill
- general-chemical-literatureSkill
- general-chemical-pricingSkill
- general-deep-researchSkill
- general-fair-data-reviewSkill
- general-patent-searchSkill
- general-peer-reviewSkill
- general-plot-digitizerSkill
- general-presentationSkill
- general-property-unitsSkill
- general-publisher-access-guardSkill
- general-query-literature-databaseSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
If the user provides compound names instead of SMILES, the agent should first resolve them:
- Distinctive: line 69
After prediction, the agent must:
- Distinctive: line 78
Verify the SMILES is valid (try parsing with RDKit).
- Distinctive: line 79
Check if the molecule actually has hydrogen atoms.
- Distinctive: line 80
If valid but SPINUS fails, inform the user that prediction is unavailable for this compound.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
1H NMR Spectrum Prediction
When to Use This Skill
The agent should use this skill when:
- A SMILES string is known and the agent needs a predicted 1H NMR spectrum (ppm vs intensity) for that compound.
- The agent needs a signal list (chemical shifts, multiplicities, coupling constants, proton counts) for a compound.
- Reference spectra are needed for mixture deconvolution (called by the
chem-nmr-analysisskill). - The user wants to compare a predicted spectrum against an experimental one for structure confirmation.
When NOT to Use This Skill
- The user already has an experimental or digitized spectrum file — no prediction is needed; the agent should use the existing file directly.
- The user has a compound name but not a SMILES — the agent should first resolve the name to SMILES using the
drug-db-pubchemskill, then call this skill. - 13C NMR prediction — this skill predicts 1H NMR only. The NMRdb.org SPINUS endpoint does not support 13C.
- Polymers, organometallics, or molecules with >50 heavy atoms — the SPINUS neural network may not produce reliable predictions, and nmrsim QM simulation is limited to ~11 coupled spins per spin system.
- The user asks about reaction products or mixture composition — the agent should use
chem-nmr-analysisinstead, which calls this skill internally.
Workflow: SMILES → Predicted 1H NMR
Step 1 — Ensure SMILES Are Available
If the user provides compound names instead of SMILES, the agent should first resolve them:
# Env: base-agent
python .agents/skills/drug-db-pubchem/scripts/query_pubchem.py \
--name "camphor" --outdir <research_dir>/pubchem/The agent should extract CanonicalSMILES from the JSON output.
If PubChem returns no results, the agent should try alternate names or ask the user to provide the SMILES directly.
Step 2 — Predict NMR Spectra
# Env: nmr-agent
python .agents/skills/chem-nmr-predict/scripts/predict_nmr.py \
--smiles "<smiles_1>" "<smiles_2>" \
--names "compound1" "compound2" \
--field_mhz 400 \
--output_dir <research_dir>/nmr_predictions/Arguments:
--smiles(required): one or more SMILES strings.--names: human-readable labels for filenames. If omitted, defaults tocomp0,comp1, etc. The agent should always provide meaningful names.--field_mhz: spectrometer frequency in MHz (default: 400). The agent should match the field strength of the user's experimental spectrum if known.--linewidth: Lorentzian FWHM in Hz (default: 1.0). The agent should increase this (e.g., 2.0–5.0) if the user's experimental spectrum has broad lines.--n_points: spectrum resolution (default: 8192). The agent should not change this unless the user requests higher resolution.--output_dir: where to save results.
Outputs per compound:
<name>.xy— two-column tab-separated file (ppm, intensity), descending ppm. Compatible with all NMR processing tools and thechem-nmr-analysisdeconvolution scripts.<name>_signals.csv— signal table with columns:shift_ppm,multiplicity,J_Hz,nH.predictions.json— manifest listing all found/failed compounds and parameters.
Step 3 — Verify Predictions
After prediction, the agent must:
- Check the manifest (
predictions.json) for any failed compounds. - Read the signal table (
_signals.csv) and verify it is chemically reasonable:- The total number of protons across all signals should match the molecular formula.
- Chemical shifts should be in expected ranges (e.g., alkyl 0–2 ppm, aromatic 6–8 ppm, aldehyde 9–10 ppm).
- If the user has an experimental spectrum, the agent should overlay them using
chem-nmr-analysis'splot.pyfor visual comparison.
If SPINUS returns no atoms for a SMILES → the SMILES may be invalid, the molecule may lack hydrogen atoms (e.g., CCl4), or the molecule may be too complex. The agent should:
- Verify the SMILES is valid (try parsing with RDKit).
- Check if the molecule actually has hydrogen atoms.
- If valid but SPINUS fails, inform the user that prediction is unavailable for this compound.
If nmrsim simulation fails → the script falls back to a stick spectrum (chemical shifts only, no multiplet structure). The agent should note this in its response — the predicted spectrum will lack splitting patterns but chemical shifts will still be approximate.
If/Then: Field Strength Matching
- If the user's experimental spectrum was recorded at 300 MHz → the agent should set
--field_mhz 300. Second-order effects are more pronounced at lower field, and nmrsim handles these correctly. - If the user's experimental spectrum was recorded at 600 MHz → the agent should set
--field_mhz 600. Peaks will be better resolved. - If the field strength is unknown → the agent should use the default (400 MHz) and note this assumption.
If/Then: Linewidth
- If the user's spectrum shows sharp, well-resolved peaks → use default
--linewidth 1.0. - If the user's spectrum shows broad peaks (e.g., viscous sample, paramagnetic species) → increase to
--linewidth 3.0or higher. - If predicting for deconvolution against a digitized reference → use
--linewidth 1.0(digitized spectra typically have natural linewidths).
Failure Modes
| Failure | Symptom | Agent Action |
| Invalid SMILES | Script prints FAILED with "Invalid SMILES" | The agent should verify the SMILES with RDKit and correct it. |
| SPINUS returns no atoms | "SPINUS returned no atoms" error | Molecule may lack H atoms or be too complex. The agent should check and inform the user. |
| SPINUS network timeout | HTTP timeout error | The agent should retry once. If it fails again, NMRdb.org may be down. The agent should inform the user. |
| nmrsim QM simulation fails | WARNING in output, falls back to stick spectrum | Spin system too large (>11 spins) or numerical issue. The agent should note reduced accuracy. |
| Total nH in signals does not match molecular formula | Signal table has wrong proton count | Grouping heuristic may have failed. The agent should flag this to the user. |
Environment
mamba activate nmr-agentInstall: conda-envs/nmr-agent/install.sh
Required packages: numpy, rdkit, requests, nmrsim.
References
- Banfi, D. & Patiny, L., "www.nmrdb.org: Resurrecting and processing NMR spectra on-line", Chimia, 2008.
- Aires-de-Sousa, J. et al., "SPINUS: prediction of 1H NMR spectra by neural networks", J. Chem. Inf. Model., 2002.
- Sametz, G., "nmrsim: a Python library for NMR simulation", github.com/sametz/nmrsim.
Author: Jesus Diaz Sanchez Contact: GitHub @jdsanc
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

