Skip to content

Repository files navigation

LunaNMR v1.0

⚠️ Experimental and under active development. Expect instability, breaking API changes, and incomplete features. No support or warranty. Use at your own risk.

Advanced NMR Peak Analysis and Integration Suite

Python License: MIT Platform

PySide6/Qt6 suite for NMR peak detection, Voigt profile fitting, and integration — extended with binding-affinity (Kd / titration) fitting and protein dynamics (T₁/T₂, methyl T₂, spectral density, CPMG). Focus on automation: from automatic peak detection and overlap-aware multi-peak fitting through end-to-end batch processing of multi-spectrum datasets.

🌐 Landing page →


Screenshots

LunaNMR interface
luna_interface
Series integration
serie_integration
Individual-peak fitting vs volume integration
individualpeak
Multi-peak fitting vs volume integration
multipeaks

Features

  • Voigt fitting: Gaussian + Lorentzian lineshapes, ArPLS baseline correction, multi-peak deconvolution with simultaneous fitting of overlapping peaks.
  • 2D simultaneous multi-peak fitting (PS2D): closely-spaced peaks auto-routed to 2D Levenberg-Marquardt deconvolution.
  • Peak detection: network-based clustering with prominence analysis, no manual seeding required.
  • Quality assessment: R², uncertainties (bootstrap / covariance), color-coded markers.
  • Series workflows: relaxation (T₁, T₂, hetNOE), titration, and multi-spectrum (temperature/pH) processing with automated peak tracking.
  • Kd / titration: CSP (quadratic 1:1 isotherm) and intensity-decay binding fits.
  • Dynamics (DynamiXs): T₁/T₂, methyl T₂ (bi-exponential), spectral density, model-free, CPMG.
  • Parallel processing: two-pass cluster-based, ~2.7× speedup.
  • ML/statistics: dual-path fit-parameter prediction with statistical fallback (optional CNN classifier).
  • Headless CLI: python -m lunaNMR with series, dynamixs, kd, export, project, batch subcommands — see docs/CLI.md.

File formats: Bruker TopSpin (.2ii, .2rr), Varian/Agilent (.fid, .ft), NMRPipe (.ft, .pipe), SPARKY (.ucsf). Export: CSV, JSON, PNG, PDF, SVG, EPS.


Quick Start

git clone https://github.com/mas-gu/lunaNMR.git
cd lunaNMR/lunaNMR_v1o0

pip install -r requirements.txt                          # dependencies
python3 lunaNMR/validation/verify_installation.py        # verify
python3 launch_lunaNMR.py                                 # GUI launcher (LunaNMR / DynamiXs selector)
python -m lunaNMR --help                                  # headless CLI

Requires numba (2D multi-peak fitting) and PySide6 (GUI). torch/torchvision optional (CNN classifier).


Package Structure

lunaNMR_v1o0/
├── launch_lunaNMR.py          # GUI launcher (tkinter selector → Qt app)
├── lunaNMR/
│   ├── cli.py / __main__.py   # headless CLI (python -m lunaNMR)
│   ├── core/                  # peak picker, Voigt fitter, integrator, PS2D, parallel processor
│   ├── gui/                   # PySide6/Qt6 interface
│   ├── processors/            # single/multi-spectrum workflows
│   ├── batch_processing/      # CLI batch automation
│   ├── ml/                    # ML/statistics parameter prediction
│   ├── integrators/           # specialized integrators
│   ├── utils/                 # config, project bundles, output routing
│   └── validation/            # installation verification
├── modules/dynamiXs_v2o0/     # DynamiXs (dynamics) + Kd / titration
└── docs/                      # CLI.md, ARCHITECTURE.md, ALGORITHMS.md, guide

Scientific Background

  • Voigt function: convolution of Gaussian (instrumental) and Lorentzian (natural linewidth) components; multi-peak deconvolution with constraints.
  • Peak detection: network-based clustering with prominence analysis.
  • Optimization: Levenberg-Marquardt with parameter normalization.
  • Uncertainty: bootstrap and covariance-based error estimation.

Contributing

python3 -m venv dev_env && source dev_env/bin/activate   # or dev_env\Scripts\activate on Windows
pip install -r requirements.txt
python -m pytest tests/

Fork → feature branch → add tests → PR. PEP 8, NumPy-style docstrings.


Citation

@software{lunaNMR2025,
  title = {LunaNMR: Advanced NMR Peak Analysis and Integration Suite},
  author = {LunaNMR Contributors},
  year = {2025},
  version = {1.0},
  url = {https://github.com/mas-gu/lunaNMR},
  license = {MIT}
}

License

MIT — see LICENSE.

About

NMR software for advanced automated integration of 2D NMR data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages