mailr3293 - /1.2/specific_fns/model_free.py


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

Header


Content

Posted by edward on May 09, 2007 - 00:59:
Author: bugman
Date: Wed May  9 00:59:17 2007
New Revision: 3293

URL: http://svn.gna.org/viewcvs/relax?rev=3293&view=rev
Log:
Bug fix.

The reading of model-free results files was failing for residues with the 
parameters vector of None
(as well as the parameter set set to None and the model-free equation set to 
None).  This situation
occurs after model selection when the residue is deselected.


Modified:
    1.2/specific_fns/model_free.py

Modified: 1.2/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/model_free.py?rev=3293&r1=3292&r2=3293&view=diff
==============================================================================
--- 1.2/specific_fns/model_free.py (original)
+++ 1.2/specific_fns/model_free.py Wed May  9 00:59:17 2007
@@ -2484,9 +2484,10 @@
         """Function for updating various data structures depending on the 
model selected."""
 
         # Test that no diffusion tensor exists for the run if local tm is a 
parameter in the model.
-        for param in params:
-            if param == 'local_tm' and self.relax.data.diff.has_key(run):
-                raise RelaxTensorError, run
+        if params:
+            for param in params:
+                if param == 'local_tm' and self.relax.data.diff.has_key(run):
+                    raise RelaxTensorError, run
 
         # Loop over the sequence.
         for i in xrange(len(self.relax.data.res[run])):
@@ -2498,9 +2499,12 @@
             self.data_init(self.relax.data.res[run][i])
 
             # Model-free model, equation, and parameter types.
-            self.relax.data.res[run][i].model = model
-            self.relax.data.res[run][i].equation = equation
-            self.relax.data.res[run][i].params = params
+            if model:
+                self.relax.data.res[run][i].model = model
+            if equation:
+                self.relax.data.res[run][i].equation = equation
+            if params:
+                self.relax.data.res[run][i].params = params
 
 
     def model_statistics(self, run=None, instance=None, global_stats=None):
@@ -2942,9 +2946,10 @@
             params = eval(self.file_line[self.col['params']])
 
             # Fix for the 1.2 relax versions whereby the parameter 'tm' was 
renamed to 'local_tm' (which occurred in version 1.2.5).
-            for i in xrange(len(params)):
-                if params[i] == 'tm':
-                    params[i] = 'local_tm'
+            if params:
+                for i in xrange(len(params)):
+                    if params[i] == 'tm':
+                        params[i] = 'local_tm'
 
             # Set up the model-free model.
             if model and equation:




Related Messages


Powered by MHonArc, Updated Wed May 09 01:20:07 2007