NMR Compound Inference
Use this skill to analyze a local 1D NMR dataset, generate a figure and peak list, search standard reference libraries, and infer the most likely compound or a short ranked candidate list.
Best fit
1H and 13C 1D spectra
- Bruker processed
pdata, Bruker raw fid, NMRPipe 1D files, or two-column ppm,intensity text exports
- Samples with one dominant component
Required inputs
- local spectrum path
- preferably nucleus, solvent, and field strength
- any sample context that narrows candidate chemistry
Dependencies
Install the dependencies into the active Python environment:
python3 -m pip install nmrglue numpy matplotlib
This skill depends on the upstream nmrglue package and does not bundle the nmrglue source code.
Workflow
- Run the helper script to generate the evidence package:
python3 scripts/nmr_candidate_report.py \
--input "<path-to-spectrum>" \
--output-dir "./outputs/$(date +%F)" \
--nucleus "1H"
Optional metadata for better matching:
python3 scripts/nmr_candidate_report.py \
--input "<path-to-spectrum>" \
--output-dir "./outputs/$(date +%F)" \
--nucleus "1H" \
--solvent "D2O" \
--field-mhz 600
Review the generated outputs:
spectrum.png — Plot of the processed spectrum
peak_table.csv — Extracted peak positions and intensities
analysis_summary.json — Structured summary for downstream processing
analysis_report.md — Human-readable report with search recommendations
Read references/standard-libraries.md and search the relevant library sites:
Return a report with:
- problem type
- what data was analyzed
- plot path
- major peaks
- library links searched
- top 1-3 candidate compounds
- confidence, mismatch notes, and what would disambiguate the call
Comparison rules
When comparing against reference libraries:
- Match nucleus first
- Match solvent second
- Match field strength third
- If those do not align, downgrade confidence explicitly
- If the spectrum suggests multiple components, do not force a single-compound answer
Guardrails
- Do not overclaim exact identity from a weak or low-resolution spectrum.
- Treat this as ranked inference unless the library match is unusually strong.
- Penalize mismatches in nucleus, solvent, field strength, or obvious peak pattern.
- If the input is raw FID and the result is magnitude-mode rather than properly phased, say that explicitly.
Upstream references
1---2name: nmr-compound-inference3description: Analyze 1D 1H or 13C NMR data with nmrglue, generate spectrum plots and peak tables, compare against standard NMR libraries such as BMRB, HMDB, SDBS, and nmrshiftdb2, then produce a ranked candidate-compound report with evidence, caveats, and direct links.4category: chemistry5license: MIT6metadata:7 source: https://skillmd.com/skills/synthetic-sciences/nmr-compound-inference8 skill-author: Robin Wu (Yaobin29)9version: 1.0.010author: Robin Wu11tags: [NMR, Spectroscopy, Cheminformatics, Compound Identification, nmrglue, Bruker, Metabolomics]12dependencies: ["nmrglue", "numpy", "matplotlib"]13---1415# NMR Compound Inference1617Use this skill to analyze a local 1D NMR dataset, generate a figure and peak list, search standard reference libraries, and infer the most likely compound or a short ranked candidate list.1819## Best fit2021- `1H` and `13C` 1D spectra22- Bruker processed `pdata`, Bruker raw `fid`, NMRPipe 1D files, or two-column `ppm,intensity` text exports23- Samples with one dominant component2425## Required inputs2627- local spectrum path28- preferably nucleus, solvent, and field strength29- any sample context that narrows candidate chemistry3031## Dependencies3233Install the dependencies into the active Python environment:3435```bash36python3 -m pip install nmrglue numpy matplotlib37```3839This skill depends on the upstream `nmrglue` package and does not bundle the `nmrglue` source code.4041## Workflow42431. Run the helper script to generate the evidence package:4445```bash46python3 scripts/nmr_candidate_report.py \47 --input "<path-to-spectrum>" \48 --output-dir "./outputs/$(date +%F)" \49 --nucleus "1H"50```5152Optional metadata for better matching:5354```bash55python3 scripts/nmr_candidate_report.py \56 --input "<path-to-spectrum>" \57 --output-dir "./outputs/$(date +%F)" \58 --nucleus "1H" \59 --solvent "D2O" \60 --field-mhz 60061```62632. Review the generated outputs:64 - `spectrum.png` — Plot of the processed spectrum65 - `peak_table.csv` — Extracted peak positions and intensities66 - `analysis_summary.json` — Structured summary for downstream processing67 - `analysis_report.md` — Human-readable report with search recommendations68693. Read `references/standard-libraries.md` and search the relevant library sites:70 - BMRB Metabolomics: https://bmrb.io/metabolomics/71 - HMDB 1D NMR: https://hmdb.ca/spectra/nmr_one_d72 - SDBS: https://sdbs.db.aist.go.jp/SearchResult.aspx73 - nmrshiftdb2: https://nmrshiftdb.nmr.uni-koeln.de/nmrshiftdbhtml/t1.html74754. Return a report with:76 - problem type77 - what data was analyzed78 - plot path79 - major peaks80 - library links searched81 - top 1-3 candidate compounds82 - confidence, mismatch notes, and what would disambiguate the call8384## Comparison rules8586When comparing against reference libraries:87881. Match nucleus first892. Match solvent second903. Match field strength third914. If those do not align, downgrade confidence explicitly925. If the spectrum suggests multiple components, do not force a single-compound answer9394## Guardrails9596- Do not overclaim exact identity from a weak or low-resolution spectrum.97- Treat this as ranked inference unless the library match is unusually strong.98- Penalize mismatches in nucleus, solvent, field strength, or obvious peak pattern.99- If the input is raw FID and the result is magnitude-mode rather than properly phased, say that explicitly.100101## Upstream references102103- nmrglue GitHub: https://github.com/jjhelmus/nmrglue104- nmrglue documentation: https://nmrglue.readthedocs.io/