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 import sys
26
27
28 from data import Relax_data_store; ds = Relax_data_store()
29 from generic_fns.mol_res_spin import residue_loop
30 from physical_constants import N15_CSA, NH_BOND_LENGTH
31 from status import Status; status = Status()
32 from test_suite.system_tests.base_classes import SystemTestCase
33
34
35 -class Jw(SystemTestCase):
36 """Class for testing various aspects specific to reduced spectral density mapping."""
37
43
44
46 """The spectral density calculation test."""
47
48
49 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_calc_test.py')
50
51
52 j0 = [4.0703318681008998e-09, 3.7739393907014834e-09]
53 jwx = [1.8456254300773903e-10, 1.6347516082378241e-10]
54 jwh = [1.5598167512718012e-12, 2.9480536599037041e-12]
55
56
57 index = 0
58 for res in residue_loop():
59
60 if res.num == -2 or res.num == -1:
61 self.assert_(res.spin[0].select)
62 self.assertAlmostEqual(res.spin[0].j0, j0[index])
63 self.assertAlmostEqual(res.spin[0].jwh, jwh[index])
64 self.assertAlmostEqual(res.spin[0].jwx, jwx[index])
65 index = index + 1
66
67
68 else:
69 self.assert_(not res.spin[0].select)
70
71
73 """The user function value.set()."""
74
75
76 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_set_value.py')
77
78
79 for res in residue_loop():
80 self.assertAlmostEqual(res.spin[0].csa, N15_CSA)
81
82
84 """Test a complete jw mapping run using a script."""
85
86
87 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping.py')
88