Author: bugman Date: Mon Sep 9 17:58:22 2013 New Revision: 20934 URL: http://svn.gna.org/viewcvs/relax?rev=20934&view=rev Log: Merged revisions 20932-20933 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20932 | bugman | 2013-09-09 17:35:58 +0200 (Mon, 09 Sep 2013) | 3 lines The model list GUI element can now display an optional model description column. ........ r20933 | bugman | 2013-09-09 17:51:38 +0200 (Mon, 09 Sep 2013) | 3 lines Added model descriptions and adjusted the size of the model-free model list GUI elements. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/gui/analyses/auto_model_free.py branches/relax_disp/gui/analyses/elements/model_list.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Sep 9 17:58:22 2013 @@ -1,1 +1,1 @@ -/trunk:1-20930 +/trunk:1-20933 Modified: branches/relax_disp/gui/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_model_free.py?rev=20934&r1=20933&r2=20934&view=diff ============================================================================== --- branches/relax_disp/gui/analyses/auto_model_free.py (original) +++ branches/relax_disp/gui/analyses/auto_model_free.py Mon Sep 9 17:58:22 2013 @@ -816,6 +816,18 @@ # Some class variables. desc = "Local %s models:" % tm + model_desc = [ + "Model m0 with a local molecular correlation time (%s)." % tm, + "Model m1 with a local molecular correlation time (%s)." % tm, + "Model m2 with a local molecular correlation time (%s)." % tm, + "Model m3 with a local molecular correlation time (%s)." % tm, + "Model m4 with a local molecular correlation time (%s)." % tm, + "Model m5 with a local molecular correlation time (%s)." % tm, + "Model m6 with a local molecular correlation time (%s)." % tm, + "Model m7 with a local molecular correlation time (%s)." % tm, + "Model m8 with a local molecular correlation time (%s)." % tm, + "Model m9 with a local molecular correlation time (%s)." % tm + ] models = [ "tm0", "tm1", @@ -842,6 +854,7 @@ ] warning = "The model-free models used in dauvergne_protocol auto-analysis should almost never be changed! The consequences will be unpredictable. Please proceed only if you are sure of what you are doing. Would you like to modify the model-free model list?" red_flag = True + size = (800, 350) tooltip = "The list model-free models with the %s parameter to optimise as the first step of the protocol (see the about window for details). This really should not be changed." % local_tm tooltip_button = "Open the model list selector window." @@ -852,6 +865,18 @@ # Some class variables. desc = "Model-free models:" + model_desc = [ + "No statistically significant internal motions.", + "The original model with a statistically insignificant %s." % te, + "The original Lipari and Szabo model.", + "The original model with chemical exchange relaxation but a statistically insignificant %s." % te, + "The original model with chemical exchange relaxation.", + "The extended model with a statistically insignificant %s." % tf, + "The Clore et al., 1991 extended model-free model.", + "The extended model with chemical exchange relaxation but a statistically insignificant %s." % tf, + "The extended model with chemical exchange relaxation.", + "No statistically significant internal motions but chemical exchange relaxation present." + ] models = [ "m0", "m1", @@ -878,6 +903,7 @@ ] warning = "The model-free models used in dauvergne_protocol auto-analysis should almost never be changed! The consequences will be unpredictable. Please proceed only if you are sure of what you are doing. Would you like to modify the model-free model list?" red_flag = True + size = (900, 350) tooltip = "The list model-free models to optimise as the iterative part of the protocol (see the about window for details). This really should not be changed." tooltip_button = "Open the model list selector window." Modified: branches/relax_disp/gui/analyses/elements/model_list.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/model_list.py?rev=20934&r1=20933&r2=20934&view=diff ============================================================================== --- branches/relax_disp/gui/analyses/elements/model_list.py (original) +++ branches/relax_disp/gui/analyses/elements/model_list.py Mon Sep 9 17:58:22 2013 @@ -45,6 +45,9 @@ desc = None """The short description for the GUI element.""" + model_desc = [] + """The short description for each model.""" + models = [] """The list of names of the model.""" @@ -88,7 +91,7 @@ self.models_stripped.append(model) # Initialise the model selection window. - self.model_win = Model_sel_window(self.models, self.params, size=self.size, border=self.border) + self.model_win = Model_sel_window(self.models, self.params, self.model_desc, size=self.size, border=self.border) # Horizontal packing for this element. sizer = wx.BoxSizer(wx.HORIZONTAL) @@ -225,13 +228,15 @@ class Model_sel_window(wx.Dialog): """The model selector window object.""" - def __init__(self, models, params, size=None, border=None): + def __init__(self, models, params, desc, size=None, border=None): """Set up the model selector window. @param models: The list of models. @type models: list of str @param params: The list of parameters corresponding to the models. @type params: list of str + @param desc: The description for each model. + @type desc: list of str @keyword size: The fixed size of the Window. @type size: tuple of int @keyword border: The border width, in pixels. @@ -243,6 +248,9 @@ # Initialise some values width = size[0] - 2*border + desc_flag = False + if len(desc): + desc_flag = True # Set the frame properties. self.SetSize(size) @@ -259,25 +267,29 @@ sizer = add_border(main_sizer, border=border, packing=wx.VERTICAL) # Add a list control. - self.grid_sizer = wx.FlexGridSizer(len(models)+2, 2, 3, 30) + cols = 2 + if desc_flag: + cols += 1 + self.grid_sizer = wx.FlexGridSizer(len(models)+2, cols, 3, 30) # The headers (and then a space). - text1 = wx.StaticText(self, -1, "Model") - text2 = wx.StaticText(self, -1, "Parameters") - text1.SetFont(font.title) - text2.SetFont(font.title) - self.grid_sizer.Add(text1) - self.grid_sizer.Add(text2) - self.grid_sizer.Add(wx.StaticText(self, -1, "")) - self.grid_sizer.Add(wx.StaticText(self, -1, "")) + titles = ["Model", "Parameters"] + if desc_flag: + titles.append("Description") + for title in titles: + text = wx.StaticText(self, -1, str_to_gui(title)) + text.SetFont(font.title) + self.grid_sizer.Add(text) + for i in range(len(titles)): + self.grid_sizer.Add(wx.StaticText(self, -1, "")) # Add the models and parameters. self.model_selection = [] for i in range(len(models)): # No model - i.e. a separator. if models[i] == None: - self.grid_sizer.Add(wx.StaticText(self, -1, "")) - self.grid_sizer.Add(wx.StaticText(self, -1, "")) + for i in range(len(titles)): + self.grid_sizer.Add(wx.StaticText(self, -1, "")) continue # Create a checkbox for the model. @@ -291,6 +303,10 @@ # Add the parameter text. self.grid_sizer.Add(wx.StaticText(self, -1, str_to_gui(params[i]))) + # Add the description. + if desc_flag: + self.grid_sizer.Add(wx.StaticText(self, -1, str_to_gui(desc[i]))) + # Add the table to the sizer. sizer.Add(self.grid_sizer, 1, wx.ALL|wx.EXPAND, 0)