nmrglue
하는 일
이 도구는 원시 1차원 핵자기공명(NMR) 데이터를 처리해 더 선명한 스펙트럼을 만들고, 피크를 식별하며, 적분 면적을 계산합니다. 주파수 축(ppm)을 확인하고 조정하며, 필터를 적용하고 베이스라인을 보정하도록 돕습니다.
사용하는 경우
- ✓원시 1차원 NMR 데이터가 있고 이를 쓸 수 있는 스펙트럼으로 바꾸고 싶을 때.
- ✓NMR 스펙트럼의 위상과 베이스라인을 조정할 때.
- ✓NMR 스펙트럼에서 정확한 피크 면적 값을 얻고 싶을 때.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/nmrglue/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 1차원 NMR 데이터 파일(fid.npz)을 이 설정(processing.json)으로 처리하고, 결과를 ‘my_spectrum’으로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 원시 NMR 데이터와 매개변수가 담긴 설정 파일을 읽습니다. 푸리에 변환 같은 수학적 변환과 스펙트럼 품질을 높이는 조정을 적용하고, 피크와 면적 같은 정보를 추출합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
- 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)
…
자주 묻는 질문
이 도구는 화합물을 식별하나요?
아닙니다. 이 도구는 화합물을 식별하지 않습니다. 원시 데이터를 처리해 분석하고 해석할 수 있도록 할 뿐입니다.
2차원이나 3차원 NMR 데이터에도 쓸 수 있나요?
아닙니다. 이 도구는 1차원 NMR 데이터만을 위한 것입니다.
‘ppm’과 ‘FID’는 무엇인가요?
PPM(백만분율)은 NMR 스펙트럼에서 신호의 위치를 나타내는 단위입니다. FID(자유 유도 감쇠)는 처리 전 NMR 장비가 측정하는 원시 신호입니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 51k
- 순위
- #3507
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.