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
- 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.
- 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.
- Follow the Skill’s
assets/processing.jsontemplate, replacing synthetic values with measured parameters. Choose line broadening, zero-filled size, first-point scaling, manual phase angles, and integration regions explicitly. - 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.
- 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.
- Retain
spectrum.csvandreport.json. Report signed areas and overlap, and establish additional acquisition and reference conditions before any quantitative NMR interpretation.