Package functions :: Module dri
[hide private]
[frames] | no frames]

Source Code for Module functions.dri

 1  from Numeric import copy 
 2   
3 -class dRi:
4 - def __init__(self):
5 "An additional layer of equations to simplify the relaxation equations, gradients, and hessians."
6 7 8
9 - def dRi(self):
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 gradients 16 ~~~~~~~~~~~~~~~~~~~~~~~~ 17 18 Data structure: self.data.dri 19 Dimension: 2D, (parameters, relaxation data) 20 Type: Numeric array, Float64 21 Dependencies: self.data.ri_prime, self.data.dri_prime 22 Required by: self.data.dchi2, self.data.d2chi2 23 24 25 Formulae 26 ~~~~~~~~ 27 28 dR1() dR1'() 29 ------- = ------- 30 dthetaj dthetaj 31 32 33 dR2() dR2'() 34 ------- = ------- 35 dthetaj dthetaj 36 37 38 dNOE() gH 1 / dsigma_noe() dR1() \ 39 ------- = -- . ------- . | R1() . ------------ - sigma_noe() . ------- | 40 dthetaj gN R1()**2 \ dthetaj dthetaj / 41 42 43 """ 44 45 # Calculate the transformed relaxation gradients (the transformed relaxation values have been previously calculated by the dChi2 function). 46 self.dRi_prime() 47 48 # Copy the relaxation gradients from self.data.dri_prime 49 self.data.dri = copy.deepcopy(self.data.dri_prime) 50 51 # Loop over the relaxation values and modify the NOE gradients. 52 for i in range(self.mf.data.num_ri): 53 if self.mf.data.data_types[i] == 'NOE': 54 r1 = self.data.ri_prime[self.mf.data.noe_r1_table[i]] 55 if r1 == None: 56 raise NameError, "Incomplete code, need to somehow calculate the r1 value." 57 for param in range(len(self.data.ri_param_types)): 58 if r1 == 0.0: 59 self.data.dri[param, i] = 1e99 60 else: 61 self.data.dri[param, i] = (self.mf.data.gh/self.mf.data.gx) * (1.0 / r1**2) * (r1 * self.data.dri_prime[param, i] - self.data.ri_prime[i] * self.data.dri_prime[param, self.mf.data.noe_r1_table[i]])
62