Skip to main content

NMR spectroscopy calculations for protein structures

Project description

synth-nmr

NMR spectroscopy calculations for protein structures

A lightweight, standalone Python package for calculating NMR observables from protein structures. Originally extracted from the synth-pdb package to provide a focused toolkit that works with any protein structure source.

Features

  • NOE Calculations: Synthetic NOE distance restraints
  • Relaxation Rates: R1, R2, and heteronuclear NOE predictions
  • Chemical Shifts: SPARTA-lite based predictions with ring current corrections
  • J-Couplings: Karplus equation for scalar couplings
  • NEF I/O: Read and write NMR Exchange Format files
  • Secondary Structure: Automatic classification for enhanced predictions

Installation

pip install synth-nmr

For improved performance with JIT compilation:

pip install synth-nmr[performance]

Quick Start

import biotite.structure.io as strucio
from synth_nmr import (
    calculate_synthetic_noes,
    calculate_relaxation_rates,
    predict_chemical_shifts,
    calculate_hn_ha_coupling
)

# Load a protein structure
structure = strucio.load_structure("protein.pdb")

# Calculate NOEs
noes = calculate_synthetic_noes(structure, cutoff=5.0)

# Predict relaxation rates
relaxation = calculate_relaxation_rates(
    structure,
    field_strength=600.0,  # MHz
    temperature=298.0,      # K
    correlation_time=5.0    # ns
)

# Predict chemical shifts
shifts = predict_chemical_shifts(structure)

# Calculate J-couplings
j_couplings = calculate_hn_ha_coupling(structure)

Requirements

  • Python ≥ 3.8
  • NumPy ≥ 1.20
  • Biotite ≥ 0.35.0
  • Numba ≥ 0.55.0 (optional, for performance)

Documentation

Core Functions

calculate_synthetic_noes(structure, cutoff=5.0)

Calculate synthetic NOE distance restraints.

Parameters:

  • structure: biotite AtomArray
  • cutoff: Distance cutoff in Ångströms (default: 5.0)

Returns: Dictionary of NOE restraints

calculate_relaxation_rates(structure, field_strength, temperature, correlation_time)

Predict NMR relaxation rates (R1, R2, heteronuclear NOE).

Parameters:

  • structure: biotite AtomArray
  • field_strength: Spectrometer frequency in MHz
  • temperature: Temperature in Kelvin
  • correlation_time: Molecular correlation time in nanoseconds

Returns: Dictionary of relaxation rates per residue

predict_chemical_shifts(structure)

Predict chemical shifts using SPARTA-lite with ring current corrections.

Parameters:

  • structure: biotite AtomArray

Returns: Dictionary of chemical shifts by residue and atom type

calculate_hn_ha_coupling(structure)

Calculate ³J(HN-Hα) couplings using the Karplus equation.

Parameters:

  • structure: biotite AtomArray

Returns: Dictionary of J-coupling values per residue

Use Cases

  • Structure Validation: Compare predicted vs experimental NMR data
  • MD Analysis: Calculate NMR observables from molecular dynamics trajectories
  • Protein Design: Predict NMR properties of designed structures
  • Data Integration: Generate synthetic NMR data for machine learning

Compatibility

Works with protein structures from any source:

  • PDB files
  • AlphaFold predictions
  • Molecular dynamics simulations
  • De novo structure generation (e.g., synth-pdb)

Citation

If you use synth-nmr in your research, please cite:

@software{synth_nmr,
  author = {Elkins, George},
  title = {synth-nmr: NMR spectroscopy calculations for protein structures},
  year = {2026},
  url = {https://github.com/elkins/synth-nmr}
}

License

MIT License - see LICENSE file for details

Related Projects

  • synth-pdb - Synthetic protein structure generation
  • Biotite - Computational biology toolkit

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions, please use the GitHub issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synth_nmr-0.2.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synth_nmr-0.2.0-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file synth_nmr-0.2.0.tar.gz.

File metadata

  • Download URL: synth_nmr-0.2.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for synth_nmr-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f55d8406e30fa037e0890b4de501a7b021de6af34859e4c0e4b10e3a35800cb
MD5 0f6fd9c3b94338dc3fe3d3d6e283fbf4
BLAKE2b-256 aa700c08b7b44a30b6e447a597711c690af09ae6c89803fc6f2f05bb8e697647

See more details on using hashes here.

File details

Details for the file synth_nmr-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: synth_nmr-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for synth_nmr-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc50fcbf46e7f622ea6f9c84275ef20532c3e08daf1b01bd27239e004acfe4a7
MD5 ed1a788e2f45f18782c77adeefd7da36
BLAKE2b-256 5c2f9e788237eb26ceea85e68ba166efcdb9a27007f512371965faca806d3199

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page