API: GUI2D

NMRAnalysis.GUI2D.FIT_TIME_BUDGETConstant

Maximum wall-clock time (seconds) allowed for a single cluster fit before it is aborted.

Interactive fitting re-runs on every peak move, so a hard cap keeps the GUI responsive even if convergence is slow. The residual function checks elapsed time on every iteration. The budget is applied per-cluster so that a spectrum with many peaks does not exhaust the budget on early clusters and cancel later ones.

source
NMRAnalysis.GUI2D.METHYL_KConstant
METHYL_K

Prefactor K (s⁻²) in eq 1 relating η to S²τc for an ideal methyl group, so that S²τc = η / K. Assumes the H–H vector is perpendicular to the methyl 3-fold axis (θ = 90°, [P₂(cosθ)]² = 1/4) and r_HH = 1.813 Å:

K = (9/40)·(μ₀/4π)²·γ_H⁴·ℏ² / r_HH⁶  ≈ 3.61×10⁹ s⁻²

giving S²τc (ns) ≈ 0.277·η for η in s⁻¹.

source
NMRAnalysis.GUI2D.CCRExperimentType
CCRExperiment

Cross-correlated relaxation experiment with decay and buildup spectra.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks
  • isbuildup: Vector of booleans indicating buildup (true) or decay (false) spectra
  • T: Relaxation time constant in seconds
  • issymmetric: Whether symmetric reconversion is used (pairs of experiments)
source
NMRAnalysis.GUI2D.CCRExperimentMethod
CCRExperiment(decay_expts, buildup_expts, T)

Create CCR experiment from lists of decay and buildup experiment files.

Arguments

  • decay_expts: Vector of file paths to decay experiments
  • buildup_expts: Vector of file paths to buildup experiments
  • T: Relaxation time constant in seconds

For symmetric reconversion, provide pairs of experiments (2 decay + 2 buildup). For standard CCR, provide single experiments (1 decay + 1 buildup).

source
NMRAnalysis.GUI2D.CESTExperimentType
CESTExperiment <: FixedPeakExperiment

Chemical Exchange Saturation Transfer experiment with reference and saturation spectra.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks
  • frequencies: Vector of saturation frequencies in ppm
source
NMRAnalysis.GUI2D.CESTExperimentMethod
CESTExperiment(inputfilename)

Create CEST experiment from a pseudo-3D input file where the first plane is the reference and the remaining planes are saturation spectra at different frequencies.

source
NMRAnalysis.GUI2D.CPMGExperimentType
CPMGExperiment <: FixedPeakExperiment

CPMG experiment with reference plane and relaxation planes.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks
  • vCPMG: Vector of CPMG frequencies in Hz (zero for reference)
  • Trelax: Relaxation time in seconds
source
NMRAnalysis.GUI2D.CPMGExperimentMethod
CPMGExperiment(inputfilename, Trelax, vCPMG)

Create CPMG experiment from a pseudo-3D input file. Zero frequency in vCPMG indicates the reference plane.

source
NMRAnalysis.GUI2D.ExperimentType

Abstract type representing an NMR experiment.

Subtypes must inherit from either FixedPeakExperiment or MovingPeakExperiment. See guide for implementing new experiment types.

source
NMRAnalysis.GUI2D.FitCancelledType

Thrown from within a fit's residual function to abort an in-flight fit (because the inputs changed, the time budget was exceeded, or the user cancelled). Caught silently in fit!(expt).

source
NMRAnalysis.GUI2D.HetNOEExperimentType
HetNOEExperiment

Heteronuclear NOE experiment with reference and saturated spectra.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks
  • saturation: Vector of booleans indicating saturated spectra
source
NMRAnalysis.GUI2D.HetNOEExperimentMethod
HetNOEExperiment(planefilenames, saturation)

Create hetNOE experiment from a list of input planes and a list of true/false values indicating where saturation has been applied.

source
NMRAnalysis.GUI2D.IntensityExperimentType
IntensityExperiment <: FixedPeakExperiment

