Skip to content

nmrglue Skill (K-Dense)

K-Dense Inc. / K-Dense Inc.

A K-Dense Skill with instructions and a Python helper for calibrated 1D NMR FID processing, producing phased spectra, positive peak candidates, signed integrals, and reproducible processing reports.

Catalog updated ·

Overview

The nmrglue Skill belongs to the K-Dense scientific-agent-skills collection. It combines processing instructions with a helper built around the upstream nmrglue package; it is neither that package nor an autonomous running agent. Its role is to turn a uniformly sampled, complex one-dimensional NMR free-induction decay into a calibrated spectrum while keeping acquisition assumptions and processing choices explicit.

The helper accepts a NumPy .npz containing exactly one complex fid array, or a canonical complex 1D time-domain NMRPipe file. Users supply acquisition parameters and processing settings separately, including spectral width, observation frequency, carrier position, complex frequency convention, and manual phase angles. The workflow covers exponential apodization, zero filling, Fourier transformation, manual phasing, optional linear baseline correction, peak-candidate detection, and integration of specified ppm regions. Outputs are spectrum.csv, with a descending ppm axis and spectral components, and report.json, with settings, input hashes, package versions, peak candidates, and signed areas.

The source describes synthetic recovery tests and NMRPipe fixture checks, not general validation of experimental vendor imports. Bruker, Varian, and JEOL acquisition decoding needs separate inspection; converted files do not establish that decoding was correct. Multidimensional processing, nonuniform sampling, automated assignment, and compound identification are outside the helper’s stated scope. Areas remain in arbitrary signal-times-ppm units: the helper neither calculates concentrations nor corrects unequal relaxation. Users must also inspect phase, baseline, overlap, and reference alignment before interpreting results.

Key Features

  • Processes calibrated complex 1D FIDs from a single-array NumPy `.npz` input or a canonical time-domain NMRPipe file.
  • Applies exponential line broadening, explicit zero filling, Fourier transformation, and user-specified zero- and first-order phase angles without automatic phase estimation.
  • Supports optional linear real-baseline correction using explicitly selected signal-free ppm regions.
  • Reports positive peak candidates and signed region integrals using endpoint interpolation and trapezoidal integration; out-of-axis regions are rejected.
  • Exports `spectrum.csv` and a provenance-oriented `report.json` containing input/settings SHA-256 hashes, package versions, processing settings, and results.
  • Checks NMRPipe header calibration against supplied settings and rejects processed frequency-domain files or conflicting metadata rather than silently recalibrating.

Use Cases

  • Suggested evaluation: process a reference-characterized 1D FID and check ppm positions, complex-sign convention, and manual phase before applying the workflow to research spectra.
  • Suggested evaluation: compare processing choices on the same preserved FID, retaining separate output directories to inspect changes in baseline, peak candidates, and signed integrals.
  • Suggested evaluation: assess canonical NMRPipe time-domain ingestion with acquisition metadata available, without treating successful file reading as proof of vendor conversion correctness.
  • Prepare reproducible spectral integration records for defined ppm regions, preserving overlap and negative areas as interpretation warnings rather than converting them directly into concentrations.

How to Use

  1. Read the named Skill and its linked acquisition-validation reference. Confirm that the input is a uniformly sampled complex 1D FID within the helper’s supported scope.
  2. Preserve the raw input. Establish spectral width, positive observation frequency, carrier, nucleus, complex-sign convention, and prior digital-filter correction from acquisition records or a known reference—not instrument defaults.
  3. Follow the Skill’s assets/processing.json template, replacing synthetic values with measured parameters. Choose line broadening, zero-filled size, first-point scaling, manual phase angles, and integration regions explicitly.
  4. Use the documented helper invocation from the collection root with the dependencies listed in the Skill. Select a new output directory; for NMRPipe input, verify header agreement and canonical time-domain requirements.
  5. Inspect real and imaginary spectra, reference alignment, baseline regions, and peak artifacts. Consult the processing-function documentation when reviewing operations, noting the Skill’s warning about hosted documentation and package differences.
  6. Retain spectrum.csv and report.json. Report signed areas and overlap, and establish additional acquisition and reference conditions before any quantitative NMR interpretation.

Related resources

Matchms

Open Source

Matchms is a Python toolkit for importing, cleaning and comparing tandem mass spectra, with configurable processing pipelines, multiple similarity measures and sparse score storage.

Open sourcePython

Spectroscopy

MS2DeepScore predicts molecular structural similarity from pairs of tandem mass spectra using a Siamese neural network, with tools for spectral embeddings, inference and custom model training.

Open sourcePython

Spectroscopy

Spec2Vec is a Python package for MS/MS spectral similarity scoring, using Word2Vec embeddings learned from mass fragments and neutral losses to compare query and reference spectra.

Open sourcePython

Spectroscopy

Related guides

Skills

AI Skills for Chemistry: What They Are and How They Work

Understand chemistry AI Skills as reusable procedure modules: what SKILL.md contains, how hosts load instructions, how Skills differ from MCP and agents, and how to select, combine, and evaluate them without confusing guidance with scientific validation.