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 data_store import Relax_data_store; ds = Relax_data_store()
28 from pipe_control.mol_res_spin import residue_loop
29 from lib.physical_constants import N15_CSA
30 from status import Status; status = Status()
31 from test_suite.system_tests.base_classes import SystemTestCase
32
33
34 -class Jw(SystemTestCase):
35 """Class for testing various aspects specific to reduced spectral density mapping."""
36
42
43
45 """Catch U{bug #20674<https://web.archive.org/web/https://gna.org/bugs/?20674>}, but for the J(w) mapping analysis."""
46
47
48 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'bug_20674_jw_mapping.py')
49
50
52 """The spectral density calculation test."""
53
54
55 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_calc_test.py')
56
57
58 j0 = [4.0703318681008998e-09, 3.7739393907014834e-09]
59 jwx = [1.8456254300773903e-10, 1.6347516082378241e-10]
60 jwh = [1.5598167512718012e-12, 2.9480536599037041e-12]
61
62
63 index = 0
64 for res in residue_loop():
65
66 if res.num == -2 or res.num == -1:
67 self.assertTrue(res.spin[0].select)
68 self.assertAlmostEqual(res.spin[0].j0 * 1e9, j0[index] * 1e9)
69 self.assertAlmostEqual(res.spin[0].jwh * 1e10, jwh[index] * 1e10)
70 self.assertAlmostEqual(res.spin[0].jwx * 1e12, jwx[index] * 1e12)
71 index = index + 1
72
73
74 else:
75 self.assertTrue(not res.spin[0].select)
76
77
79 """The user function value.set()."""
80
81
82 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_set_value.py')
83
84
85 for res in residue_loop():
86 self.assertAlmostEqual(res.spin[0].csa, N15_CSA)
87
88
90 """Test a complete jw mapping run using a script."""
91
92
93 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping.py')
94