1   
  2   
  3   
  4   
  5   
  6   
  7   
  8   
  9   
 10   
 11   
 12   
 13   
 14   
 15   
 16   
 17   
 18   
 19   
 20   
 21   
 22   
 23   
 24   
 25  """The Tollinger et al (2001) 2-site very-slow exchange U{TSMFK01<http://wiki.nmr-relax.com/TSMFK01>} model. 
 26   
 27  Description 
 28  =========== 
 29   
 30  Applicable in the limit of slow exchange, range of microsecond to second time scale, when |R2A-R2B| << k_AB, kB << 1/tau_CP.  R20A is the transverse relaxation rate of site A in the absence of exchange.  2*tau_CP is is the time between successive 180 degree pulses. 
 31   
 32  This module is for the function, gradient and Hessian of the U{TSMFK01<http://wiki.nmr-relax.com/TSMFK01>} model 
 33   
 34   
 35  References 
 36  ========== 
 37   
 38  The model is named after the reference: 
 39   
 40      - Tollinger, M., Skrynnikov, N. R., Mulder, F. A. A., Forman-Kay, J. D. and Kay, L. E. (2001).  Slow Dynamics in Folded and Unfolded States of an SH3 Domain, I{J. Am. Chem. Soc.}, B{123} (46) (U{DOI: 10.1021/ja011300z<http://dx.doi.org/10.1021/ja011300z>}). 
 41   
 42   
 43  Equations 
 44  ========= 
 45   
 46  The equation used is:: 
 47   
 48                                     sin(delta_omega * tau_CP) 
 49      R2Aeff = R20A + k_AB - k_AB * -------------------------  , 
 50                                     delta_omega * tau_CP 
 51   
 52  where:: 
 53   
 54      tau_CP = 1.0/(4*nu_cpmg) , 
 55   
 56  R20A is the transverse relaxation rate of site A in the absence of exchange, 2*tau_CP is is the time between successive 180 deg. pulses, k_AB is the forward chemical exchange rate constant, delta_omega is the chemical shift difference between the two states. 
 57   
 58   
 59  Links 
 60  ===== 
 61   
 62  More information on the TSMFK01 model can be found in the: 
 63   
 64      - U{relax wiki<http://wiki.nmr-relax.com/TSMFK01>}, 
 65      - U{relax manual<http://www.nmr-relax.com/manual/TSMFK01_2_site_CPMG_model.html>}, 
 66      - U{relaxation dispersion page of the relax website<http://www.nmr-relax.com/analyses/relaxation_dispersion.html#TSMFK01>}. 
 67  """ 
 68   
 69   
 70  from numpy import array, min, sin, isfinite, sum 
 71   
 72   
 73 -def r2eff_TSMFK01(r20a=None, dw=None, k_AB=None, tcp=None, back_calc=None, num_points=None): 
  74      """Calculate the R2eff values for the TSMFK01 model. 
 75   
 76      See the module docstring for details. 
 77   
 78   
 79      @keyword r20a:          The R20 parameter value of state A (R2 with no exchange). 
 80      @type r20a:             float 
 81      @keyword dw:            The chemical exchange difference between states A and B in rad/s. 
 82      @type dw:               float 
 83      @keyword k_AB:          The k_AB parameter value (the forward exchange rate in rad/s). 
 84      @type k_AB:             float 
 85      @keyword tcp:           The tau_CPMG times (1 / 4.nu1). 
 86      @type tcp:              numpy rank-1 float array. 
 87      @keyword back_calc:     The array for holding the back calculated R2eff values.  Each element corresponds to one of the CPMG nu1 frequencies. 
 88      @type back_calc:        numpy rank-1 float array 
 89      @keyword num_points:    The number of points on the dispersion curve, equal to the length of the cpmg_frqs and back_calc arguments. 
 90      @type num_points:       int 
 91      """ 
 92   
 93       
 94      if dw == 0.0 or k_AB == 0.0: 
 95          back_calc[:] = array([r20a]*num_points) 
 96          return 
 97   
 98       
 99      denom = dw * tcp 
100   
101       
102      numer = sin(denom) 
103   
104       
105       
106      if min(numer) == 0.0: 
107          back_calc[:] = array([r20a + k_AB]*num_points) 
108          return 
109   
110       
111      R2eff = r20a + k_AB - k_AB * numer / denom 
112   
113       
114       
115      if not isfinite(sum(R2eff)): 
116          R2eff = array([1e100]*num_points) 
117   
118      back_calc[:] = R2eff 
 119