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