mailr10387 - in /branches/bieri_gui/gui_bieri: analyses/auto_model_free.py analyses/select_model_calc.py relax_gui.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 26, 2010 - 14:35:
Author: bugman
Date: Tue Jan 26 14:35:25 2010
New Revision: 10387

URL: http://svn.gna.org/viewcvs/relax?rev=10387&view=rev
Log:
The global LOCAL_TM variable has been shifted into a class level variable.

This variable is not too well used in the code base - presumably this code is 
incomplete.


Modified:
    branches/bieri_gui/gui_bieri/analyses/auto_model_free.py
    branches/bieri_gui/gui_bieri/analyses/select_model_calc.py
    branches/bieri_gui/gui_bieri/relax_gui.py

Modified: branches/bieri_gui/gui_bieri/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_model_free.py?rev=10387&r1=10386&r2=10387&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_model_free.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Tue Jan 26 
14:35:25 2010
@@ -31,6 +31,7 @@
 # relax GUI module imports.
 from gui_bieri.analyses.relax_control import start_modelfree
 from gui_bieri.analyses.results_analysis import model_free_results, 
see_results
+from gui_bieri.analyses.select_model_calc import Select_tensor
 from gui_bieri.derived_wx_classes import StructureTextCtrl
 from gui_bieri.filedialog import opendir, openfile
 from gui_bieri.message import missing_data
@@ -617,13 +618,11 @@
 
 
     def exec_model_free(self, event):     # start model-free calculation by 
relax
-        global LOCAL_TM
-
         checkpoint = self.check_entries()
         if checkpoint == False:
             which_model = None
         else:
-            which_model = self.whichmodel(LOCAL_TM)
+            which_model = self.whichmodel(False)
 
         # start individual calculations
         if not which_model == None:
@@ -636,7 +635,7 @@
                     enable_models = start_modelfree(self, which_model, 
False, global_setting, file_setting, sequencefile)
 
                     if enable_models:
-                        LOCAL_TM = True
+                        self.local_tm_flag = True
                 else:
 
                     # run final run
@@ -781,10 +780,7 @@
 
 
     def whichmodel(self, is_local_tm):
-        global selection
-        global LOCAL_TM
-        LOCAL_TM = is_local_tm
         selection = None
-        dlg = Select_tensor(None, -1, "")
+        dlg = Select_tensor(None, -1, "", local_tm_flag=is_local_tm)
         dlg.ShowModal()
         return selection

Modified: branches/bieri_gui/gui_bieri/analyses/select_model_calc.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/select_model_calc.py?rev=10387&r1=10386&r2=10387&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/select_model_calc.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/select_model_calc.py Tue Jan 26 
14:35:25 2010
@@ -33,6 +33,11 @@
 
 class Select_tensor(wx.Dialog):
     def __init__(self, *args, **kwds):
+        """Initialise the dialog."""
+
+        # Strip out and save the local_tm_flag from the keywords.
+        self.local_tm_flag = kwds.pop('local_tm_flag')
+
         # begin select_tensor.__init__
         kwds["style"] = wx.DEFAULT_FRAME_STYLE
         wx.Dialog.__init__(self, *args, **kwds)
@@ -119,11 +124,11 @@
         self.cancel_button.SetMinSize((111, 29))
 
         # enable or disable buttons if local_tm was calculate
-        self.sphere_button.Enable(LOCAL_TM) # sphere button
-        self.oblate_button.Enable(LOCAL_TM)  # prolate button
-        self.prolate_button.Enable(LOCAL_TM)  # oblate button
-        self.ellipsoid_button.Enable(LOCAL_TM)  # ellipsoid button
-        self.final_button.Enable(LOCAL_TM)  # final button
+        self.sphere_button.Enable(self.local_tm_flag) # sphere button
+        self.oblate_button.Enable(self.local_tm_flag)  # prolate button
+        self.prolate_button.Enable(self.local_tm_flag)  # oblate button
+        self.ellipsoid_button.Enable(self.local_tm_flag)  # ellipsoid button
+        self.final_button.Enable(self.local_tm_flag)  # final button
 
 
     def cancel(self, event): # cancel

Modified: branches/bieri_gui/gui_bieri/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/relax_gui.py?rev=10387&r1=10386&r2=10387&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/relax_gui.py (original)
+++ branches/bieri_gui/gui_bieri/relax_gui.py Tue Jan 26 14:35:25 2010
@@ -73,7 +73,6 @@
 global_setting = ['1.02 * 1e-10', '-172 * 1e-6', 'N', 'H', '11', 'newton', 
'500']
 file_setting = ['0', '1', '2', '3', '4', '5', '6']
 sequencefile = ''
-LOCAL_TM = False
 
 # Table of relax Results
 table_residue = []




Related Messages


Powered by MHonArc, Updated Tue Jan 26 15:00:02 2010