mailr10939 - in /1.3: auto_analyses/dauvergne_protocol.py status.py


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

Header


Content

Posted by edward on February 25, 2010 - 14:37:
Author: bugman
Date: Thu Feb 25 14:37:11 2010
New Revision: 10939

URL: http://svn.gna.org/viewcvs/relax?rev=10939&view=rev
Log:
All of the relevant status information about the dAuvergne_protocol 
auto-analysis is being stored.

This includes:
    status.dAuvergne_protocol.diff_model = None        # The global diffusion 
model.
    status.dAuvergne_protocol.round = None             # The round of 
optimisation, i.e. the global iteration.
    status.dAuvergne_protocol.mf_models = None         # The list of 
model-free models for optimisation, i.e. the global iteration.
    status.dAuvergne_protocol.local_mf_models = None   # The list of 
model-free local tm models for optimisation, i.e. the global iteration.
    status.dAuvergne_protocol.current_model = None     # The current 
model-free model.
    status.dAuvergne_protocol.convergence = False      # The convergence of 
the global model.


Modified:
    1.3/auto_analyses/dauvergne_protocol.py
    1.3/status.py

Modified: 1.3/auto_analyses/dauvergne_protocol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/auto_analyses/dauvergne_protocol.py?rev=10939&r1=10938&r2=10939&view=diff
==============================================================================
--- 1.3/auto_analyses/dauvergne_protocol.py (original)
+++ 1.3/auto_analyses/dauvergne_protocol.py Thu Feb 25 14:37:11 2010
@@ -150,6 +150,7 @@
 from generic_fns import pipes
 from prompt.interpreter import Interpreter
 from relax_errors import RelaxError
+from status import Status
 
 
 
@@ -217,6 +218,12 @@
         # User variable checks.
         self.check_vars()
 
+        # Initialise the status.
+        self.status = Status()
+        self.status.dAuvergne_protocol.diff_model = diff_model
+        self.status.dAuvergne_protocol.mf_models = mf_models
+        self.status.dAuvergne_protocol.local_mf_models = local_mf_models
+
         # Load the interpreter.
         self.interpreter = Interpreter(show_script=False, quit=False, 
raise_relax_error=True)
         self.interpreter.populate_self()
@@ -251,6 +258,7 @@
             while True:
                 # Determine which round of optimisation to do (init, 
round_1, round_2, etc).
                 self.round = self.determine_rnd(model=self.diff_model)
+                self.status.dAuvergne_protocol.round = self.round
 
                 # Inital round of optimisation for diffusion models MII to 
MV.
                 if self.round == 0:
@@ -336,6 +344,9 @@
                     if converged or not self.conv_loop:
                         break
 
+                # Unset the status.
+                self.status.dAuvergne_protocol.round = None
+
 
         # Final run.
         ############
@@ -405,6 +416,11 @@
 
         else:
             raise RelaxError("Unknown diffusion model, change the value of 
'self.diff_model'")
+
+        # Unset the status info.
+        self.status.dAuvergne_protocol.diff_model = None
+        self.status.dAuvergne_protocol.mf_models = None
+        self.status.dAuvergne_protocol.local_mf_models = None
 
 
     def check_vars(self):
@@ -648,10 +664,19 @@
 
         print("\nConvergence:")
         if chi2_converged and models_converged and params_converged:
+            # Update the status.
+            self.status.dAuvergne_protocol.convergence = True
+
+            # Print out.
             print("    [ Yes ]")
+
+            # Return the termination condition.
             return True
         else:
+            # Print out.
             print("    [ No ]")
+
+            # Return False to not terminate.
             return False
 
 
@@ -736,6 +761,9 @@
 
         # Loop over the data pipes.
         for name in self.pipes:
+            # Place the model name into the status container.
+            self.status.dAuvergne_protocol.current_model = name
+
             # Create the data pipe.
             if pipes.has_pipe(name):
                 self.interpreter.pipe.delete(name)
@@ -784,3 +812,6 @@
             # Write the results.
             dir = self.base_dir + name
             self.interpreter.results.write(file='results', dir=dir, 
force=True)
+
+        # Unset the status.
+        self.status.dAuvergne_protocol.current_model = None

Modified: 1.3/status.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/status.py?rev=10939&r1=10938&r2=10939&view=diff
==============================================================================
--- 1.3/status.py (original)
+++ 1.3/status.py Thu Feb 25 14:37:11 2010
@@ -37,6 +37,15 @@
         # The Monte Carlo simulation status.
         self.mc_number = None
 
+        # The dAuvergne_protocol automatic analysis status.
+        self.dAuvergne_protocol = Status_container()
+        self.dAuvergne_protocol.diff_model = None        # The global 
diffusion model.
+        self.dAuvergne_protocol.round = None             # The round of 
optimisation, i.e. the global iteration.
+        self.dAuvergne_protocol.mf_models = None         # The list of 
model-free models for optimisation, i.e. the global iteration.
+        self.dAuvergne_protocol.local_mf_models = None   # The list of 
model-free local tm models for optimisation, i.e. the global iteration.
+        self.dAuvergne_protocol.current_model = None     # The current 
model-free model.
+        self.dAuvergne_protocol.convergence = False      # The convergence 
of the global model.
+
 
     def __new__(self, *args, **kargs):
         """Replacement method for implementing the singleton design 
pattern."""




Related Messages


Powered by MHonArc, Updated Thu Feb 25 15:00:05 2010