nmrglue
Skill này làm gì
Công cụ này xử lý dữ liệu NMR một chiều thô để tạo phổ rõ hơn, nhận diện các đỉnh và tính diện tích tích phân. Nó giúp kiểm tra và điều chỉnh trục tần số (ppm), áp dụng bộ lọc và hiệu chỉnh đường nền.
Khi nào nên dùng
- ✓Khi bạn có dữ liệu NMR một chiều thô và muốn chuyển nó thành phổ có thể dùng.
- ✓Để điều chỉnh pha và đường nền của phổ NMR.
- ✓Để có giá trị diện tích đỉnh chính xác từ phổ NMR.
Liên kết skill
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nmrglue/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xử lý tệp dữ liệu NMR một chiều này (fid.npz) bằng các thiết lập sau (processing.json) và lưu kết quả thành “my_spectrum”.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ đọc dữ liệu NMR thô và tệp cấu hình chứa các tham số của bạn. Nó áp dụng các phép biến đổi toán học, như biến đổi Fourier, và các điều chỉnh để cải thiện chất lượng phổ, đồng thời trích xuất thông tin như đỉnh và diện tích.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
- 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.
- Copy assets/processing.json and replace its synthetic example
values with the measured parameters and explicit processing choices. Its sign
-imeans a resonance at offsetf = (ppm - carrier_ppm) * observation_mhzhas time dependenceexp(-2*pi*i*f*t). Select+ionly for the opposite convention; the helper conjugates it before processing. Validate with a known reference peak. - 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.5is suitable for the supplied causal synthetic example; acquisition and prior preprocessing may require another value. - Run the helper, inspect the real and imaginary spectra, and revise manual phase if
needed.
phase0_deg + phase1_deg * index / zero_fill_pointsis applied after FT; index zero is the high-ppm edge. There is no implicit pivot or automatic phase estimate. - Only fit a linear baseline when explicitly supplied ppm regions are signal-free.
Set
baselinetolinearand addbaseline_regions_ppmcontaining at least two regions. Inspect residuals and broad peaks; fitting through signals biases integrals. - 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)
…
Câu hỏi thường gặp
Công cụ này có nhận diện được hợp chất hóa học không?
Không. Công cụ không nhận diện hợp chất. Nó xử lý dữ liệu thô để bạn có thể phân tích và diễn giải.
Tôi có thể dùng công cụ với dữ liệu NMR hai hoặc ba chiều không?
Không. Công cụ này chỉ dành riêng cho dữ liệu NMR một chiều.
“ppm” và “FID” là gì?
PPM (phần triệu) là đơn vị dùng để mô tả vị trí của tín hiệu trong phổ NMR. FID (Free Induction Decay) là tín hiệu thô do máy NMR đo được trước khi xử lý.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 51k
- Vị trí xếp hạng
- #3507
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
13c-metabolic-flux
51kƯớc tính thông lượng chuyển hóa bằng dữ liệu theo dõi đồng vị carbon-13. Hữu ích để phân tích chuyển hóa tế bào và các con đường sinh hóa.
adaptyv
51kThiết kế thí nghiệm đặc trưng protein bằng Adaptyv API. Hỗ trợ ước tính chi phí, gửi trình tự và theo dõi kết quả phòng thí nghiệm.
aeon
51kThực hiện các tác vụ học máy trên dữ liệu chuỗi thời gian. Hữu ích để phân loại, dự báo, phát hiện bất thường và tìm mẫu trong dữ liệu tuần tự.
alphagenome
51kTra cứu các tác động di truyền đã được tính trước cho biến thể gen. Cung cấp điểm số và giải thích để hiểu ảnh hưởng của biến thể lên bộ gen.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.