mailr22859 - /trunk/auto_analyses/relax_disp.py


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

Header


Content

Posted by tlinnet on April 25, 2014 - 19:15:
Author: tlinnet
Date: Fri Apr 25 19:15:27 2014
New Revision: 22859

URL: http://svn.gna.org/viewcvs/relax?rev=22859&view=rev
Log:
Added relax_disp.set_grid_r20_from_min_r2eff functionality to relax disp 
auto_analyses.

Feature request: #3151, (https://gna.org/support/index.php?3151) - User 
function to set the R20 parameters in the default grid search using the 
minimum R2eff value.

Modified:
    trunk/auto_analyses/relax_disp.py

Modified: trunk/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22859&r1=22858&r2=22859&view=diff
==============================================================================
--- trunk/auto_analyses/relax_disp.py   (original)
+++ trunk/auto_analyses/relax_disp.py   Fri Apr 25 19:15:27 2014
@@ -47,7 +47,7 @@
     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, exp_mc_sim_num=None, 
modsel='AIC', pre_run_dir=None, insignificance=0.0, numeric_only=False, 
mc_sim_all_models=False, eliminate=True):
+    def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None, 
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, exp_mc_sim_num=None, 
modsel='AIC', pre_run_dir=None, insignificance=0.0, numeric_only=False, 
mc_sim_all_models=False, eliminate=True, set_grid_r20=False):
         """Perform a full relaxation dispersion analysis for the given list 
of models.
 
         @keyword pipe_name:         The name of the data pipe containing all 
of the data for the analysis.
@@ -77,6 +77,8 @@
         @type mc_sim_all_models:    bool
         @keyword eliminate:         A flag which if True will enable the 
elimination of failed models and failed Monte Carlo simulations through the 
eliminate user function.
         @type eliminate:            bool
+        @keyword set_grid_r20:      A flag which if True will set the grid 
R20 values from the minimum R2eff values through the 
set_grid_r20_from_min_r2eff user function. This will speed up the grid search 
with a factor GRID_INC^(Nr_spec_freq). For a CPMG experiment with two fields 
and standard GRID_INC=21, the speed-up is a factor 441.
+        @type set_grid_r20:         bool
         """
 
         # Printout.
@@ -100,6 +102,7 @@
         self.modsel = modsel
         self.pre_run_dir = pre_run_dir
         self.insignificance = insignificance
+        self.set_grid_r20 = set_grid_r20
         self.numeric_only = numeric_only
         self.mc_sim_all_models = mc_sim_all_models
         self.eliminate = eliminate
@@ -356,6 +359,10 @@
         if model not in ['R2eff', 'No Rex']:
             
self.interpreter.relax_disp.insignificance(level=self.insignificance)
 
+        # Speed-up grid-search by using minium R2eff value.
+        if self.set_grid_r20 and model != MODEL_R2EFF:
+            
self.interpreter.relax_disp.set_grid_r20_from_min_r2eff(force=True)
+
         # Use pre-run results as the optimisation starting point.
         if self.pre_run_dir:
             self.pre_run_parameters(model=model)




Related Messages


Powered by MHonArc, Updated Fri Apr 25 19:20:02 2014