mailr21173 - in /branches/relax_disp: auto_analyses/ test_suite/system_tests/ test_suite/system_tests/scripts/relax_disp/


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

Header


Content

Posted by edward on October 18, 2013 - 12:36:
Author: bugman
Date: Fri Oct 18 12:36:58 2013
New Revision: 21173

URL: http://svn.gna.org/viewcvs/relax?rev=21173&view=rev
Log:
Changed the new dispersion auto-analysis class variable model_class to the 
numeric_only flag.


Modified:
    branches/relax_disp/auto_analyses/relax_disp.py
    branches/relax_disp/test_suite/system_tests/relax_disp.py
    
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_data.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=21173&r1=21172&r2=21173&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Fri Oct 18 12:36:58 2013
@@ -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, modsel='AIC', 
pre_run_dir=None, model_class='mixed', mc_sim_all_models=False):
+    def __init__(self, pipe_name=None, pipe_bundle=None, results_dir=None, 
models=[MODEL_R2EFF], grid_inc=11, mc_sim_num=500, modsel='AIC', 
pre_run_dir=None, numeric_only=False, mc_sim_all_models=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.
@@ -66,8 +66,8 @@
         @type modsel:               str
         @keyword pre_run_dir:       The optional directory containing the 
dispersion auto-analysis results from a previous run.  The optimised 
parameters from these previous results will be used as the starting point for 
optimisation rather than performing a grid search.  This is essential for 
when large spin clusters are specified, as a grid search becomes 
prohibitively expensive with clusters of three or more spins.  At some point 
a RelaxError will occur because the grid search is impossibly large.  For the 
cluster specific parameters, i.e. the populations of the states and the 
exchange parameters, an average value will be used as the starting point.  
For all other parameters, the R20 values for each spin and magnetic field, as 
well as the parameters related to the chemical shift difference dw, the 
optimised values of the previous run will be directly copied.
         @type pre_run_dir:          None or str
-        @keyword model_class:       The class of models to use in the model 
selection.  The default of 'mixed' allows all dispersion models to be used in 
the analysis.  The value of 'numeric' will activate a pure numeric solution - 
the analytic models can be optimised, as they are very useful for replacing 
the grid search for the numeric models, but the final model selection will 
only use the 'No Rex' and numeric solutions exclusively.
-        @type model_class:          str
+        @keyword numeric_only:      The class of models to use in the model 
selection.  The default of False allows all dispersion models to be used in 
the analysis (no exchange, the analytic models and the numeric models).  The 
value of True will activate a pure numeric solution - the analytic models 
will be optimised, as they are very useful for replacing the grid search for 
the numeric models, but the final model selection will not include them.
+        @type numeric_only:         bool
         @keyword mc_sim_all_models: A flag which if True will cause Monte 
Carlo simulations to be performed for each individual model.  Otherwise Monte 
Carlo simulations will be reserved for the final model.
         @type mc_sim_all_models:    bool
         """
@@ -91,6 +91,7 @@
         self.mc_sim_num = mc_sim_num
         self.modsel = modsel
         self.pre_run_dir = pre_run_dir
+        self.numeric_only = numeric_only
         self.mc_sim_all_models = mc_sim_all_models
 
         # No results directory, so default to the current directory.

Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/relax_disp.py?rev=21173&r1=21172&r2=21173&view=diff
==============================================================================
--- branches/relax_disp/test_suite/system_tests/relax_disp.py (original)
+++ branches/relax_disp/test_suite/system_tests/relax_disp.py Fri Oct 18 
12:36:58 2013
@@ -487,7 +487,7 @@
             MODEL_CR72,
             MODEL_NS_CPMG_2SITE_EXPANDED
         ]
-        ds.numeric_flag = True
+        ds.numeric_only = True
 
         # Execute the script.
         self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'hansen_data.py')

Modified: 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_data.py?rev=21173&r1=21172&r2=21173&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_data.py 
(original)
+++ 
branches/relax_disp/test_suite/system_tests/scripts/relax_disp/hansen_data.py 
Fri Oct 18 12:36:58 2013
@@ -19,10 +19,8 @@
     ds.tmpdir = 'temp'
 
 # The numeric flag.
-if hasattr(ds, 'numeric_flag') and ds.numeric_flag:
-    model_class = 'numeric'
-else:
-    model_class = 'mixed'
+if not hasattr(ds, 'numeric_flag'):
+    ds.numeric_only = False
 
 # The grid search size (the number of increments per dimension).
 GRID_INC = 5
@@ -60,7 +58,4 @@
 Relax_disp.opt_max_iterations = 10000
 
 # Do not change!
-Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
results_dir=ds.tmpdir, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, 
model_class=model_class)
-
-# Save the program state.
-state.save('devnull', force=True)
+Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
results_dir=ds.tmpdir, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, 
numeric_only=ds.numeric_only)




Related Messages


Powered by MHonArc, Updated Fri Oct 18 12:40:02 2013