mailRe: r11702 - /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 December 06, 2010 - 11:04:
Hi,

This fixes the bug, but there is a cleaner place to modify the code.
The reason is because the relax data store still contains the string
version.  So rather than catching the problem at the end, the problem
can be solved at the start.  The place would be in
gui_bieri/settings.py in the Inputfile.accept_settings() method.  Very
similar code could be used in this position.

Cheers,

Edward


On 6 December 2010 06:46,  <michael.bieri@xxxxxxxxxxxxx> wrote:
Author: michaelbieri
Date: Mon Dec  6 06:46:21 2010
New Revision: 11702

URL: http://svn.gna.org/viewcvs/relax?rev=11702&view=rev
Log:
Column numbers of parameter files can be set as 0, None or '' if argument 
is not present.

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=11702&r1=11701&r2=11702&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_model_free.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Mon Dec  6 
06:46:21 2010
@@ -561,8 +561,16 @@
        # Import parameter file settings.
        param = ds.relax_gui.file_setting

+        # Read parameter file parameters and convert them to integers if 
not None.
+        param_tmp = param
+        for i in range(0, len(param_tmp)):
+            if str(param_tmp[i]) in ['', '0', 'None']:
+                param_tmp[i] = None
+            else:
+                param_tmp[i] = int(param_tmp[i])
+
        # The sequence data (file name, dir, mol_name_col, res_num_col, 
res_name_col, spin_num_col, spin_name_col, sep).  These are the arguments 
to the  sequence.read() user function, for more information please see the 
documentation for that function.
-        data.seq_args = [sequence_file, None, None, int(param[1]), 
int(param[2]),int(param[3]), int(param[4]), None]
+        data.seq_args = [sequence_file, None, None, param_tmp[1], 
param_tmp[2], param_tmp[3], param_tmp[4], None]

        # Import golbal settings.
        global_settings = ds.relax_gui.global_setting
@@ -606,9 +614,9 @@
                continue

            # Append the relaxation data.
-            data.relax_data.append(['R1', str(frq), float(frq)*1e6, 
files[1], None, None, int(param[1]), int(param[2]), int(param[3]), 
int(param[4]), int(param[5]), int(param[6]), None])
-            data.relax_data.append(['R2', str(frq), float(frq)*1e6, 
files[2], None, None, int(param[1]), int(param[2]), int(param[3]), 
int(param[4]), int(param[5]), int(param[6]), None])
-            data.relax_data.append(['NOE', str(frq), float(frq)*1e6, 
files[0], None, None, int(param[1]), int(param[2]), int(param[3]), 
int(param[4]), int(param[5]), int(param[6]), None])
+            data.relax_data.append(['R1', str(frq), float(frq)*1e6, 
files[1], None, None, param_tmp[1], param_tmp[2], param_tmp[3], 
param_tmp[4], param_tmp[5], param_tmp[6], None])
+            data.relax_data.append(['R2', str(frq), float(frq)*1e6, 
files[2], None, None, param_tmp[1], param_tmp[2], param_tmp[3], 
param_tmp[4], param_tmp[5], param_tmp[6], None])
+            data.relax_data.append(['NOE', str(frq), float(frq)*1e6, 
files[0], None, None, param_tmp[1], param_tmp[2], param_tmp[3], 
param_tmp[4], param_tmp[5], param_tmp[6], None])

        # Unresolved resiudes
        file = DummyFileObject()


_______________________________________________
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 Fri Dec 17 15:40:13 2010