Author: bugman Date: Wed Jun 15 14:10:26 2011 New Revision: 13036 URL: http://svn.gna.org/viewcvs/relax?rev=13036&view=rev Log: The NOE analysis is now initialised within its class (like the model-free setup). This now allows an NOE tab to be created on demand. Modified: branches/gui_testing/gui/analyses/auto_model_free.py branches/gui_testing/gui/analyses/auto_noe.py branches/gui_testing/gui/relax_gui.py Modified: branches/gui_testing/gui/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_model_free.py?rev=13036&r1=13035&r2=13036&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_model_free.py (original) +++ branches/gui_testing/gui/analyses/auto_model_free.py Wed Jun 15 14:10:26 2011 @@ -182,7 +182,7 @@ self.data.paramfiles3 = ["", "", ""] self.data.unresolved = '' self.data.structure_file = '' - self.data.results_dir_model = getcwd() + self.data.results_dir_model = self.gui.launch_dir self.data.max_iter = "30" # The parent GUI element for this class. Modified: branches/gui_testing/gui/analyses/auto_noe.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=13036&r1=13035&r2=13036&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_noe.py (original) +++ branches/gui_testing/gui/analyses/auto_noe.py Wed Jun 15 14:10:26 2011 @@ -60,25 +60,28 @@ bitmap = None label = None - def __init__(self, gui, notebook, hardcoded_index=None): + def __init__(self, gui, notebook): """Build the automatic NOE analysis GUI frame elements. @param gui: The main GUI class. @type gui: gui.relax_gui.Main instance @param notebook: The notebook to pack this frame into. @type notebook: wx.Notebook instance - @keyword hardcoded_index: Kludge for the current GUI layout. - @type hardcoded_index: int """ # Store the main class. self.gui = gui - # The NOE image - self.bitmap = paths.IMAGE_PATH + 'noe.png' - - # Alias the storage container in the relax data store. - self.data = ds.relax_gui.analyses[hardcoded_index] + # Generate a storage container in the relax data store, and alias it for easy access. + self.data = ds.relax_gui.analyses.add('NOE') + + # Initialise the variables. + self.data.frq = '' + self.data.ref_file = '' + self.data.sat_file = '' + self.data.ref_rmsd = 1000 + self.data.sat_rmsd = 1000 + self.data.save_dir = self.gui.launch_dir # The parent GUI element for this class. self.parent = wx.Panel(notebook, -1) @@ -183,8 +186,8 @@ # Use a vertical packing of elements. box = wx.BoxSizer(wx.VERTICAL) - # Add the model-free bitmap picture. - bitmap = wx.StaticBitmap(self.parent, -1, wx.Bitmap(self.bitmap, wx.BITMAP_TYPE_ANY)) + # Add the NOE bitmap picture. + bitmap = wx.StaticBitmap(self.parent, -1, wx.Bitmap(paths.IMAGE_PATH+'noe.png', wx.BITMAP_TYPE_ANY)) box.Add(bitmap, 0, wx.ADJUST_MINSIZE, 10) # Return the box. Modified: branches/gui_testing/gui/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=13036&r1=13035&r2=13036&view=diff ============================================================================== --- branches/gui_testing/gui/relax_gui.py (original) +++ branches/gui_testing/gui/relax_gui.py Wed Jun 15 14:10:26 2011 @@ -86,6 +86,10 @@ # Execute the base class __init__ method. super(Main, self).__init__(parent=parent, id=id, title=title, style=wx.DEFAULT_FRAME_STYLE) + # Initialise some variables for the GUI. + self.init_state = True + self.launch_dir = getcwd() + # Set up the frame. self.Layout() self.SetSize((self.min_width, self.min_height)) @@ -131,7 +135,6 @@ # Add the start screen. self.add_start_screen() - self.init_state = True # Close Box event self.Bind(wx.EVT_CLOSE, self.exit_gui) @@ -369,7 +372,7 @@ """ # FIXME: temporary vars until a wizard is made. - analysis_type = 'mf' + analysis_type = 'noe' # Starting from the initial state. if self.init_state: