Langsung ke konten
Skillpedia
Analisis & spreadsheet51k · #3507

nmrglue

Fungsinya

Alat ini memproses data nuclear magnetic resonance (NMR) 1D yang masih mentah agar menghasilkan spektrum yang lebih jelas, mengidentifikasi puncak (peak), dan menghitung luas integrasi. Alat ini membantu memverifikasi dan menyesuaikan sumbu frekuensi (ppm), menerapkan filter, serta mengoreksi baseline.

Kapan dipakai

  • ✓Saat Anda memiliki data NMR 1D mentah dan ingin mengubahnya menjadi spektrum yang bisa digunakan.
  • ✓Untuk menyesuaikan fase dan baseline dari spektrum NMR.
  • ✓Untuk mendapatkan nilai luas puncak yang akurat dari spektrum NMR.

Link skill

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nmrglue/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nmrglue/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Tolong proses file data NMR 1D ini (fid.npz) menggunakan pengaturan ini (processing.json) dan simpan hasilnya dengan nama 'my_spectrum'.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini membaca data NMR mentah Anda beserta file konfigurasi yang berisi parameter Anda. Alat ini menerapkan transformasi matematika, seperti Fourier transform, dan penyesuaian untuk meningkatkan kualitas spektrum serta mengekstrak informasi seperti puncak dan luas area.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

nmrglue: calibrated 1D FID processing

When to use

Use for a uniformly sampled complex 1D FID whose acquisition parameters and complex frequency convention are available. The helper produces a descending ppm spectrum, positive peak candidates, signed region integrals, and a reproducible processing report. It does not identify compounds or assign resonances.

The executable accepts a NumPy .npz containing exactly one complex fid array or a canonical 1D complex time-domain NMRPipe file. NMRPipe reading is tested with a synthetic write/read round trip, known-spectrum recovery, and a small upstream NMRPipe-generated binary fixture. Experimental Bruker, Varian, and JEOL imports are not verified by this suite. For those formats, first inspect the relevant nmrglue reader and acquisition metadata. Opening a converted file does not validate the original acquisition decoding. Read references/acquisition-and-validation.md for conversion boundaries, axis calibration, and quantitative limits.

Workflow

  1. Preserve the raw FID. Establish spectral width in Hz, positive observation frequency in MHz, carrier in ppm, observed nucleus, and the sign convention from the acquisition or a known reference. Determine whether digital-filter/group-delay removal has already occurred. Do not infer these from array length or typical instrument defaults.
  2. Copy assets/processing.json and replace its synthetic example values with the measured parameters and explicit processing choices. Its sign -i means a resonance at offset f = (ppm - carrier_ppm) * observation_mhz has time dependence exp(-2*pi*i*f*t). Select +i only for the opposite convention; the helper conjugates it before processing. Validate with a known reference peak.
  3. Choose nonnegative exponential line broadening (Hz), an even zero-filled size at least as large as the acquired FID, first-point scaling, and phase angles. Zero filling improves interpolation, not acquired spectral resolution. First-point scaling 0.5 is suitable for the supplied causal synthetic example; acquisition and prior preprocessing may require another value.
  4. Run the helper, inspect the real and imaginary spectra, and revise manual phase if needed. phase0_deg + phase1_deg * index / zero_fill_points is applied after FT; index zero is the high-ppm edge. There is no implicit pivot or automatic phase estimate.
  5. Only fit a linear baseline when explicitly supplied ppm regions are signal-free. Set baseline to linear and add baseline_regions_ppm containing at least two regions. Inspect residuals and broad peaks; fitting through signals biases integrals.
  6. Compare peak positions with references, inspect peak candidates for artifacts, and integrate specified regions. Report overlapped peaks as overlapped. Preserve negative areas as diagnostic evidence of phase/baseline problems instead of taking absolute values.

Execute

Tested with Python 3.12, nmrglue 0.12, NumPy 2.5.3, and SciPy 1.18.1:

uv run --no-project --python 3.12 --with nmrglue==0.12 --with numpy==2.5.3 --with scipy==1.18.1 \
  python skills/nmrglue/scripts/process_1d.py fid.npz processing.json nmr-result

Paths assume the collection root. Adjust them when installed elsewhere. The output directory must be new, so repeated processing keeps previous results reviewable.

For an existing 1D NMRPipe FID, add --input-format nmrpipe and supply its path in place of fid.npz. The helper requires the canonical FDF2 direct dimension, complex quadrature, a time-domain flag, and agreement between header and JSON spectral width, observation frequency, and carrier. JSON settings remain explicit; a mismatch fails instead of silently recalibrating. FDF2TDSIZE must equal the stored complex-point count, and FDF2CENTER / FDF2ORIG must describe a canonical centered axis. Previously zero-filled, truncated, or recentered files need a separate acquisition-aware workflow. The nucleus/complex sign and previous digital-filter corrections still need acquisition evidence. A time-domain flag alone does not establish an unprocessed FID.

This executable synthetic example matches the supplied settings, generates resonances at 3 and 7 ppm in a 1:2 amplitude ratio, and does not represent an experimental sample:

import numpy as np

t = np.arange(8192) / 4000.0
fid = sum(a * np.exp(-np.pi * 2.0 * t)

…
Pertanyaan umum

Apakah alat ini bisa mengidentifikasi senyawa kimia?

Tidak, alat ini tidak mengidentifikasi senyawa. Alat ini memproses data mentah agar Anda bisa menganalisis dan menafsirkannya.

Apakah alat ini bisa digunakan untuk data NMR 2D atau 3D?

Tidak, alat ini khusus untuk data NMR 1D.

Apa itu 'ppm' dan 'FID'?

PPM (parts per million) adalah satuan yang digunakan untuk menjelaskan posisi sinyal dalam spektrum NMR. FID (Free Induction Decay) adalah sinyal mentah yang diukur oleh instrumen NMR sebelum diproses.

Detail

Deskripsi asli dari pembuat

Processes calibrated one-dimensional complex NMR free-induction decays with nmrglue into phased spectra, peak candidates, and signed integration regions. Use for raw 1D NMR processing, ppm-axis verification, apodization, Fourier transformation, manual phasing, baseline correction, or reproducible spectral integration.

repo: K-Dense-AI/scientific-agent-skills

Popularitas

Bintang GitHub
51k
Peringkat
#3507
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa