1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 from os import sep
25
26
27 from base_classes import SystemTestCase
28 from data import Relax_data_store; ds = Relax_data_store()
29 from generic_fns.mol_res_spin import spin_loop
30 from status import Status; status = Status()
31
32
34 """Class for testing various aspects specific to relaxation data back calculation."""
35
37 """Test the back calculation of relaxation data from model-free results."""
38
39
40 self.interpreter.state.load(state='sphere_trunc', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'bug_14941_local_tm_global_selection')
41
42
43 self.interpreter.relax_data.back_calc()
44
45
46 ri_data_bc = [{'R2_600': 4.7159538829340821, 'R1_500': 2.4779663389365068, 'NOE_500': 0.51989421750722165, 'R2_500': 4.3440970032224548, 'R1_600': 2.2831801922968129, 'NOE_600': 0.63592506242171432},
47 {'R2_600': 4.7211287713315739, 'R1_500': 2.5267468751446214, 'NOE_500': 0.57703969243842634, 'R2_500': 4.6185111669453738, 'R1_600': 2.2320234021052801, 'NOE_600': 0.66505178335932991}]
48
49
50 index = 0
51 for spin in spin_loop():
52
53 self.assertEqual(spin.ri_data_bc, ri_data_bc[index])
54
55
56 index += 1
57
58
60 """Test the back calculation of specific relaxation data from model-free results."""
61
62
63 self.interpreter.state.load(state='sphere_trunc', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'bug_14941_local_tm_global_selection')
64
65
66 self.interpreter.relax_data.back_calc('NOE_500')
67
68
69 ri_data_bc = [{'NOE_500': 0.51989421750722165},
70 {'NOE_500': 0.57703969243842634}]
71
72
73 index = 0
74 for spin in spin_loop():
75
76 self.assertEqual(spin.ri_data_bc, ri_data_bc[index])
77
78
79 index += 1
80
81
83 """Test the back calculation of new relaxation data from model-free results."""
84
85
86 self.interpreter.state.load(state='sphere_trunc', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'bug_14941_local_tm_global_selection')
87
88
89 self.interpreter.relax_data.back_calc('NOE_500.001', ri_type='NOE', frq=500.001e6)
90
91
92 ri_data_bc = [{'NOE_500.001': 0.52064607759431081},
93 {'NOE_500.001': 0.57759452179767434}]
94
95
96 index = 0
97 for spin in spin_loop():
98
99 self.assertEqual(spin.ri_data_bc, ri_data_bc[index])
100
101
102 index += 1
103