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/The_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 fabs, min, sin, isfinite, sum
71 from numpy.ma import fix_invalid, masked_where
72
73
74 -def r2eff_TSMFK01(r20a=None, dw=None, dw_orig=None, k_AB=None, tcp=None, back_calc=None):
75 """Calculate the R2eff values for the TSMFK01 model.
76
77 See the module docstring for details.
78
79
80 @keyword r20a: The R20 parameter value of state A (R2 with no exchange).
81 @type r20a: numpy float array of rank [NE][NS][NM][NO][ND]
82 @keyword dw: The chemical exchange difference between states A and B in rad/s.
83 @type dw: numpy float array of rank [NE][NS][NM][NO][ND]
84 @keyword dw_orig: 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.
85 @type dw_orig: numpy float array of rank-1
86 @keyword k_AB: The k_AB parameter value (the forward exchange rate in rad/s).
87 @type k_AB: float
88 @keyword tcp: The tau_CPMG times (1 / 4.nu1).
89 @type tcp: numpy float array of rank [NE][NS][NM][NO][ND]
90 @keyword back_calc: The array for holding the back calculated R2eff values. Each element corresponds to one of the CPMG nu1 frequencies.
91 @type back_calc: numpy float array of rank [NE][NS][NM][NO][ND]
92 """
93
94
95 t_dw_zero = False
96
97
98
99 if k_AB == 0.0:
100 back_calc[:] = r20a
101 return
102
103
104 if min(fabs(dw_orig)) == 0.0:
105 t_dw_zero = True
106 mask_dw_zero = masked_where(dw == 0.0, dw)
107
108
109 denom = dw * tcp
110
111
112 numer = sin(denom)
113
114
115
116 if min(fabs(numer)) == 0.0:
117
118 back_calc[:] = r20a + k_AB
119 else:
120
121 back_calc[:] = r20a + k_AB - k_AB * numer / denom
122
123
124
125 if t_dw_zero:
126 back_calc[mask_dw_zero.mask] = r20a[mask_dw_zero.mask]
127
128
129
130 if not isfinite(sum(back_calc)):
131
132 fix_invalid(back_calc, copy=False, fill_value=1e100)
133