1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """RDC-based system tests."""
24
25
26
27 from os import sep
28
29
30 from generic_fns.interatomic import interatomic_loop
31 from generic_fns.mol_res_spin import count_spins
32 from status import Status; status = Status()
33 from test_suite.system_tests.base_classes import SystemTestCase
34
35
36 -class Rdc(SystemTestCase):
37 """Class for testing RDC operations."""
38
40 """Test for the loading of some RDC data with the spin ID format."""
41
42
43 self.interpreter.pipe.create('test', 'N-state')
44
45
46 dir = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep
47
48
49 self.interpreter.sequence.read(file='tb.txt', dir=dir, spin_id_col=1)
50 self.interpreter.sequence.attach_protons()
51 self.interpreter.sequence.display()
52
53
54 self.interpreter.rdc.read(align_id='tb', file='tb.txt', dir=dir, spin_id1_col=1, spin_id2_col=2, data_col=3, error_col=4)
55 self.interpreter.sequence.display()
56
57
58 rdcs = [ -26.2501958629, 9.93081766942, 7.26317614156, -1.24840526981, 5.31803314334, 14.0362909456, 1.33652530397, -1.6021670281]
59
60
61 self.assertEqual(count_spins(), 16)
62 self.assertEqual(len(cdp.interatomic), 8)
63 i = 0
64 for interatom in interatomic_loop():
65 self.assertAlmostEqual(rdcs[i], interatom.rdc['tb'])
66 i += 1
67