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 base_classes import SystemTestCase
29 from data import Relax_data_store; ds = Relax_data_store()
30 from generic_fns import pipes
31 from status import Status; status = Status()
32
33
35 """Class containing generic tests of relax execution."""
36
38 """Test nested scripting."""
39
40
41 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'nested_scripting'+sep+'main.py')
42
43
44 self.assertEqual(cdp.nest, ['a', 'b', 'c', 'd'])
45
46
48 """S2 difference stored in a new data pipe."""
49
50
51 pipe_list = ['orig1', 'orig2', 'new']
52 s2 = [0.9, 0.7, None]
53
54
55 for i in xrange(3):
56
57 self.interpreter.pipe.create(pipe_list[i], 'mf')
58
59
60 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)
61
62
63 self.interpreter.select.spin(spin_id=':8', change_all=True)
64
65
66 if s2[i]:
67 self.interpreter.value.set(s2[i], 's2', spin_id=':8')
68
69
70 dp_orig1 = pipes.get_pipe('orig1')
71 dp_orig2 = pipes.get_pipe('orig2')
72 dp_new = pipes.get_pipe('new')
73
74
75 diff = dp_orig1.mol[0].res[7].spin[0].s2 - dp_orig2.mol[0].res[7].spin[0].s2
76 self.interpreter.value.set(diff, 's2', spin_id=':8')
77
78
79 self.assertAlmostEqual(dp_new.mol[0].res[7].spin[0].s2, 0.2)
80
81
83 """Test the creation of a PDB representation of the distribution of XH bond vectors."""
84
85
86 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'xh_vector_dist.py')
87