1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 from os import sep
24 import sys
25
26
27 from data import Relax_data_store; ds = Relax_data_store()
28 from generic_fns import pipes
29 from status import Status; status = Status()
30 from test_suite.system_tests.base_classes import SystemTestCase
31
32
34 """Class containing generic tests of relax execution."""
35
37 """Test nested scripting."""
38
39
40 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'nested_scripting'+sep+'main.py')
41
42
43 self.assertEqual(cdp.nest, ['a', 'b', 'c', 'd'])
44
45
47 """S2 difference stored in a new data pipe."""
48
49
50 pipe_list = ['orig1', 'orig2', 'new']
51 s2 = [0.9, 0.7, None]
52
53
54 for i in range(3):
55
56 self.interpreter.pipe.create(pipe_list[i], 'mf')
57
58
59 self.interpreter.sequence.read(file="Ap4Aase.seq", dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, res_name_col=2)
60
61
62 self.interpreter.select.spin(spin_id=':8', change_all=True)
63
64
65 if s2[i]:
66 self.interpreter.value.set(s2[i], 's2', spin_id=':8')
67
68
69 dp_orig1 = pipes.get_pipe('orig1')
70 dp_orig2 = pipes.get_pipe('orig2')
71 dp_new = pipes.get_pipe('new')
72
73
74 diff = dp_orig1.mol[0].res[7].spin[0].s2 - dp_orig2.mol[0].res[7].spin[0].s2
75 self.interpreter.value.set(diff, 's2', spin_id=':8')
76
77
78 self.assertAlmostEqual(dp_new.mol[0].res[7].spin[0].s2, 0.2)
79
80
82 """Test the creation of a PDB representation of the distribution of XH bond vectors."""
83
84
85 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'xh_vector_dist.py')
86