1 from Numeric import copy
2
5 "An additional layer of equations to simplify the relaxation equations, gradients, and hessians."
6
7
8
10 """An additional layer of equations to simplify the relaxation equations, gradients, and hessians.
11
12 The R1 and R2 equations are left alone, while the NOE is decomposed into the cross relaxation rate equation and the R1 equation.
13
14
15 The relaxation equations
16 ~~~~~~~~~~~~~~~~~~~~~~~~
17
18 Data structure: self.data.ri
19 Dimension: 1D, (relaxation data)
20 Type: Numeric array, Float64
21 Dependencies: self.data.ri_prime
22 Required by: self.data.chi2, self.data.dchi2, self.data.d2chi2
23
24
25 Formulae
26 ~~~~~~~~
27
28 R1() = R1'()
29
30
31 R2() = R2'()
32
33 gH sigma_noe()
34 NOE() = 1 + -- . -----------
35 gN R1()
36
37 """
38
39
40 self.Ri_prime()
41
42
43 self.data.ri = copy.deepcopy(self.data.ri_prime)
44
45
46 for i in range(self.mf.data.num_ri):
47 if self.mf.data.data_types[i] == 'NOE':
48 if self.mf.data.noe_r1_table[i] == None:
49 raise NameError, "Incomplete code, need to somehow calculate the r1 value."
50
51 if self.data.ri_prime[self.mf.data.noe_r1_table[i]] == 0:
52 self.data.ri[i] = 1e99
53 else:
54 self.data.ri[i] = 1.0 + (self.mf.data.gh/self.mf.data.gx) * (self.data.ri_prime[i] / self.data.ri_prime[self.mf.data.noe_r1_table[i]])
55