Generic experiment for measurement of intensity modulations across 2D spectra.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks
source
NMRAnalysis.GUI2D.MethylCCRModelType
MethylCCRModel <: ParametricModel

Ratio model (eq 7) for methyl CCR buildup/decay analysis. Named to disambiguate from the single-delay CCRExperiment/ccr2d analysis. Carries the fixed prefactor C and the N relaxation delays times; func(T, p) evaluates eq 7 with p = [η, δ].

source
NMRAnalysis.GUI2D.MovingExperimentType
MovingExperiment <: MovingPeakExperiment

Generic experiment for measurement of peak positions that change across a series of 2D spectra. Unlike IntensityExperiment, where each peak sits at one chemical shift and only its amplitude is read out, here each peak's position (and linewidth) is an independent fit parameter in every plane. This is the common core for titrations, coupling-constant and RDC measurements: the spectrum fit recovers a per-plane position trajectory, and a postfit model turns that trajectory into a physical quantity.

Fields

  • specdata: Spectral data and metadata
  • peaks: Observable list of peaks (each holds per-plane :x, :y, :R2x, :R2y, :amp)
  • x: Per-plane independent variable (e.g. ligand concentration); defaults to plane index
  • model: Postfit model relating the position trajectory to the independent variable
  • visualisation: Strategy for the per-peak plot panel
source
NMRAnalysis.GUI2D.RDCModelType
RDCModel

Derive a scalar coupling J and residual dipolar coupling D (both in Hz) from the peak position difference between paired component spectra. isotropic/aligned are the plane indices of the two components in each condition; couplingdim is the dimension the splitting is measured in; scale is the fraction of the coupling the measured separation represents (1 for IPAP, 0.5 for HSQC/TROSY); gammasign flips the sign for a negative-γ nucleus (¹⁵N).

source
NMRAnalysis.GUI2D.ResidueLabelType
ResidueLabel

Parsed representation of a peak label.

