Package lib :: Package dispersion :: Module ns_cpmg_2site_3d
[hide private]
[frames] | no frames]

Module ns_cpmg_2site_3d

source code

The numerical fit of 2-site Bloch-McConnell equations for CPMG-type experiments, the NS CPMG 2-site 3D and NS CPMG 2-site 3D full models.

Description

The function uses an explicit matrix that contains relaxation, exchange and chemical shift terms. It does the 180deg pulses in the CPMG train. The approach of Bloch-McConnell can be found in chapter 3.1 of Palmer, A. G. Chem Rev 2004, 104, 3623-3640. This function was written, initially in MATLAB, in 2010.

Code origin

This is the model of the numerical solution for the 2-site Bloch-McConnell equations. It originates as optimization function number 1 from the fitting_main_kex.py script from Mathilde Lescanne, Paul Schanda, and Dominique Marion (see http://thread.gmane.org/gmane.science.nmr.relax.devel/4138, https://web.archive.org/web/https://gna.org/task/?7712#comment2 and https://web.archive.org/web/https://gna.org/support/download.php?file_id=18262).

Links

More information on the NS CPMG 2-site 3D model can be found in the:

More information on the NS CPMG 2-site 3D full model can be found in the:

Functions [hide private]
numpy float array of rank [NE][NS][NM][NO][ND][7][7]
rcpmg_3d_rankN(R1A=None, R1B=None, R2A=None, R2B=None, pA=None, pB=None, dw=None, k_AB=None, k_BA=None, tcp=None)
Definition of the 3D exchange matrix, for rank [NE][NS][NM][NO][ND][7][7].
source code
 
r2eff_ns_cpmg_2site_3D(r180x=None, M0=None, M0_T=None, r10a=0.0, r10b=0.0, r20a=None, r20b=None, pA=None, dw=None, dw_orig=None, kex=None, inv_tcpmg=None, tcp=None, back_calc=None, num_points=None, power=None)
The 2-site numerical solution to the Bloch-McConnell equation.
source code
Variables [hide private]
  m_r10a = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_pA = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_r10b = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_pB = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_r20a = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_r20b = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_k_AB = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_k_BA = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_wA = array([[ 0., 0., 0., 0., 0., 0., 0...
  m_wB = array([[ 0., 0., 0., 0., 0., 0., 0...
  __package__ = 'lib.dispersion'

Imports: array, dot, fabs, float64, einsum, isfinite, log, min, multiply, rollaxis, sum, matrix_power, fix_invalid, masked_where, isNaN, matrix_exponential


Function Details [hide private]

rcpmg_3d_rankN(R1A=None, R1B=None, R2A=None, R2B=None, pA=None, pB=None, dw=None, k_AB=None, k_BA=None, tcp=None)

source code 

Definition of the 3D exchange matrix, for rank [NE][NS][NM][NO][ND][7][7].

Parameters:
  • R1A (numpy float array of rank [NE][NS][NM][NO][ND]) - The longitudinal, spin-lattice relaxation rate for state A.
  • R1B (numpy float array of rank [NE][NS][NM][NO][ND]) - The longitudinal, spin-lattice relaxation rate for state B.
  • R2A (numpy float array of rank [NE][NS][NM][NO][ND]) - The transverse, spin-spin relaxation rate for state A.
  • R2B (numpy float array of rank [NE][NS][NM][NO][ND]) - The transverse, spin-spin relaxation rate for state B.
  • pA (float) - The population of state A.
  • pB (float) - The population of state B.
  • dw (numpy float array of rank [NE][NS][NM][NO][ND]) - The chemical exchange difference between states A and B in rad/s.
  • k_AB (float) - The forward exchange rate from state A to state B.
  • k_BA (float) - The reverse exchange rate from state B to state A.
  • tcp (numpy float array of rank [NE][NS][NM][NO][ND]) - The tau_CPMG times (1 / 4.nu1).
Returns: numpy float array of rank [NE][NS][NM][NO][ND][7][7]
The relaxation matrix.

r2eff_ns_cpmg_2site_3D(r180x=None, M0=None, M0_T=None, r10a=0.0, r10b=0.0, r20a=None, r20b=None, pA=None, dw=None, dw_orig=None, kex=None, inv_tcpmg=None, tcp=None, back_calc=None, num_points=None, power=None)

source code 

The 2-site numerical solution to the Bloch-McConnell equation.

This function calculates and stores the R2eff values.

Parameters:
  • r180x (numpy float64, rank-2, 7D array) - The X-axis pi-pulse propagator.
  • M0 (numpy float array of rank [NE][NS][NM][NO][ND][7][1]) - This is a vector that contains the initial magnetizations corresponding to the A and B state transverse magnetizations.
  • M0_T (numpy float array of rank [NE][NS][NM][NO][ND][1][7]) - This is a vector that contains the initial magnetizations corresponding to the A and B state transverse magnetizations, where the outer two axis has been swapped for efficient dot operations.
  • r10a (float) - The R1 value for state A.
  • r10b (float) - The R1 value for state B.
  • r20a (numpy float array of rank [NE][NS][NM][NO][ND]) - The R2 value for state A in the absence of exchange.
  • r20b (numpy float array of rank [NE][NS][NM][NO][ND]) - The R2 value for state B in the absence of exchange.
  • pA (float) - The population of state A.
  • dw (numpy float array of rank [NE][NS][NM][NO][ND]) - The chemical exchange difference between states A and B in rad/s.
  • dw_orig (numpy float array of rank-1) - The chemical exchange difference between states A and B in ppm. This is only for faster checking of zero value, which result in no exchange.
  • kex (float) - The kex parameter value (the exchange rate in rad/s).
  • inv_tcpmg (numpy float array of rank [NE][NS][NM][NO][ND]) - The inverse of the total duration of the CPMG element (in inverse seconds).
  • tcp (numpy float array of rank [NE][NS][NM][NO][ND]) - The tau_CPMG times (1 / 4.nu1).
  • back_calc (numpy float array of rank [NE][NS][NM][NO][ND]) - The array for holding the back calculated R2eff values. Each element corresponds to one of the CPMG nu1 frequencies.
  • num_points (numpy int array of rank [NE][NS][NM][NO]) - The number of points on the dispersion curve, equal to the length of the tcp and back_calc arguments.
  • power (numpy int array of rank [NE][NS][NM][NO][ND]) - The matrix exponential power array.

Variables Details [hide private]

m_r10a

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 1.,  0.,  0., -1.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_pA

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 2.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_r10b

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 1.,  0.,  0.,  0.,  0.,  0., -1.]])

m_pB

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 2.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_r20a

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0., -1.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0., -1.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_r20b

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0., -1.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0., -1.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_k_AB

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0., -1.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0., -1.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0., -1.,  0.,  0.,  0.],
       [ 0.,  1.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  1.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  1.,  0.,  0.,  0.]])

m_k_BA

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  1.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  1.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  1.],
       [ 0.,  0.,  0.,  0., -1.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0., -1.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0., -1.]])

m_wA

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0., -1.,  0.,  0.,  0.,  0.],
       [ 0.,  1.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])

m_wB

Value:
array([[ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0., -1.,  0.],
       [ 0.,  0.,  0.,  0.,  1.,  0.,  0.],
       [ 0.,  0.,  0.,  0.,  0.,  0.,  0.]])