mailRe: r11194 - /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 d'Auvergne on May 19, 2010 - 11:33:
Done!  See r11207.  You need to pass in the max_iter arg to the
dAuvergne_protocol class.

Regards,

Edward


On 19 May 2010 03:28,  <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri
Date: Wed May 19 03:28:29 2010
New Revision: 11194

URL: http://svn.gna.org/viewcvs/relax?rev=11194&view=rev
Log:
GUI element for limiting number of iterations in model-free calculations is 
added as discussed with Edward d'Auvergne.

Value of maximum iteration SpinCtrl is synchronized with relax data storage.
Edward, do you include this new function in the dauvergne_protocol.py 
script?

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=11194&r1=11193&r2=11194&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_model_free.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Wed May 19 
03:28:29 2010
@@ -135,6 +135,29 @@
        # Pack the title.
        box.Add(label, 0, wx.BOTTOM|wx.ADJUST_MINSIZE, 18)

+
+    def add_max_iterations(self, box):
+        """Create and add the model-free maximum interation GUI element to 
the given box.
+
+        @param box:     The box element to pack the model-free maximum 
iteration GUI element into.
+        @type box:      wx.BoxSizer instance
+        """
+
+        # Sizer.
+        sizer = wx.BoxSizer(wx.HORIZONTAL)
+
+        # Text.
+        label_maxiter = wx.StaticText(self.parent, -1, "Maximum 
interations:")
+        label_maxiter.SetMinSize((240, 17))
+        sizer.Add(label_maxiter, 0, 
wx.ADJUST_MINSIZE|wx.ALIGN_CENTER_VERTICAL, 0)
+
+        # Spinner.
+        self.max_iter = wx.SpinCtrl(self.parent, -1, "30", min=25, max=100)
+        sizer.Add(self.max_iter, 0, 
wx.ADJUST_MINSIZE|wx.ALIGN_CENTER_VERTICAL, 0)
+
+        # Add the element to the box.
+        box.Add(sizer, 1, wx.EXPAND, 0)
+

    def add_mf_models(self, box):
        """Create and add the model-free model picking GUI element to the 
given box.
@@ -690,6 +713,9 @@
        # Add the model-free models GUI element.
        self.add_mf_models(box)

+        # Add maximum interation selector.
+        self.add_max_iterations(box)
+
        # Add the PDB file selection GUI element.
        self.add_pdb_selection(box)

@@ -1076,3 +1102,12 @@
            self.data.results_dir_model = 
str(self.resultsdir_r21_copy_2.GetValue())
        else:
            
self.resultsdir_r21_copy_2.SetValue(str(self.data.results_dir_model))
+
+        # Maximum iterations.
+        if upload:
+            self.data.max_iter = str(self.max_iter.GetValue())
+        else:
+            try:
+                self.max_iter.SetValue(int(self.data.max_iter))
+            except:
+                self.max_iter.SetValue(30)  # Default value.


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits




Related Messages


Powered by MHonArc, Updated Wed May 19 11:40:18 2010