Fields

  • resnum: residue number (negative for non-standard residue types, e.g. the default unassigned X# peaks; 0 if the label contains no digits)
  • onelettercode: residue one-letter code ('?' if none could be identified)
  • atom: atom name (uppercase, verbatim), or "" for backbone amides
source
NMRAnalysis.GUI2D.TitrationModelType
TitrationModel

Fit a single-site (1:1) binding isotherm to a titration series, deriving a global dissociation constant Kd (shared by all residues) together with per-residue, per-dimension free and bound chemical shifts (δfree, δbound).

The bound fraction in each plane is computed from the ligand concentration (expt.x) and, if available, the protein concentration (protein, one per plane). With protein concentrations the exact 1:1 quadratic is used; with ligand concentrations only, the hyperbolic f = [L]/(Kd + [L]) approximation (ligand ≈ free) is used. The two are consistent in the limit [P] → 0.

Fields

  • protein: Per-plane total protein concentration, or nothing when only ligand concentrations were supplied.
  • weights: (wx, wy) dimension weights for the combined CSP (Williamson 2013); the default (1.0, 0.14) assumes the F1 (x) axis is ¹H and the F2 (y) axis is ¹⁵N.
source
NMRAnalysis.GUI2D._readtableMethod
_readtable(file) -> (header, rows)

Read a results.csv: skip blank and #-comment lines, take the first remaining line as the (comma- or whitespace-separated) header, the rest as rows of strings.

source
NMRAnalysis.GUI2D._titration_summaryplotMethod

Titration summary: three stacked panels of the fitted saturation perturbation against residue number — ΔδX (= δbound − δfree, x dim), ΔδN (y dim, assuming ¹⁵N) and the weighted combination |Δδ|. Values are the extrapolated full-saturation CSPs from the global fit, so the experiment must have been fitted.

source
NMRAnalysis.GUI2D.add_moving_overlays!Method
add_moving_overlays!(g, state, expt::MovingPeakExperiment)

Add the moving-peak overlays to the contour panel:

  • a faint polyline tracing each peak's fitted position across all planes (the trajectory), so the walk is visible at a glance;
  • a toggleable "Context" overlay drawing every plane's contours faintly behind the current one, for orienting peaks that move a long way.
source
NMRAnalysis.GUI2D.addandtrackpeak!Function
addandtrackpeak!(expt, initialposition, label="")

Add a peak at initialposition and track it across every plane by following the local maximum: the current plane is anchored at the click, then the position is propagated outward in both directions, each plane seeded from its neighbour's tracked position. The subsequent fit then refines each plane within its radius. Good for non-crowded series (titrations); for crowded regions, add with A and adjust planes by hand instead.

source
NMRAnalysis.GUI2D.asexptpathMethod
asexptpath(x)

Coerce an experiment identifier (or a collection of them) to the path-string form the file loaders expect: an integer becomes its Bruker experiment number as a string (e.g. 1 -> "1", loaded relative to the working directory, as for the 1D functions' own exptno arguments), broadcasting elementwise over a collection of them (e.g. 1:11 -> ["1", ..., "11"]); anything else (a string, or an existing collection of strings) passes through unchanged.

source
NMRAnalysis.GUI2D.available_paramsMethod
available_params(source) -> Vector{Symbol}

Parameters that can be plotted from a live experiment (post-fit and raw parameter keys) or a saved file (value columns, excluding identity columns).

source
NMRAnalysis.GUI2D.average_displacementsMethod
average_displacements(expt) -> (dx, dy) | nothing

Mean per-plane position displacement of the already-fitted peaks, relative to the current plane (so dx/dy are zero at that plane). Used to seed a new peak's planes with the common motion pattern. Returns nothing if no peak has been fitted yet.

source
NMRAnalysis.GUI2D.ccr2dMethod
ccr2d(decay_expts, buildup_expts, T)

Start interactive GUI for analysing 2D measurements of cross-correlated relaxation data.

Fits intensities of peaks in a series of 2D spectra to a model of the form:

tanh(η * T) = I_buildup / I_decay

or

tanh(η * T) = sqrt((I_buildup1 * I_buildup2) / (I_decay1 * I_decay2))

Arguments

  • decay_expts: List of NMR data files for decay experiments
  • buildup_expts: List of NMR data files for buildup experiments
  • T: Relaxation time constant (in seconds)

Example:

ccr2d("decay_expt", "buildup_expt", 0.08)    # single decay and buildup experiment

ccr2d(["decay_expt1", "decay_expt2"],        # symmetric reconversion experiments
      ["buildup_expt1", "buildup_expt2"], 0.08)

Experiments can also be given as Bruker experiment numbers, individually or as a list/range (e.g. 1:3).

source
NMRAnalysis.GUI2D.cest2dMethod
cest2d(inputfilename; B1, Tsat)

Start interactive GUI for analysing 2D CEST (Chemical Exchange Saturation Transfer) data.

Arguments

  • inputfilename: NMR data file as a processed data directory containing pseudo-3D data where the first plane is the reference spectrum and subsequent planes are the saturation spectra
  • B1: Saturation power in Hz
  • Tsat: Saturation time in seconds

Example:

cest2d("path/to/expno/pdata/1"; B1=15, Tsat=0.3)
source
NMRAnalysis.GUI2D.cpmg2dMethod
cpmg2d(inputfilename; Trelax, vCPMG)
cpmg2d(inputfilename; Trelax, ncyc)

Start interactive GUI for analysing 2D CPMG relaxation dispersion data.

Arguments

  • inputfilename: NMR data file as a processed data directory containing pseudo-3D data where the first plane is the reference spectrum and subsequent planes are the saturation spectra
  • Trelax: Relaxation time in seconds
  • vCPMG: list of CPMG frequencies in Hz, use zero for reference spectrum
  • ncyc: list of CPMG cycle numbers, use zero for reference spectrum. When provided, vCPMG is calculated as ncyc/Trelax

Examples:

# Direct specification of CPMG frequencies
cpmg2d("path/to/expno"; Trelax=0.04, vCPMG=[0, 25, 50, 75, 100])

# Using cycle numbers (vCPMG calculated automatically)
ncyc = [0, 1, 2, 3, 4]
cpmg2d("path/to/expno"; Trelax=0.04, ncyc=ncyc)
source
NMRAnalysis.GUI2D.fit2dMethod
fit2d(inputfilenames)

Start an interactive GUI for peak analysis of a single 2D spectrum or a series of 2D spectra. Each peak is fitted to a 2D Lorentzian lineshape; no physical model is applied to the amplitudes across spectra.

Use this function to measure peak positions, linewidths, and amplitudes for downstream analysis, or when none of the built-in physical models (relaxation2d, recovery2d, modelfit2d) are appropriate.

Arguments

  • inputfilenames: A single path string or vector of path strings pointing to processed Bruker data directories (e.g. "expno/pdata/1").

Example

# Single spectrum
fit2d("109/pdata/1")

# Series of spectra (e.g. titration or temperature series)
fit2d(["11/pdata/1", "12/pdata/1", "13/pdata/1"])
source
NMRAnalysis.GUI2D.get_titration_dataMethod
get_titration_data(peak, expt) -> (obsX, obsY, fitX, fitY)

Per-dimension Δδ-vs-concentration points for the highlighted residue: observed points (obsX/obsY) and the fitted binding curve (fitX/fitY, empty until the global fit runs). The Y series (F2 dimension) is divided by the standard heteronuclear scaling factor (_yshiftscalefactor, 10 for ¹⁵N / 4 for ¹³C) so it can be overlaid on the same axis as X.

source
NMRAnalysis.GUI2D.has_atom_labelsMethod
has_atom_labels(labels)::Bool

true if any label in the iterable carries an atom name (e.g. methyls such as "I13CD1"), used to decide between scatter and bar summary plots.

source
NMRAnalysis.GUI2D.hetnoe2dMethod
hetnoe2d(reference, saturated)

Start interactive GUI for analysing 2D heteronuclear NOE data.

reference and saturated can each be a single filename or a list of filenames — Bruker experiment numbers work too, individually or as a list/range. When lists are provided, results are averaged across all pairs.

Examples

# Single reference / saturated pair
hetnoe2d("expno1/pdata/231", "expno1/pdata/232")

# Multiple pairs (results are averaged across pairs)
hetnoe2d(
    ["expno1/pdata/231", "expno2/pdata/231"],  # references
    ["expno1/pdata/232", "expno2/pdata/232"],  # saturated
)

# Bruker experiment numbers
hetnoe2d(1, 2)
source
NMRAnalysis.GUI2D.methylccr2dMethod
methylccr2d(buildupexpt, decayexpt, T; C=3/4, skipplanes=nothing)

Start an interactive GUI for methyl ¹H–¹H cross-correlated relaxation analysis.

For each peak, the ratio of buildup to decay intensities |Iₐ/I_b| is measured across a series of relaxation delays T and fitted to eq 7 with two parameters: the cross-correlated relaxation rate η (s⁻¹) and a coupling term δ (< 0). The fitted η is converted to the methyl order parameter × tumbling time S²τc (ns) via eq 1 (ideal methyl geometry), which is the parameter shown in the summary plot.

Arguments

  • buildupexpt: buildup series (Iₐ) — a single pseudo-3D path string, or a Vector{String} of per-delay 2D data directories. Bruker experiment numbers work too, individually or as a list/range.
  • decayexpt: decay series (I_b), in the same form as buildupexpt.
  • T: vector of relaxation delays in seconds, or a path string to a text file of delays (one per line; lines beginning with # are ignored). Each series must have one plane per delay.

Keyword Arguments

  • C: fixed prefactor in eq 7. 3/4 (default) for triple-quantum (TQ); 1/2 for double-quantum (DQ).
  • skipplanes: optional list of delay indices (1-based, into T) to exclude from the eq 7 fit. Skipped points appear as open grey markers.

Example

# buildup and decay each as a pseudo-3D dataset
methylccr2d("11/pdata/1", "12/pdata/1", [0.001, 0.002, 0.004, 0.006, 0.010])

# double-quantum variant
methylccr2d("11/pdata/1", "12/pdata/1", "vdlist.txt"; C=1/2)
source
NMRAnalysis.GUI2D.modelfit2dFunction
modelfit2d(inputfilenames, xvalues, equation, parameters)

Create an intensity analysis experiment with fitting to a custom equation.

Arguments

  • inputfilenames: String or vector of strings giving the input data files.
  • xvalues: Vector of Float64 giving the x values for fitting, or string giving a filename from which to read the x values.
  • equation: String giving the model equation to fit, e.g. "A*sin(J*x)"
  • parameters: Vector of parameter name-value pairs giving initial parameter values, e.g. ["A"=>40., "J"=>0.5]

Example: J-modulation

modelfit2d(["112","113","114","115"],
    [0.1, 0.2, 0.3, 0.4],
    "A*sin(J*x)",
    ["A"=>40., "J"=>0.5])
source
NMRAnalysis.GUI2D.parse_labelMethod
parse_label(label)::ResidueLabel

Best-effort parse of a peak label into residue number, one-letter code, and atom name. Handles, e.g.:

  • Amides: "G10", reversed "7A"
  • Methyls/sidechains: "I13CD1", "L26CD1"/"L26CD2", "V70CG1", "M98CE"
  • Nucleic-acid atoms: "A12C8", "G5C1'"
  • Non-standard/unassigned: "X99" → resnum -99

This function is deliberately permissive: it never throws. Unrecognised input simply yields a best guess (e.g. ResidueLabel(0, '?', "") for an empty or number-less label). Parsing is metadata only and must never block fitting, saving, or loading — users may use any labelling convention they like.

source
NMRAnalysis.GUI2D.peaktrack2dMethod
peaktrack2d(inputfilenames)

Start an interactive GUI for analysing a series of 2D spectra in which peak positions change from plane to plane (e.g. a titration, or a coupling-constant / RDC measurement). Each peak is fitted to a 2D Lorentzian lineshape independently in every plane, so its position and linewidth are free to move; no physical model is applied to the trajectory.

Use this to measure how peak positions and linewidths evolve across a series for downstream analysis, or as the basis for the position-based physical models (titration, coupling).

Arguments

  • inputfilenames: A single path string (pseudo-3D dataset) or a vector of path strings (one file per plane) pointing to processed Bruker data directories. Bruker experiment numbers work too, individually or as a list/range (e.g. 1:11), resolved relative to the working directory.

Example

peaktrack2d(["11/pdata/1", "12/pdata/1", "13/pdata/1"])
peaktrack2d(1:11)

See also titration2d for fitting binding isotherms to a titration series.

source
NMRAnalysis.GUI2D.postfit!Method

Calculate final parameters after fitting.

Computes CCR rate η from the model:

  • Single experiments: tanh(η * T) = Ibuildup / Idecay
  • Symmetric (pairs): tanh(η * T) = sqrt((Ibuildup1 * Ibuildup2) / (Idecay1 * Idecay2))
source
NMRAnalysis.GUI2D.primaryparamMethod
primaryparam(expt) -> Symbol

The experiment's primary derived (post-fit) result. It is written first among the derived columns in results.csv and is the default parameter plotted by summaryplot. Defaults to :amp (peak amplitude) for experiments that derive no post-fit parameters (e.g. plain fit2d).

source
NMRAnalysis.GUI2D.rdc2dMethod
rdc2d(; isotropic, aligned, coupling=nothing, scale=1)

Interactive measurement of one-bond couplings and residual dipolar couplings from paired 2D spectra. Supply the two doublet-component spectra (already combined, e.g. IPAP α/β, or HSQC/TROSY) for each condition:

rdc2d(isotropic = ["iso_a/pdata/1", "iso_b/pdata/1"],
      aligned   = ["aln_a/pdata/1", "aln_b/pdata/1"])

The four spectra become the planes of a peak-tracking experiment. Track each residue's peak across the planes (T) or add and adjust by hand (A); the per-residue postfit then reports

J   = sep(isotropic) / scale
J+D = sep(aligned)   / scale
D   = (J+D) − J

where sep is the position difference between the two components in the coupling dimension (converted to Hz). scale is 1 for IPAP and 0.5 for HSQC/TROSY (the separation is then half the coupling). coupling selects the dimension (:F1/:F2); it defaults to the heteronuclear dimension, and the sign is flipped automatically for ¹⁵N (so J ≈ −93 Hz). List the two components in the same order for both conditions; if J comes out with the wrong sign, swap the pair. Each component can also be given as a Bruker experiment number.

source
NMRAnalysis.GUI2D.readpeaklist!Method
readpeaklist!(expt, filepath::AbstractString)

Read a peak list and add the peaks to expt. Only the label, x and y columns are used — every other column (resnum, resname, atom, linewidths, amplitudes, derived parameters …) is ignored, since the residue number and atom are re-derived from the label.

Two layouts are accepted:

  • With a header row (e.g. the program's own results.csv): the first non-comment line contains a label column name, and x/y are located by name, so column order and extra columns don't matter.
  • Without a header (a hand-made list): values are read positionally as label x y from the first three columns, so no exact column names are needed.

Fields may be comma- or whitespace-separated. Lines beginning with # are comments. A malformed line is skipped with a warning rather than aborting the load — any labelling convention is tolerated.

source
NMRAnalysis.GUI2D.recovery2dMethod
recovery2d(inputfilenames, relaxationtimes)

Start an interactive GUI for measuring longitudinal relaxation from an inversion recovery or saturation recovery experiment. Peak amplitudes are fitted to a magnetisation recovery model:

\[I(\tau) = A\left(1 - C\exp(-R\tau)\right)\]

where $R$ is the recovery rate (s⁻¹), $A$ is the equilibrium amplitude, and $C$ is the recovery factor. For an ideal inversion recovery experiment $C = 2$; for saturation recovery $C = 1$.

Arguments

  • inputfilenames: A single path string (pseudo-3D dataset) or vector of path strings (one file per delay) pointing to processed Bruker data directories.
  • relaxationtimes: Vector of delay times in seconds, or a string giving a path to a text file containing the delays (one per line; lines beginning with # are ignored).

Example

t = [0.1, 0.2, 0.4, 0.7, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0]
recovery2d("33/pdata/1", t)

# Reading delays from a file
recovery2d("33/pdata/1", "vdlist.txt")
source
NMRAnalysis.GUI2D.relaxation2dMethod
relaxation2d(inputfilenames, relaxationtimes; skipplanes=nothing)

Start an interactive GUI for measuring R1 or R2 relaxation rates from a series of 2D spectra. Peak amplitudes are fitted to a mono-exponential decay:

\[I(\tau) = A \exp(-R\tau)\]

where $R$ is the relaxation rate (s⁻¹) and $A$ is the peak amplitude. The software does not distinguish R1 from R2 — the appropriate interpretation depends on the experiment.

Arguments

  • inputfilenames: Vector of path strings to processed Bruker data directories, one per relaxation delay.
  • relaxationtimes: Vector of delay times in seconds, or a string giving a path to a text file containing the delays (one per line; lines beginning with # are ignored).

Keyword Arguments

  • skipplanes: Optional list of plane indices (1-based) to exclude from the exponential fit. All spectra are still loaded and displayed; skipped planes appear as open grey markers in the peak plot and are not used when fitting R or A. The full list of relaxation times must still be provided, including those for skipped planes.

Example

relaxation2d(
    ["11/pdata/1", "12/pdata/1", "13/pdata/1", "14/pdata/1"],
    [0.010, 0.030, 0.060, 0.100]
)

# Reading delays from a file
relaxation2d(["11/pdata/1", "12/pdata/1", "13/pdata/1"], "vclist.txt")

# Omit the 3rd plane (e.g. corrupted or duplicate delay) from the fit
relaxation2d(
    ["11/pdata/1", "12/pdata/1", "13/pdata/1", "14/pdata/1"],
    [0.010, 0.030, 0.060, 0.100];
    skipplanes=[3]
)
source
NMRAnalysis.GUI2D.resultstableMethod
resultstable(expt) -> (header, rows)

Build the column-name header and the rows (each a vector of strings) for the results file. Derived (post-fit) parameters are appended with the experiment's primary parameter first (see primaryparam).

source
NMRAnalysis.GUI2D.sampleconcentrationsMethod

Name => total concentration for the sample components defined on spec, or an empty Dict when spec carries no sample component metadata (e.g. a plane of a pseudo-3D dataset).

source
NMRAnalysis.GUI2D.save_cluster_plots!Method
save_cluster_plots!(expt, folder)

Save one zoomed contour plot per cluster of overlapping peaks (first plane only). Axis limits are set to include only the peaks in that cluster plus padding.

Files are named cluster_LABEL.pdf (single peak) or cluster_LABEL1-LABEL2.pdf (overlapping peaks).

source
NMRAnalysis.GUI2D.setperplane!Method
setperplane!(peak, param, values)

Write a per-plane parameter from a loaded results file, setting both the fitted value and the initial value in every plane (so the loaded positions display immediately and seed any refit).

source
NMRAnalysis.GUI2D.splitfieldsMethod
splitfields(line)

Split a data line into fields, accepting either comma-separated (the format written by writeresults!) or whitespace-separated values. Surrounding whitespace on each field is stripped.

source
NMRAnalysis.GUI2D.summary_datasetFunction
summary_dataset(expt, param; name, include_unassigned) -> SummaryDataset

Collect param (default: the experiment's primaryparam) for every peak in a live experiment.

source
NMRAnalysis.GUI2D.summary_datasetMethod
summary_dataset(path, param; name, include_unassigned) -> SummaryDataset

Read param from a saved results.csv (or a folder containing one). The label, residue number and atom are re-derived from each row's label.

source
NMRAnalysis.GUI2D.summaryplotMethod
summaryplot(source; param=<default>, ylabel, title, size, include_unassigned)
summaryplot(source1, source2, ...; kwargs...)

Plot a fitted parameter against residue number.

source may be a live experiment, a saved results.csv (or its folder), or a vector of any of these (which gives vertically stacked panels). Multiple sources may also be passed as separate positional arguments instead of a vector.

param selects which parameter to plot:

  • omitted/nothing → each source's own default (its primaryparam or first derived column), so a mix of experiment types — e.g. relaxation and hetNOE — each plot their own result;
  • a single Symbol → the same parameter for every source;
  • a vector → one parameter per source (a nothing entry uses that source's default).

ylabel likewise may be a single label applied to all panels or a vector of per-panel labels; by default each panel is labelled from its parameter.

size sets the figure size in pixels, e.g. size=(800, 400).

  • Backbone/amide labels → a scatter of value vs residue number with error bars.
  • Any atom-typed labels (e.g. methyls I13CD1, L26CD2) → a bar plot ordered by (residue, atom) with peak labels as ticks, so stereospecific pairs don't overlap. Decided per panel.
  • Unassigned peaks (the default X# names) are omitted unless every peak is unassigned, or include_unassigned=true.

Uses whichever Makie backend is active and returns the Figure, so the result displays interactively under GLMakie and can be saved with save("summary.pdf", fig) under CairoMakie.

source
NMRAnalysis.GUI2D.summaryplotMethod
summaryplot(expt::MovingExperiment; weights=(1.0, 0.14), title, size, include_unassigned)

Default summary for a moving-peak experiment: combined chemical-shift perturbation Δδ against residue number, with one series per plane beyond the first (each plane's shift is measured relative to plane 1).

Δδ = √((w₁·Δδx)² + (w₂·Δδy)²), with weights weighting the two dimensions. The default (1.0, 0.14) assumes the F1 (x) axis is ¹H and the F2 (y) axis is ¹⁵N (Williamson 2013); pass weights to suit other nuclei (e.g. (1.0, 0.25) for ¹³C).

source
NMRAnalysis.GUI2D.titration2dMethod
titration2d(inputfilenames; L0=nothing, P0=nothing, weights=(1.0, 0.14))

Interactive analysis of a 2D titration series, fitting a global binding isotherm to the chemical-shift perturbations. Built on peaktrack2d: track each residue's peak across the planes (T) or add and adjust by hand (A), and the fit recovers a single Kd shared by all residues plus per-residue free/bound shifts in each dimension.

Arguments

  • inputfilenames: A single path string (pseudo-3D dataset) or a vector of path strings (one file per plane) pointing to processed Bruker data directories. Bruker experiment numbers work too, individually or as a list/range (e.g. 1:11), resolved relative to the working directory.
  • L0: Total ligand concentration in each plane (one per plane). If omitted, it is read from each plane's NMR sample metadata (see titrationconcentrations); an error is raised if that metadata isn't available either.
  • P0: Total protein concentration in each plane (one per plane), or nothing. When given (explicitly, or found in sample metadata), the exact 1:1 binding equation is used, accounting for protein concentration and dilution; otherwise the hyperbolic (ligand ≈ free) approximation is used. Kd is reported in the same concentration units as L0/P0.
  • weights: (wx, wy) weighting of the two dimensions for the combined CSP |Δδ|; the default assumes ¹H (x) / ¹⁵N (y).

Results

  • The per-residue panel shows ΔδX and ΔδY together on a single axis (referenced to the fitted δfree), with the fitted binding curves overlaid. ΔδY is divided by the standard scaling factor for its nucleus (10 for ¹⁵N, 4 for ¹³C) so it sits on the same ppm scale as ΔδX.
  • The global Kd is reported in the results panel.
  • The summary plot shows ΔδX, ΔδN and the combined |Δδ| (saturation CSP = δbound − δfree) against residue number.

Example

titration2d(files)                                    # concentrations from sample metadata
titration2d(files; L0=ligand_concs)                   # ligand concentrations only
titration2d(files; L0=ligand_concs, P0=protein_concs) # exact 1:1, accounts for dilution
titration2d(1:11)                                     # Bruker experiment numbers
source
NMRAnalysis.GUI2D.titrationconcentrationsMethod
titrationconcentrations(nmrdata) -> (L0, P0)

Derive per-plane ligand (L0) and protein (P0) concentration vectors from each plane's sample metadata (see above for the inference rule). Returns (nothing, nothing) when no plane carries any sample concentration metadata. P0 alone comes back nothing if the protein's concentration isn't defined on every plane (the hyperbolic ligand ≈ free approximation is then used instead of the exact 1:1 equation) — as with exchange1d's _prompt_concentrations!, a molecule missing from only some planes' sample metadata is warned about rather than silently treated as zero or silently dropped. The resolved per-plane concentrations are printed as a table (in the same style as exchange1d's parameter tables) so they can be checked at a glance.

source
NMRAnalysis.GUI2D.trackmaximumMethod
trackmaximum(expt, i, xc, yc) -> (x, y)

Position of the most intense point in plane i within the peak radius of (xc, yc). Used to follow a peak from plane to plane during tracking; returns (xc, yc) unchanged if the search window falls off the spectrum.

source
NMRAnalysis.GUI2D.writeresults!Method
writeresults!(expt, folder) -> String

Write all peak results to a single results.csv in folder. Each row is one peak with identity (label, resnum, resname, atom), positions (x, y), linewidths (R2x, R2y), per-plane amplitudes (amp[1], amp[2], …) and any derived parameters, each value immediately followed by its _err uncertainty column. Experiment metadata is written as #-comment lines above an ordinary (uncommented) header row, so the file opens directly in spreadsheets and via pandas.read_csv(comment="#").

source