mailr3355 - /1.3/sample_scripts/full_analysis.py


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

Header


Content

Posted by edward on August 30, 2007 - 10:42:
Author: bugman
Date: Thu Aug 30 10:41:32 2007
New Revision: 3355

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

This bug was reported by Douglas Kojetin <douglas dot kojetin at gmail dot 
com>, and was first
discussed in the post 
https://mail.gna.org/public/relax-users/2007-08/msg00008.html (Message-id:
<1E05882B-96B3-4875-B11B-0A6FEF423937@xxxxxxxxx>).

The fix was to simply test for the presence of the data structures.  If these 
spin system specific
structures - 'model' and 'params' - were missing, then the bug will arise.


Modified:
    1.3/sample_scripts/full_analysis.py

Modified: 1.3/sample_scripts/full_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/full_analysis.py?rev=3355&r1=3354&r2=3355&view=diff
==============================================================================
--- 1.3/sample_scripts/full_analysis.py (original)
+++ 1.3/sample_scripts/full_analysis.py Thu Aug 30 10:41:32 2007
@@ -366,12 +366,14 @@
         # Create a string representation of the model-free models of the 
previous run.
         prev_models = ''
         for i in xrange(len(relax_data_store.res['previous'])):
-            prev_models = prev_models + 
relax_data_store.res['previous'][i].model
+            if hasattr(relax_data_store.res['previous'][i], 'model'):
+                prev_models = prev_models + 
relax_data_store.res['previous'][i].model
 
         # Create a string representation of the model-free models of the 
current run.
         curr_models = ''
         for i in xrange(len(relax_data_store.res[run])):
-            curr_models = curr_models + relax_data_store.res[run][i].model
+            if hasattr(relax_data_store.res[run][i], 'model'):
+                curr_models = curr_models + 
relax_data_store.res[run][i].model
 
         # The test.
         if prev_models == curr_models:
@@ -418,6 +420,10 @@
                     if not params_converged:
                         break
 
+                    # Skip spin systems with no 'params' object.
+                    if not hasattr(relax_data_store.res['previous'][i], 
'params') or not hasattr(relax_data_store.res[run][i], 'params'):
+                        continue
+
                     # Loop over the parameters.
                     for j in 
xrange(len(relax_data_store.res[run][i].params)):
                         # Get the parameter values.




Related Messages


Powered by MHonArc, Updated Thu Aug 30 11:00:05 2007