Skip to main content

pyTRACTnmr

pyTRACTnmr is a graphical user interface (GUI) application designed for the processing and analysis of TRACT (TROSY for Rotational Correlation Times) experiments in NMR spectroscopy. It provides a streamlined workflow to go from raw Bruker data to calculated rotational correlation times ($\tau_c$) with robust error estimation. All calculations are based on TRACT revisited: an algebraic solution for determining overall rotational correlation times from cross-correlated relaxation rates DOI:10.1007/s10858-021-00379-5.

Note: Currently this only supports data collected with Bruker spectrometers using pulseprogram tractf3gpphwg.

Features

  • Bruker Data Import: Directly load Bruker experiment directories.
  • Interactive Processing:
    • Phase correction.
    • Apodization (Sine Bell, Exponential) and Zero Filling.
    • Baseline correction with manual node picking.
  • Relaxation Analysis:
    • Automatic splitting of Pseudo-2D experiments into $\alpha$ (Anti-TROSY) and $\beta$ (TROSY) states.
    • Exponential decay fitting to determine relaxation rates ($R_\alpha$, $R_\beta$).
    • Calculation of $\tau_c$ with error estimation using bootstrapping.
  • Sliding Window Analysis: Perform $\tau_c$ calculation across the spectral width to identify domain dynamics.
  • Visualization: Interactive Matplotlib plots for spectra, decay fits, and sliding window results embedded in a Qt interface.
  • Export: Save results to CSV and generate Python scripts for publication-quality plotting.

Installation

Prerequisites

  • Python 3.11 or higher recommended.
  • uv (optional, but recommended for building).

Installation

Using uv

The fastest way to try pyTRACTnmr without installation is:

uvx pyTRACTnmr

To install:

uv tool install pyTRACTnmr

Using pip

pip install pyTRACTnmr

From Source

  1. Clone the repository:

    git clone https://github.com/debadutta-patra/pyTRACTnmr.git
    cd pyTRACTnmr
    
  2. Install the package:

    Using uv (fastest):

    uv pip install .
    

    Using standard pip:

    pip install .
    

Usage

Launching the App

After installation, you can start the application from the terminal:

pytractnmr

Or run it as a python module:

python -m pyTRACTnmr.main

Analysis Workflow

  1. Load Data: Click "Load Bruker Directory" and select your experiment folder.
  2. Process:
    • Use the Processing tab to adjust phase correction sliders.
    • Drag the green selection box on the top spectrum plot to define the integration region (Start/End ppm).
    • Select nodes for polynomial baseline correction using the Pick Nodes button.
  3. Fit:
    • Switch to the Fitting tab.
    • Input experimental parameters (Field Strength, CSA, etc.).
    • Set the number of Bootstraps (e.g., 10000).
    • Click "Calculate Tau_c".
    • (Optional) Check the sliding window analysis to calculate $\tau_c$ across the spectral width.
  4. Export:
    • Right-click the results table to Export Table to CSV.
    • Click the export options in Fitting tab to generate a CSV file and python script for publication-quality plotting.
    • A PDF report with all generated plots and processing parameters can be exported.

Dependencies

  • PySide6
  • numpy
  • scipy
  • matplotlib
  • nmrglue

License

This project is licensed under the GNU General Public License v3.0 License - see the LICENSE file for details.

Metadata

Release files for pyTRACTnmr 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyTRACTnmr 1.2.0
File Size Uploaded
pytractnmr-1.2.0.tar.gz 344.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyTRACTnmr 1.2.0
File Interpreter ABI Platform
pytractnmr-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 644.1 kB

Release files / pytractnmr-1.2.0.tar.gz

Download URL pytractnmr-1.2.0.tar.gz
Size 344.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a93305d1e7a9adc8f540d1005034722b491ca0f1c02ee0524ed5831352edde1e
BLAKE2b-256 checksum
How to use checksums
47fa916324a1dfcd022f42b5e3694c55b01c6476e495fede5f700946f2a9ebfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pytractnmr-1.2.0-py3-none-any.whl

Download URL pytractnmr-1.2.0-py3-none-any.whl
Size 299.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2293dc0827e16aebe90f680bfa57504e3380096d5203764b7ab935aaf36f5f4
BLAKE2b-256 checksum
How to use checksums
c211bb248b39aef2c27f5ede13f0c9325a2ed98f0b1f5afd99d19c48e6cc5a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page