mailr10472 - /branches/bieri_gui/gui_bieri/analyses/auto_model_free.py


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

Header


Content

Posted by edward on January 28, 2010 - 10:35:
Author: bugman
Date: Thu Jan 28 10:35:24 2010
New Revision: 10472

URL: http://svn.gna.org/viewcvs/relax?rev=10472&view=rev
Log:
Renamed and shifted exec_model_free() to automatic_protocol_controller().

This is to better distinguish between the names exec_model_free(), 
start_modelfree(), and
start_model_free().


Modified:
    branches/bieri_gui/gui_bieri/analyses/auto_model_free.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=10472&r1=10471&r2=10472&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_model_free.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Thu Jan 28 
10:35:24 2010
@@ -101,7 +101,7 @@
         exec_relax_copy_1_copy_3.Add(self.relax_start_modelfree, 0, 
wx.RIGHT|wx.ADJUST_MINSIZE, 0)
 
         # Bind the events.
-        self.gui.Bind(wx.EVT_BUTTON, self.exec_model_free, 
self.relax_start_modelfree)
+        self.gui.Bind(wx.EVT_BUTTON, self.automatic_protocol_controller, 
self.relax_start_modelfree)
 
         # Add the element to the box.
         box.Add(exec_relax_copy_1_copy_3, 1, wx.ALIGN_RIGHT, 0)
@@ -514,136 +514,8 @@
         box.Add(nmr_freq_copy_copy_copy_copy_copy_1_copy, 0, 
wx.EXPAND|wx.SHAPED, 0)
 
 
-    def build_main_box(self):
-        """Construct the highest level box to pack into the automatic 
model-free analysis frame.
-
-        @return:    The main box element containing all model-free GUI 
elements to pack directly into the automatic model-free analysis frame.
-        @rtype:     wx.BoxSizer instance
-        """
-
-        # Use a horizontal packing of elements.
-        box = wx.BoxSizer(wx.HORIZONTAL)
-
-        # Add the model-free bitmap picture.
-        bitmap = wx.StaticBitmap(self.gui.modelfree, -1, 
wx.Bitmap(IMAGE_PATH+'modelfree.png', wx.BITMAP_TYPE_ANY))
-        box.Add(bitmap, 0, wx.ADJUST_MINSIZE, 0)
-
-        # Build the right hand box and pack it next to the bitmap.
-        right_box = self.build_right_box()
-        box.Add(right_box, 0, 0, 0)
-
-        # Return the box.
-        return box
-
-
-    def build_right_box(self):
-        """Construct the right hand box to pack into the main model-free box.
-
-        @return:    The right hand box element containing all model-free GUI 
elements (excluding the bitmap) to pack into the main model-free box.
-        @rtype:     wx.BoxSizer instance
-        """
-
-        # Use a vertical packing of elements.
-        box = wx.BoxSizer(wx.VERTICAL)
-
-        # Add the frame title.
-        self.add_frame_title(box)
-
-        # Add the relaxation data input GUI element.
-        self.add_relax_data_input(box)
-
-        # Add the model-free models GUI element.
-        self.add_mf_models(box)
-
-        # Add the model selection GUI element.
-        self.add_modsel_method(box)
-
-        # Add the PDB file selection GUI element.
-        self.add_pdb_selection(box)
-
-        # Add the unresolved spins GUI element.
-        self.add_unresolved_spins(box)
-
-        # Add the results directory GUI element.
-        self.add_results_dir(box)
-
-        # Add the execution GUI element.
-        self.add_execute_relax(box)
-
-        # Return the packed box.
-        return box
-
-
-    def check_entries(self):
-        check = False
-        counter = 0
-
-        # check frq 1
-        if not self.modelfreefreq1.GetValue() == '':
-            counter = counter + 1
-        if not self.m_noe_1.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r1_1.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r2_1.GetValue() == '':
-            counter = counter + 1
-
-        # check frq 1
-        if not self.modelfreefreq2.GetValue() == '':
-            counter = counter + 1
-        if not self.m_noe_2.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r1_2.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r2_2.GetValue() == '':
-            counter = counter + 1
-
-        # check frq 1
-        if not self.modelfreefreq3.GetValue() == '':
-            counter = counter + 1
-        if not self.m_noe_3.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r1_3.GetValue() == '':
-            counter = counter + 1
-        if not self.m_r2_3.GetValue() == '':
-            counter = counter + 1
-
-        # two field strength ok
-        if counter == 8:
-            check = True
-            print '\n\n\nTwo different field strength detected !!\n\n\n'
-
-        # three field strength ok
-        elif counter == 12:
-            check = True
-            print '\n\n\nThree different field strength detected !!\n\n\n'
-
-        # missing data
-        else:
-            missing_data()
-
-        return check
-
-
-    def choose_global_model(self, local_tm_complete=False):
-        """Select the individual global models to solve, or all 
automatically.
-
-        @keyword local_tm_complete: A flag specifying if the local tm global 
model has been solved already.
-        @type local_tm_complete:    bool
-        @return:                    The global model selected, or 'full' for 
all.
-        @rtype:                     str
-        """
-
-        # The dialog.
-        dlg = Select_tensor(None, -1, "", local_tm_flag=local_tm_complete)
-        dlg.ShowModal()
-
-        # Return the choice.
-        return dlg.selection
-
-
-    def exec_model_free(self, event):
-        """Execute the automatic model-free protocol.
+    def automatic_protocol_controller(self, event):
+        """Set up, execute, and process the automatic model-free protocol.
 
         @param event:   The wx event.
         @type event:    wx event
