mailr21284 - /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 October 28, 2013 - 16:05:
Author: bugman
Date: Mon Oct 28 16:05:05 2013
New Revision: 21284

URL: http://svn.gna.org/viewcvs/relax?rev=21284&view=rev
Log:
The relaxation dispersion auto-analysis now accepts the 'insignificance' 
argument.

This is then used in the relax_disp.insignificance user function prior to the 
optimisation of each
model, so that spins with insignificant dispersion curves are not optimised.  
The 'R2eff' and
'No Rex' models are skipped for obvious reasons.


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=21284&r1=21283&r2=21284&view=diff
==============================================================================
--- branches/relax_disp/auto_analyses/relax_disp.py (original)
+++ branches/relax_disp/auto_analyses/relax_disp.py Mon Oct 28 16:05:05 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, numeric_only=False, 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, insignificance=0.0, 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,6 +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 insignificance:    The R2eff/R1rho value in rad/s by which 
to judge insignificance.  If the maximum difference between two points on all 
dispersion curves for a spin is less than this value, that spin will be 
deselected.
+        @type insignificance:       float
         @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.
@@ -91,6 +93,7 @@
         self.mc_sim_num = mc_sim_num
         self.modsel = modsel
         self.pre_run_dir = pre_run_dir
+        self.insignificance = insignificance
         self.numeric_only = numeric_only
         self.mc_sim_all_models = mc_sim_all_models
 
@@ -273,6 +276,10 @@
         @type model:    str
         """
 
+        # Deselect insignificant spins.
+        if model not in ['R2eff', 'No Rex']:
+            
self.interpreter.relax_disp.insignificance(level=self.insignificance)
+
         # 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 Mon Oct 28 16:20:02 2013