mailRe: r11102 - /branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py


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

Header


Content

Posted by Edward d'Auvergne on April 27, 2010 - 16:16:
Hi,

Sorry for the delayed responses, but I've just had a few days off.  I
have added some comments below.


On 22 April 2010 05:28,  <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri
Date: Thu Apr 22 05:28:11 2010
New Revision: 11102

URL: http://svn.gna.org/viewcvs/relax?rev=11102&view=rev
Log:
Global settings set up in relaxGUI is included in relax fit calculation.

Users are able to specify hetero nucleus and proton name.

Modified:
   branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py

Modified: branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py?rev=11102&r1=11101&r2=11102&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py Thu Apr 22 
05:28:11 2010
@@ -267,9 +267,20 @@
        # The integration method.
        data.int_method = 'height'

+        # Import golbal settings.
+        global_settings = ds.relax_gui.global_setting
+
+        # Hetero nucleus name.
+        data.heteronuc = global_settings[2]
+
+        # Proton name.
+        data.proton = global_settings[3]
+
+        # Increment size.
+        data.inc = int(global_settings[4])
+

The global_settings list is ok for this version.  This is not very
flexible though and is prone to have hard to find errors.  For example
if, in the future, you delete a global setting, this code will no
longer works.  In the future, these could all be specific variables
inside a data container.  This is a very powerful feature of Python,
or any object oriented language, and will avoid many future bugs.  I
believe though that in the next revision of the GUI, this will not be
necessary as direct access to the user functions will remove the need
for this list.


        # The number of Monte Carlo simulations to be used for error 
analysis at the end of the analysis.
-        data.mc_num = ds.relax_gui.global_setting
-        data.mc_num = int(data.mc_num[6])
+        data.mc_num = int(global_settings[6])

        # Unresolved resiudes
        file = DummyFileObject()
@@ -289,6 +300,9 @@
        # Results directory.
        data.save_dir = self.data.save_dir

+
+
+

What are these 3 extra empty lines for?  These should be removed.


        # Return the container.
        return data

@@ -388,7 +402,7 @@
        data = self.assemble_data()

        # Execute.
-        Relax_fit(filename = self.filename, seq_args=data.seq_args, 
directory = data.save_dir, file_names=data.file_names, 
relax_times=data.relax_times, int_method=data.int_method, 
mc_num=data.mc_num, pdb_file = data.structure_file, unresolved = 
data.unresolved, view_plots = False)
+        Relax_fit(filename=self.filename, seq_args=data.seq_args, 
directory=data.save_dir, file_names=data.file_names, 
relax_times=data.relax_times, int_method=data.int_method, 
mc_num=data.mc_num, pdb_file=data.structure_file, 
unresolved=data.unresolved, view_plots = False, heteronuc=data.heteronuc, 
proton=data.proton, inc=data.inc)

Is this part of the global_setting system?  It looks like it should be
in a separate, unrelated commit.

Cheers,

Edward



Related Messages


Powered by MHonArc, Updated Wed Apr 28 01:40:14 2010