@@ -701,6 +573,134 @@
 
         # Skip the event.
         event.Skip()
+
+
+    def build_main_box(self):
+        """Construct the highest level box to pack into the automatic 
model-free analysis frame.
+
+        @return:    The main box element containing all model-free GUI 
elements to pack directly into the automatic model-free analysis frame.
+        @rtype:     wx.BoxSizer instance
+        """
+
+        # Use a horizontal packing of elements.
+        box = wx.BoxSizer(wx.HORIZONTAL)
+
+        # Add the model-free bitmap picture.
+        bitmap = wx.StaticBitmap(self.gui.modelfree, -1, 
wx.Bitmap(IMAGE_PATH+'modelfree.png', wx.BITMAP_TYPE_ANY))
+        box.Add(bitmap, 0, wx.ADJUST_MINSIZE, 0)
+
+        # Build the right hand box and pack it next to the bitmap.
+        right_box = self.build_right_box()
+        box.Add(right_box, 0, 0, 0)
+
+        # Return the box.
+        return box
+
+
+    def build_right_box(self):
+        """Construct the right hand box to pack into the main model-free box.
+
+        @return:    The right hand box element containing all model-free GUI 
elements (excluding the bitmap) to pack into the main model-free box.
+        @rtype:     wx.BoxSizer instance
+        """
+
+        # Use a vertical packing of elements.
+        box = wx.BoxSizer(wx.VERTICAL)
+
+        # Add the frame title.
+        self.add_frame_title(box)
+
+        # Add the relaxation data input GUI element.
+        self.add_relax_data_input(box)
+
+        # Add the model-free models GUI element.
+        self.add_mf_models(box)
+
+        # Add the model selection GUI element.
+        self.add_modsel_method(box)
+
+        # Add the PDB file selection GUI element.
+        self.add_pdb_selection(box)
+
+        # Add the unresolved spins GUI element.
+        self.add_unresolved_spins(box)
+
+        # Add the results directory GUI element.
+        self.add_results_dir(box)
+
+        # Add the execution GUI element.
+        self.add_execute_relax(box)
+
+        # Return the packed box.
+        return box
+
+
+    def check_entries(self):
+        check = False
+        counter = 0
+
+        # check frq 1
+        if not self.modelfreefreq1.GetValue() == '':
+            counter = counter + 1
+        if not self.m_noe_1.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r1_1.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r2_1.GetValue() == '':
+            counter = counter + 1
+
+        # check frq 1
+        if not self.modelfreefreq2.GetValue() == '':
+            counter = counter + 1
+        if not self.m_noe_2.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r1_2.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r2_2.GetValue() == '':
+            counter = counter + 1
+
+        # check frq 1
+        if not self.modelfreefreq3.GetValue() == '':
+            counter = counter + 1
+        if not self.m_noe_3.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r1_3.GetValue() == '':
+            counter = counter + 1
+        if not self.m_r2_3.GetValue() == '':
+            counter = counter + 1
+
+        # two field strength ok
+        if counter == 8:
+            check = True
+            print '\n\n\nTwo different field strength detected !!\n\n\n'
+
+        # three field strength ok
+        elif counter == 12:
+            check = True
+            print '\n\n\nThree different field strength detected !!\n\n\n'
+
+        # missing data
+        else:
+            missing_data()
+
+        return check
+
+
+    def choose_global_model(self, local_tm_complete=False):
+        """Select the individual global models to solve, or all 
automatically.
+
+        @keyword local_tm_complete: A flag specifying if the local tm global 
model has been solved already.
+        @type local_tm_complete:    bool
+        @return:                    The global model selected, or 'full' for 
all.
+        @rtype:                     str
+        """
+
+        # The dialog.
+        dlg = Select_tensor(None, -1, "", local_tm_flag=local_tm_complete)
+        dlg.ShowModal()
+
+        # Return the choice.
+        return dlg.selection
 
 
     def model_noe1(self, event): # load noe1




Related Messages


Powered by MHonArc, Updated Thu Jan 28 11:00:02 2010