mailr2581 - in /1.2: 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 September 27, 2006 - 08:20:
Author: bugman
Date: Wed Sep 27 08:19:29 2006
New Revision: 2581

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

This bug was reported by Alex Hansen (viochemist_at_gmail_dot_com) and was
originally described at:
https://mail.gna.org/public/relax-users/2006-09/msg00026.html
(Message-id: <481156b20609251426r4a74f9f1p8fcf564354e61892@xxxxxxxxxxxxxx>).

In addition to the fix of not skipping unselected residues described at
https://mail.gna.org/public/relax-devel/2006-09/msg00018.html
(Message-id: <7f080ed10609261109p2c7229e4ie02a894ac110dc3a@xxxxxxxxxxxxxx>), I
have also added code to the 'self.num_instances()' model-free function to 
catch
the situation of 'self.determine_param_set_type()' returning None.  If this
occurs, RelaxFault is raised!


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

Modified: 1.2/generic_fns/model_selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/generic_fns/model_selection.py?rev=2581&r1=2580&r2=2581&view=diff
==============================================================================
--- 1.2/generic_fns/model_selection.py (original)
+++ 1.2/generic_fns/model_selection.py Wed Sep 27 08:19:29 2006
@@ -148,6 +148,7 @@
                     if num < self.min_instances:
                         self.min_instances = num
 
+            # All other model selection techniques.
             else:
                 # Number of instances.
                 num = self.count_num_instances[self.runs[i]](self.runs[i])

Modified: 1.2/specific_fns/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/1.2/specific_fns/model_free.py?rev=2581&r1=2580&r2=2581&view=diff
==============================================================================
--- 1.2/specific_fns/model_free.py (original)
+++ 1.2/specific_fns/model_free.py Wed Sep 27 08:19:29 2006
@@ -1017,8 +1017,9 @@
         local_tm = 0
         for i in xrange(len(self.relax.data.res[self.run])):
             # Skip unselected residues.
-            if not self.relax.data.res[self.run][i].select:
-                continue
+            # This code causes a bug after model elimination if the model 
has been eliminated (select = 0).
+            #if not self.relax.data.res[self.run][i].select:
+            #    continue
 
             # No params.
             if not hasattr(self.relax.data.res[self.run][i], 'params'):
@@ -2588,6 +2589,10 @@
         # Other data.
         elif self.param_set == 'diff' or self.param_set == 'all':
             return 1
+
+        # Should not be here.
+        else:
+            raise RelaxFault
 
 
     def overfit_deselect(self, run):




Related Messages


Powered by MHonArc, Updated Sat Sep 30 06:40:12 2006