odnp

Functions

class hanlab.odnp.hydration(workspace={}, inputs={}, constants={})

Bases: object

Class for fitting ODNP data and calculating all common constants

Note

Give either a dnpdata_collection with 'hydration_inputs' and optional 'hydration_constants' OR inputs dictionary and optional constants dictionary

Parameters
  • workspace (dnpdata_collection) -- workspace or dictionary with 'hydration_inputs'

  • inputs (dict) -- keys and values described in example

  • constants (optional) (dict) -- keys and values described in example

Returns

'hydration_results' dictionary if dnpdata_collection, dict otherwise

Return type

results (dict)

calculate_smax(spin_C=False)

Returns maximal saturation factor according to: M.T. Türke, M. Bennati, Phys. Chem. Chem. Phys. 13 (2011) 3630. & J. Hyde, J. Chien, J. Freed, J. Chem. Phys. 48 (1968) 4211.

\[\mathrm{s_{max}} = 1 - (2 / (3 + (3 * (\mathrm{spin\_C} * 198.7))))\]
Parameters

spin_C (float) -- unpaired spin concentration in units of uM

Returns

maximal saturation factor

Return type

smax (float)

interpolate_T1(E_powers=False, T1_powers=False, T1_array=False, interpolate_method='linear', delta_T1_water=False, T1_water=False, macro_C=False, spin_C=1, T10=2.0, T100=2.5)

Returns interpolated T1 data using Eq. 39 of http://dx.doi.org/10.1016/j.pnmrs.2013.06.001 for "linear" or Eq. 22 of https://doi.org/10.1016/bs.mie.2018.09.024 for "second_order"

Parameters
  • E_powers (numpy.array) -- The microwave powers at which to evaluate

  • T1_powers (numpy.array) -- The microwave powers of the T1s to interpolate

  • T1_array (numpy.array) -- The original T1s

  • interpolate_method (str) -- "second_order" or "linear"

  • spin_C (float) -- unpaired electron spin concentration in uM

  • T10 (float) -- T1 measured with unpaired electrons

  • T100 (float) -- T1 measured without unpaired electrons

  • delta_T1_water (optional) (float) -- change in T1 of water at max microwave power

  • T1_water (optional) (float) -- T1 of pure water

  • macro_C (optional) (float) -- concentration of macromolecule in uM

Returns

Array of T1 values same shape as E_powers and E_array

Return type

interpolated_T1 (numpy.array)

calculate_ksigma_array(powers=False, ksigma_smax=95.4, p_12=False)

Function to calcualte ksig array for any given ksigma and p_12

J.M. Franck et al. / Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • powers (numpy.array) -- Array of powers

  • ksigma_smax (float) -- product of ksigma and smax

  • p_12 (float) -- power at half max for ksigma fit

Returns

calculated ksigma array

Return type

ksig_fit (numpy.array)

calculate_ksigma(ksigma_sp=False, powers=False, smax=1)

Get ksigma and E_power at half max of ksig

J.M. Franck et al. / Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • ksig (numpy.array) -- Array of ksigmas

  • powers (numpy.array) -- Array of E_powers

Returns

calculated ksigma ksigma_stdd (float): standard deviation in ksigma p_12 (float): power at half max for ksigma fit

Return type

ksigma (float)

calculate_xi(tcorr=54, omega_e=0.0614, omega_H=9.3231e-05)

Returns coupling_factor for any given tcorr

J.M. Franck et al. / Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • tcorr (float) -- translational diffusion correlation time

  • omega_e (float) -- electron gyromagnetic ratio

  • omega_H (float) -- proton gyromagnetic ratio

Returns

coupling factor

Return type

xi (float)

calculate_tcorr(coupling_factor=0.27, omega_e=0.0614, omega_H=9.3231e-05)

Returns translational correlation time (tcorr) in pico second

J.M. Franck et al. / Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • coupling_factor (float) -- coupling factor

  • omega_e (float) -- electron gyromagnetic ratio

  • omega_H (float) -- proton gyromagnetic ratio

Returns

tcorr, translational diffusion correlation time in pico second

Return type

t_corr (float)

calculate_uncorrected_Ep(uncorrected_xi=0.33, p_12_unc=0, E_powers=False, T10=2.0, T100=2.5, omega_ratio=658.5792, smax=1)

Function for E(p) for any given xi and p_12

J.M. Franck et al. / Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • uncorrected_xi (float) -- uncorrected coupling factor

  • p_12_unc (float) -- power at half max for uncorrected_xi fit

  • E_array (numpy.array) -- Array of enhancements

  • E_powers (numpy.array) -- Array of E_powers

  • T10 (float) -- T1(0), proton T1 with microwave power=0

  • T100 (float) -- T10(0), proton T1 with spin_C=0 and microwave power=0

  • omega_ratio (float) -- ratio of electron & proton gyromagnetic ratios

  • smax (float) -- maximal saturation factor

Returns

uncorrected Enhancement curve

Return type

Ep_fit (numpy.array)

calculate_uncorrected_xi(E_array=False, E_powers=False, T10=2.0, T100=2.5, omega_ratio=658.5792, smax=1)

Get coupling_factor and E_power at half saturation

J.M. Franck et al.; Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56

Parameters
  • E_array (numpy.array) -- Array of enhancements

  • E_powers (numpy.array) -- Array of powers

  • T10 (float) -- T1(0), proton T1 with microwave power=0

  • T100 (float) -- T10(0), proton T1 with spin_C=0 and microwave power=0

  • omega_ratio (float) -- ratio of electron & proton gyromagnetic ratios

  • smax (float) -- maximal saturation factor

Returns

uncorrected coupling factor p_12_unc (float): power at half max for uncorrected_xi fit

Return type

uncorrected_xi (float)

odnp_dicts(inputs={}, constants={})

Function for performing ODNP calculations

J.M. Franck et al.; Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56 http://dx.doi.org/10.1016/j.pnmrs.2013.06.001

J.M. Franck, S. Han; Methods in Enzymology, Chapter 5, Volume 615, (2019) 131-175 https://doi.org/10.1016/bs.mie.2018.09.024

Parameters
  • inputs (dict) -- keys and values described in example

  • constants (optional) (dict) -- keys and values described in example

Returns

calculated parameters

Return type

hydration_results (dict)

odnp_dnplab(workspace)

Function for calculating hydration quantities using a DNPLab workspace

J.M. Franck et al.; Progress in Nuclear Magnetic Resonance Spectroscopy 74 (2013) 33–56 http://dx.doi.org/10.1016/j.pnmrs.2013.06.001

J.M. Franck, S. Han; Methods in Enzymology, Chapter 5, Volume 615, (2019) 131-175 https://doi.org/10.1016/bs.mie.2018.09.024

Parameters

workspace (dnpdata_collection) -- workspace or dictionary with 'hydration_inputs'

Returns

'hydration_results' dictionary

Return type

results (dict)

Raises

TypeError -- If 'hydration_inputs' dictionary is missing