1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 """The Tollinger et al (2001) 2-site very-slow exchange U{TSMFK01<http://wiki.nmr-relax.com/TSMFK01>} model.
25
26 Description
27 ===========
28
29 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.
30
31 This module is for the function, gradient and Hessian of the U{TSMFK01<http://wiki.nmr-relax.com/TSMFK01>} model
32
33
34 References
35 ==========
36
37 The model is named after the reference:
38
39 - 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>}).
40
41
42 Equations
43 =========
44
45 The equation used is::
46
47 sin(delta_omega * tau_CP)
48 R2Aeff = R20A + k_AB - k_AB * ------------------------- ,
49 delta_omega * tau_CP
50
51 where::
52
53 tau_CP = 1.0/(4*nu_cpmg) ,
54
55 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.
56
57
58 Links
59 =====
60
61 More information on the TSMFK01 model can be found in the:
62
63 - U{relax wiki<http://wiki.nmr-relax.com/TSMFK01>},
64 - U{relax manual<http://www.nmr-relax.com/manual/The_TSMFK01_2_site_CPMG_model.html>},
65 - U{relaxation dispersion page of the relax website<http://www.nmr-relax.com/analyses/relaxation_dispersion.html#TSMFK01>}.
66 """
67
68
69 from numpy import fabs, min, sin, isfinite, sum
70 from numpy.ma import fix_invalid, masked_where
71
72
73 -def r2eff_TSMFK01(r20a=None, dw=None, dw_orig=None, k_AB=None, tcp=None, back_calc=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: numpy float array of rank [NE][NS][NM][NO][ND]
81 @keyword dw: The chemical exchange difference between states A and B in rad/s.
82 @type dw: numpy float array of rank [NE][NS][NM][NO][ND]
83 @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.
84 @type dw_orig: numpy float array of rank-1
85 @keyword k_AB: The k_AB parameter value (the forward exchange rate in rad/s).
86 @type k_AB: float
87 @keyword tcp: The tau_CPMG times (1 / 4.nu1).
88 @type tcp: numpy float array of rank [NE][NS][NM][NO][ND]
89 @keyword back_calc: The array for holding the back calculated R2eff values. Each element corresponds to one of the CPMG nu1 frequencies.
90 @type back_calc: numpy float array of rank [NE][NS][NM][NO][ND]
91 """
92
93
94 t_dw_zero = False
95
96
97
98 if k_AB == 0.0:
99 back_calc[:] = r20a
100 return
101
102
103 if min(fabs(dw_orig)) == 0.0:
104 t_dw_zero = True
105 mask_dw_zero = masked_where(dw == 0.0, dw)
106
107
108 denom = dw * tcp
109
110
111 numer = sin(denom)
112
113
114
115 if min(fabs(numer)) == 0.0:
116
117 back_calc[:] = r20a + k_AB
118 else:
119
120 back_calc[:] = r20a + k_AB - k_AB * numer / denom
121
122
123
124 if t_dw_zero:
125 back_calc[mask_dw_zero.mask] = r20a[mask_dw_zero.mask]
126
127
128
129 if not isfinite(sum(back_calc)):
130
131 fix_invalid(back_calc, copy=False, fill_value=1e100)
132