mailr26285 - /trunk/auto_analyses/dauvergne_protocol.py


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

Header


Content

Posted by edward on October 15, 2014 - 13:02:
Author: bugman
Date: Wed Oct 15 13:02:27 2014
New Revision: 26285

URL: http://svn.gna.org/viewcvs/relax?rev=26285&view=rev
Log:
Added printouts to the determine_rnd() function of the dauvergne_protocol 
model-free auto-analysis.

This is for better user feedback in the log files as to what is happening.  
It may help in debugging
bug #22730 (https://gna.org/bugs/?22730): Model-free auto-analysis - relax 
stops and quits at the
polate step.


Modified:
    trunk/auto_analyses/dauvergne_protocol.py

Modified: trunk/auto_analyses/dauvergne_protocol.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/dauvergne_protocol.py?rev=26285&r1=26284&r2=26285&view=diff
==============================================================================
--- trunk/auto_analyses/dauvergne_protocol.py   (original)
+++ trunk/auto_analyses/dauvergne_protocol.py   Wed Oct 15 13:02:27 2014
@@ -25,6 +25,7 @@
 from os.path import isdir
 from re import search
 from time import sleep
+import sys
 
 # relax module imports.
 from lib.float import floatAsByteArray
@@ -498,12 +499,16 @@
         # The base model directory.
         base_dir = self.results_dir+sep+model
 
+        # Printout.
+        sys.stdout.write("\n\nDetermining the next round of optimisation for 
'%s':  " % base_dir)
+
         # Catch if a file exists with the name of the directory.
         if not isdir(base_dir) and access(base_dir, F_OK):
             raise RelaxError("The base model directory '%s' is not usable as 
a file with the same name already exists." % base_dir)
 
         # If no directory exists, set the round to 'init' or 0.
         if not isdir(base_dir):
+            sys.stdout.write(" 0.\n\n")
             return 0
 
         # Is the directory readable, writable, and executable.
@@ -519,6 +524,7 @@
 
         # Set the round to 'init' or 0 if there is no directory called 
'init'.
         if 'init' not in dir_list:
+            sys.stdout.write(" 0.\n\n")
             return 0
 
         # Create a list of all files which begin with 'round_'.
@@ -538,6 +544,7 @@
 
         # No directories beginning with 'round_' exist, set the round to 1.
         if not len(numbers):
+            sys.stdout.write(" 1.\n\n")
             return 1
 
         # The highest number.
@@ -561,9 +568,11 @@
 
         # No round, so assume the initial state.
         if complete_round == 0:
+            sys.stdout.write(" 0.\n\n")
             return 0
 
         # Determine the number for the next round (add 1 to the highest 
completed round).
+        sys.stdout.write(" %i.\n\n" % complete_round + 1)
         return complete_round + 1
 
 




Related Messages


Powered by MHonArc, Updated Wed Oct 15 13:20:02 2014