mailr2891 - in /1.3: generic_fns/model_selection.py 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 November 30, 2006 - 09:01:
Author: bugman
Date: Thu Nov 30 09:01:16 2006
New Revision: 2891

URL: http://svn.gna.org/viewcvs/relax?rev=2891&view=rev
Log:
Fix for bug #7875 (https://gna.org/bugs/index.php?7875).

This bug was reported by Sebastien Morin (https://gna.org/users/semor).

The problem was that the 'model_selection()' user function was incorrectly 
copying the data into the
model selection run when the local tm global diffusion model was selected 
over the sphere, spheroid,
ellipsoid, etc.  The local tm global diffusion model was being treated as a 
single spin system model
by the 'self.duplicate_data()' function of 'specific_fns/model_free.py' and 
hence only the data from
the first spin was being duplicated.  By passing the 'global_data' flag in 
from the model selection
code, the data duplication function is now acting correctly.


Modified:
    1.3/generic_fns/model_selection.py
    1.3/specific_fns/model_free.py

Modified: 1.3/generic_fns/model_selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/model_selection.py?rev=2891&r1=2890&r2=2891&view=diff
==============================================================================
--- 1.3/generic_fns/model_selection.py (original)
+++ 1.3/generic_fns/model_selection.py Thu Nov 30 09:01:16 2006
@@ -236,7 +236,7 @@
 
             # Duplicate the data from the 'best_model' to the model 
selection run 'modsel_run'.
             if best_model != None:
-                self.duplicate_data[best_model](new_run=modsel_run, 
old_run=best_model, instance=i)
+                self.duplicate_data[best_model](new_run=modsel_run, 
old_run=best_model, instance=i, global_stats=global_stats)
 
 
     def aic(self, chi2, k, n):

Modified: 1.3/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free.py?rev=2891&r1=2890&r2=2891&view=diff
==============================================================================
--- 1.3/specific_fns/model_free.py (original)
+++ 1.3/specific_fns/model_free.py Thu Nov 30 09:01:16 2006
@@ -1303,7 +1303,7 @@
                             data.s2s_sim[sim_index] = data.s2_sim[sim_index] 
/ data.s2f_sim[sim_index]
 
 
-    def duplicate_data(self, new_run=None, old_run=None, instance=None):
+    def duplicate_data(self, new_run=None, old_run=None, instance=None, 
global_stats=0):
         """Function for duplicating data."""
 
         # self.run for determining the parameter set.
@@ -1341,7 +1341,7 @@
         self.param_set = self.determine_param_set_type()
 
         # Sequence specific data.
-        if self.param_set == 'mf' or self.param_set == 'local_tm':
+        if self.param_set == 'mf' or (self.param_set == 'local_tm' and not 
global_stats):
             # Create the sequence data if it does not exist.
             if not self.relax.data.res.has_key(new_run) or not 
len(self.relax.data.res[new_run]):
                 # Add the new run to 'self.relax.data.res'.
@@ -1361,7 +1361,7 @@
             self.relax.data.res[new_run][instance] = 
deepcopy(self.relax.data.res[old_run][instance])
 
         # Other data types.
-        elif self.param_set == 'diff' or self.param_set == 'all':
+        else:
             # Duplicate the residue specific data.
             self.relax.data.res[new_run] = 
deepcopy(self.relax.data.res[old_run])
 




Related Messages


Powered by MHonArc, Updated Thu Nov 30 09:20:05 2006