mailr22567 - in /branches/double_rotor: ./ 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 March 27, 2014 - 16:50:
Author: bugman
Date: Thu Mar 27 16:50:01 2014
New Revision: 22567

URL: http://svn.gna.org/viewcvs/relax?rev=22567&view=rev
Log:
Merged revisions 22565-22566 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r22565 | bugman | 2014-03-27 16:46:45 +0100 (Thu, 27 Mar 2014) | 10 lines
  
  Added the new exp_mc_sim_num argument to the relaxation dispersion 
auto-analysis.
  
  This is in preparation for fixing bug #21869 (https://gna.org/bugs/?21869).
  
  This argument allows for a different number of Monte Carlo simulations for 
the 'R2eff' model when
  exponential curves are fit.  It will mainly be useful in the test suite to 
improve the accuracy of
  the R2eff errors, while still running a low number of simulations for the 
other models to allow
  optimisation to be quick.
........
  r22566 | bugman | 2014-03-27 16:49:30 +0100 (Thu, 27 Mar 2014) | 9 lines
  
  Modifications to the Relax_disp.test_m61_exp_data_to_m61 system test.
  
  This is to fix bug #21869 (https://gna.org/bugs/?21869), the failure of 
this system test.
  
  The number of Monte Carlo simulation for the 'R2eff' model has been 
increased from 3 to 25 using the
  new exp_mc_sim_num argument to the dispersion auto-analysis.  To keep the 
test fast, only a single
  spin is optimised.
........

Modified:
    branches/double_rotor/   (props changed)
    branches/double_rotor/auto_analyses/relax_disp.py
    branches/double_rotor/test_suite/system_tests/relax_disp.py
    
branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py

Propchange: branches/double_rotor/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 27 16:50:01 2014
@@ -1 +1 @@
-/trunk:1-22563
+/trunk:1-22566

Modified: branches/double_rotor/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/auto_analyses/relax_disp.py?rev=22567&r1=22566&r2=22567&view=diff
==============================================================================
--- branches/double_rotor/auto_analyses/relax_disp.py   (original)
+++ branches/double_rotor/auto_analyses/relax_disp.py   Thu Mar 27 16:50:01 
2014
@@ -48,7 +48,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, 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):
         """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.
@@ -63,6 +63,9 @@
         @type grid_inc:             int
         @keyword mc_sim_num:        The number of Monte Carlo simulations to 
be used for error analysis at the end of the analysis.
         @type mc_sim_num:           int
+        @keyword exp_mc_sim_num:    The number of Monte Carlo simulations 
for the error analysis in the 'R2eff' model when exponential curves are 
fitted.  This defaults to the value of the mc_sim_num argument when not 
given.  For the 2-point fixed-time calculation for the 'R2eff' model, this 
argument is ignored.
+        @type exp_mc_sim_num:       int or None
+        @type
         @keyword modsel:            The model selection technique to use in 
the analysis to determine which model is the best for each spin cluster.  
This can currently be one of 'AIC', 'AICc', and 'BIC'.
         @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.
@@ -94,6 +97,7 @@
         self.models = models
         self.grid_inc = grid_inc
         self.mc_sim_num = mc_sim_num
+        self.exp_mc_sim_num = exp_mc_sim_num
         self.modsel = modsel
         self.pre_run_dir = pre_run_dir
         self.insignificance = insignificance
@@ -375,7 +379,10 @@
 
         # Monte Carlo simulations.
         if self.mc_sim_all_models or len(self.models) < 2 or model == 
'R2eff':
-            self.interpreter.monte_carlo.setup(number=self.mc_sim_num)
+            if model == 'R2eff' and self.exp_mc_sim_num != None:
+                
self.interpreter.monte_carlo.setup(number=self.exp_mc_sim_num)
+            else:
+                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', func_tol=self.opt_func_tol, 
max_iter=self.opt_max_iterations, constraints=True)

Modified: branches/double_rotor/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/relax_disp.py?rev=22567&r1=22566&r2=22567&view=diff
==============================================================================
--- branches/double_rotor/test_suite/system_tests/relax_disp.py (original)
+++ branches/double_rotor/test_suite/system_tests/relax_disp.py Thu Mar 27 
16:50:01 2014
@@ -2421,6 +2421,9 @@
         # Fixed time variable.
         ds.fixed = False
 
+        # Single spin optimisation.
+        ds.single = True
+
         # Execute the script.
         self.interpreter.run(script_file=status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_disp'+sep+'r1rho_on_res_m61.py')
 

Modified: 
branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py?rev=22567&r1=22566&r2=22567&view=diff
==============================================================================
--- 
branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py
        (original)
+++ 
branches/double_rotor/test_suite/system_tests/scripts/relax_disp/r1rho_on_res_m61.py
        Thu Mar 27 16:50:01 2014
@@ -22,6 +22,9 @@
 # The number of Monte Carlo simulations to be used for error analysis at the 
end of the analysis.
 MC_NUM = 3
 
+# The number of MC sims for the exponential curves of the 'R2eff' model.
+EXP_MC_NUM = 25
+
 # Fixed relaxation time period flag.
 if not hasattr(ds, 'fixed'):
     ds.fixed = True
@@ -44,7 +47,8 @@
 
 # Create the sequence data.
 spin.create(res_name='Trp', res_num=1, spin_name='N')
-spin.create(res_name='Trp', res_num=2, spin_name='N')
+if not hasattr(ds, 'single') or not ds.single:
+    spin.create(res_name='Trp', res_num=2, spin_name='N')
 
 # Set the isotope information.
 spin.isotope(isotope='15N')
@@ -113,7 +117,7 @@
 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)
+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, 
exp_mc_sim_num=EXP_MC_NUM)
 
 # Save the program state.
 state.save('devnull', force=True)




Related Messages


Powered by MHonArc, Updated Thu Mar 27 17:40:02 2014