mailr19782 - /branches/relax_disp/auto_analyses/relax_disp.py


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

Header


Content

Posted by edward on May 30, 2013 - 11:42:
Author: bugman
Date: Thu May 30 11:42:57 2013
New Revision: 19782

URL: http://svn.gna.org/viewcvs/relax?rev=19782&view=rev
Log:
Two class variables have been added to the dispersion auto-analysis for fast 
optimisation.

This includes variables for the function tolerance and maximum number of 
iterations, and matches
those of the model-free auto-analysis of the dauvergne_protocol module.  
These will be used to
speed up the test suite.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py

Modified: branches/relax_disp/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=19782&r1=19781&r2=19782&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Thu May 30 11:42:57 2013
@@ -36,6 +36,12 @@
 
 
 class Relax_disp:
+    """The relaxation dispersion auto-analysis."""
+
+    # Some class variables.
+    opt_func_tol = 1e-25
+    opt_max_iterations = int(1e7)
+
     def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None, 
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, bootstrap_sim_num=100000):
         """Perform a full relaxation dispersion analysis for the given list 
of models.
 
@@ -157,13 +163,13 @@
         self.interpreter.grid_search(inc=self.grid_inc)
 
         # Minimise.
-        self.interpreter.minimise('simplex', constraints=True)
+        self.interpreter.minimise('simplex', func_tol=self.opt_func_tol, 
max_iter=self.opt_max_iterations, constraints=True)
 
         # Monte Carlo simulations.
         self.interpreter.monte_carlo.setup(number=self.mc_sim_num)
         self.interpreter.monte_carlo.create_data()
         self.interpreter.monte_carlo.initial_values()
-        self.interpreter.minimise('simplex', constraints=True)
+        self.interpreter.minimise('simplex', func_tol=self.opt_func_tol, 
max_iter=self.opt_max_iterations, constraints=True)
         self.interpreter.monte_carlo.error_analysis()
 
 




Related Messages


Powered by MHonArc, Updated Thu May 30 12:00:02 2013