Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2012 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax. # 6 # # 7 # relax is free software; you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation; either version 2 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # relax is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with relax; if not, write to the Free Software # 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 20 # # 21 ############################################################################### 22 23 # Module docstring. 24 """GUI tests for the BMRB related activities.""" 25 26 # Python module imports. 27 from os import sep 28 29 # relax module imports. 30 from generic_fns.pipes import VALID_TYPES 31 from status import Status; status = Status() 32 from test_suite.gui_tests.base_classes import GuiTestCase 33 34 # relax GUI imports. 35 from gui.misc import str_to_gui 36 from gui import user_functions 37 from gui.wizard import Wiz_window 38 3941 """Class for testing the BMRB related functions in the GUI.""" 42 43129 130 #bmrb.software(name='X', url='http://www.nmr-relax.com', vendor_name='me', cite_ids=['test'], tasks=['procrastinating', 'nothing much', 'wasting time']) 131 132 #bmrb.script(file='noe.py', dir=status.install_path+sep+'sample_scripts', analysis_type='noe', engine='relax') 133 #bmrb.script(file='relax_fit.py', dir=status.install_path+sep+'sample_scripts', analysis_type='relax_fit', engine='relax') 134 #bmrb.script(file='dauvergne_protocol.py', dir=status.install_path+sep+'sample_scripts'+sep+'model_free', analysis_type='mf', model_selection='AIC', engine='relax', model_elim=True, universal_solution=True) 135 136 # Write, then read the data to a new data pipe. 137 #bmrb.write(file=ds.tmpfile, dir=None, version=ds.version, force=True) 138 #pipe.create(pipe_name='new', pipe_type='mf') 139 #bmrb.read(file=ds.tmpfile, version=ds.version) 140 141 # Display tests. 142 #sequence.display() 143 #relax_data.display(ri_id='R1_800') 144 145 # Save the program state. 146 #state.save('devnull', force=True) 14745 """Test the reading and writing of BMRB files. 46 47 This test should match that of the system test script bmrb_rw.py. 48 """ 49 50 # Create a wizard instance to be used in all user function pages. 51 self._wizard = Wiz_window(self.app.gui) 52 53 # Create the data pipe. 54 self.execute_uf(page=user_functions.pipe.Create_page, pipe_name='results', pipe_type='mf') 55 56 # Read the results. 57 results_read = user_functions.results.Read_page(self._wizard) 58 results_read.file.SetValue(str_to_gui(status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP'+sep+'final_results_trunc_1.3')) 59 results_read.on_execute() 60 61 # Play with the data. 62 deselect_all = user_functions.deselect.All_page(self._wizard) 63 deselect_all.on_execute() 64 65 spin_copy = user_functions.spin.Copy_page(self._wizard) 66 spin_copy.res_from.SetValue(str_to_gui('9 None')) 67 spin_copy.res_num_to.SetValue(str_to_gui('9')) 68 spin_copy.spin_name_to.SetValue(str_to_gui('NE')) 69 spin_copy.on_execute() 70 71 select_spin = user_functions.select.Spin_page(self._wizard) 72 select_spin.spin_id.SetValue(str_to_gui(':9')) 73 select_spin.on_execute() 74 select_spin.spin_id.SetValue(str_to_gui(':10')) 75 select_spin.on_execute() 76 select_spin.spin_id.SetValue(str_to_gui(':11')) 77 select_spin.on_execute() 78 79 spin_name = user_functions.spin.Name_page(self._wizard) 80 spin_name.name.SetValue(str_to_gui('N')) 81 spin_name.on_execute() 82 83 spin_element = user_functions.spin.Element_page(self._wizard) 84 spin_element.spin_id.SetValue(str_to_gui('N')) 85 spin_element.on_execute() 86 87 #molecule_name = user_functions.molecule.Name_page(self._wizard) 88 #molecule_name.name.SetValue(str_to_gui('OMP')) 89 #molecule_name.type.SetValue(str_to_gui('protein')) 90 #molecule_name.on_execute() 91 92 #bmrb_thiol_state = user_functions.bmrb.Thiol_state_page(self._wizard) 93 #bmrb_thiol_state.state.SetValue(str_to_gui('reduced')) 94 #bmrb_thiol_state.on_execute() 95 96 # Display the data (as a test). 97 #relax_data_display = user_functions.relax_data.Display_page(self._wizard) 98 #relax_data_display.ri_id.SetValue(str_to_gui('R1_800')) 99 #relax_data_display.on_execute() 100 101 # Temperature control and peak intensity type. 102 ri_ids = ['R1_600', 'R2_600', 'NOE_600', 'R1_800', 'R2_800', 'NOE_800'] 103 for i in range(6): 104 pass 105 #relax_data_temp_calibration = user_functions.relax_data.Temp_calibration_page(self._wizard) 106 #relax_data_temp_calibration.ri_id.SetValue(str_to_gui(ri_ids[i])) 107 #relax_data_temp_calibration.method.SetValue(str_to_gui('methanol')) 108 #relax_data_temp_calibration.on_execute() 109 110 #relax_data_temp_control = user_functions.relax_data.Temp_control_page(self._wizard) 111 #relax_data_temp_control.ri_id.SetValue(str_to_gui(ri_ids[i])) 112 #relax_data_temp_control.method.SetValue(str_to_gui('single fid interleaving')) 113 #relax_data_temp_control.on_execute() 114 115 #relax_data_peak_intensity_type = user_functions.relax_data.Peak_intensity_type_page(self._wizard) 116 #relax_data_peak_intensity_type.ri_id.SetValue(str_to_gui(ri_ids[i])) 117 #relax_data_peak_intensity_type.type.SetValue(str_to_gui('height')) 118 #relax_data_peak_intensity_type.on_execute() 119 120 # Set up some BMRB information. 121 #bmrb_software_select = user_functions.bmrb.Software_select_page(self._wizard) 122 #bmrb_software_select.name.SetValue(str_to_gui('NMRPipe')) 123 #bmrb_software_select.on_execute() 124 #bmrb_software_select.name.SetValue(str_to_gui('Sparky')) 125 #bmrb_software_select.version.SetValue(str_to_gui('3.106')) 126 #bmrb_software_select.on_execute() 127 128 self.execute_uf(page=user_functions.bmrb.Citation_page, cite_id='test', authors=[["Edward", "d'Auvergne", "E.", "J."], ["Paul", "Gooley", "P.", "R."]], doi="10.1039/b702202f", pubmed_id="17579774", full_citation="d'Auvergne E. J., Gooley P. R. (2007). Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm. Mol. Biosyst., 3(7), 483-494.", title="Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm.", status="published", type="journal", journal_abbrev="Mol. Biosyst.", journal_full="Molecular Biosystems", volume=3, issue=7, page_first=483, page_last=498, year=2007)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 13:33:06 2013 | http://epydoc.sourceforge.net |