mailr7504 - /1.3/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on October 05, 2008 - 11:42:
Author: bugman
Date: Sun Oct  5 11:42:12 2008
New Revision: 7504

URL: http://svn.gna.org/viewcvs/relax?rev=7504&view=rev
Log:
Completed the fix for bug #12407 (https://gna.org/bugs/index.php?12407).

This latest problem was caused by the use of the wrong Boolean operator in 
the model-free
eliminate() method.  The method has also been converted to return the 
Booleans True or False.


Modified:
    1.3/specific_fns/model_free/main.py

Modified: 1.3/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=7504&r1=7503&r2=7504&view=diff
==============================================================================
--- 1.3/specific_fns/model_free/main.py (original)
+++ 1.3/specific_fns/model_free/main.py Sun Oct  5 11:42:12 2008
@@ -1178,6 +1178,9 @@
         """
         __docformat__ = "plaintext"
 
+        # Alias the current data pipe.
+        cdp = pipes.get_pipe()
+
         # Default values.
         c1 = 50.0 * 1e-9
         c2 = 1.5
@@ -1190,7 +1193,7 @@
         model_type = self.determine_model_type()
 
         # Can't handle this one yet!
-        if model_type != 'mf' or model_type != 'local_tm':
+        if model_type != 'mf' and model_type != 'local_tm':
             raise RelaxError, "Elimination of the global model is not yet 
supported."
 
         # Get the spin and it's id string.
@@ -1205,15 +1208,15 @@
         # Local tm.
         if name == 'local_tm' and value >= c1:
             print "The local tm parameter of " + `value` + " is greater than 
" + `c1` + ", eliminating spin system " + `spin_id` + "."
-            return 1
+            return True
 
         # Internal correlation times.
         if match('t[efs]', name) and value >= c2 * tm:
             print "The " + name + " value of " + `value` + " is greater than 
" + `c2 * tm` + ", eliminating spin system " + `spin_id` + "."
-            return 1
+            return True
 
         # Accept model.
-        return 0
+        return False
 
 
     def get_param_names(self, model_index=None):




Related Messages


Powered by MHonArc, Updated Sun Oct 05 12:20:02 2008