mailr25062 - /trunk/specific_analyses/relax_disp/model.py


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

Header


Content

Posted by tlinnet on August 19, 2014 - 09:39:
Author: tlinnet
Date: Tue Aug 19 09:39:58 2014
New Revision: 25062

URL: http://svn.gna.org/viewcvs/relax?rev=25062&view=rev
Log:
Reverted r25061 and 425060 as this functionality should be re-written.

The command used was:
svn merge -r25061:r25059 .

........
    r25061 | tlinnet | 2014-08-18 19:39:27 +0200 (Mon, 18 Aug 2014) | 1 line

    Removed that any off-resonance R1rho models will learn 'dw' from DPL94.
........
    r25060 | tlinnet | 2014-08-18 19:37:26 +0200 (Mon, 18 Aug 2014) | 25 lines

    Removed special cases for nesting.

    Now following order is determined.

    Firs sort completed models into:
    EQ_NUMERIC, EQ_SILICO, EQ_ANALYTIC

    Then into year, with newest first.
    Then number of chemical sites, which reflects number of parameters.

    Go through the completed models.

    If the experiment types are the same.
    Then look for:

    If a completed model has same parameters, then nest from this.
    If a completed model has all other parameters than R20 parameters, then 
nest from this.

    Special cases are taken care of by:
    - MODEL_LM63_3SITE from MODEL_LM63
    - MODEL_NS_MMQ_3SITE, MODEL_NS_MMQ_3SITE_LINEAR from MODEL_NS_MMQ_2SITE.
    - MODEL_NS_R1RHO_3SITE, MODEL_NS_R1RHO_3SITE_LINEAR from 
MODEL_NS_R1RHO_2SITE.
    - MODEL_MMQ_CR72 from MODEL_CR72.

    This functionality represents the hard-coding from previous 
implementation.
........

Modified:
    trunk/specific_analyses/relax_disp/model.py

Modified: trunk/specific_analyses/relax_disp/model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/model.py?rev=25062&r1=25061&r2=25062&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/model.py (original)
+++ trunk/specific_analyses/relax_disp/model.py Tue Aug 19 09:39:58 2014
@@ -191,6 +191,38 @@
             if part_compa_model_params == part_model_params:
                 return model_info, compa_model
 
+        # Loop over the list of comparable models, if the parameters are 
part of the more complex model, return that as nested model.
+        for compa_model in compa_models:
+            # If the params list are within the parameter list, then return 
that model.
+            param_in = False
+
+            # Loop over the parameters.
+            for param in compa_model.params:
+                if param in model_info.params:
+                    param_in = True
+
+                # Special situation, where 'kex' can still be nested from 
DPL94 model.
+                elif param == 'phi_ex' and compa_model.model in 
MODEL_LIST_R1RHO_W_R1_ONLY + MODEL_LIST_R1RHO_FIT_R1_ONLY and model in 
MODEL_LIST_R1RHO_W_R1_ONLY + MODEL_LIST_R1RHO_FIT_R1_ONLY:
+                    continue
+
+                # Special situation, where 'kex' can still be nested from 
LM63 model.
+                elif param == 'phi_ex' and compa_model.model in 
MODEL_LIST_ANALYTIC_CPMG + MODEL_LIST_NUMERIC_CPMG and model in 
MODEL_LIST_ANALYTIC_CPMG + MODEL_LIST_NUMERIC_CPMG:
+                    continue
+
+                # Special situation, where 'kex'=1/tex can still be nested 
from IT99 model.
+                elif param == 'tex' and compa_model.model in 
MODEL_LIST_ANALYTIC_CPMG + MODEL_LIST_NUMERIC_CPMG and model in 
MODEL_LIST_ANALYTIC_CPMG + MODEL_LIST_NUMERIC_CPMG:
+                    continue
+
+                # Else break out of the loop.
+                else:
+                    # Break the for loop, if not found.
+                    param_in = False
+                    break
+
+            # If all parameters are found in the more complex model.
+            if param_in:
+                return model_info, compa_model
+
         # Special case for LM63
         if model == MODEL_LM63_3SITE:
             # Loop over the models.
@@ -213,6 +245,22 @@
             for compa_model in compa_models:
                 # If one of the comparable models is MODEL_NS_MMQ_2SITE, 
return this.
                 if compa_model.model == MODEL_NS_R1RHO_2SITE:
+                    return model_info, compa_model
+
+        # Special case for DPL94.
+        elif model in [MODEL_DPL94, MODEL_DPL94_FIT_R1]:
+            # Loop over the models.
+            for compa_model in compa_models:
+                # If one of the comparable models is in list with R1rho R1, 
return this.
+                if compa_model.model in MODEL_LIST_R1RHO_W_R1_ONLY + 
MODEL_LIST_R1RHO_FIT_R1_ONLY:
+                    return model_info, compa_model
+
+        # Special case for IT99.
+        elif model in [MODEL_IT99]:
+            # Loop over the models.
+            for compa_model in compa_models:
+                # If one of the comparable models is in list with R1rho R1, 
return this.
+                if compa_model.model in MODEL_LIST_ANALYTIC_CPMG + 
MODEL_LIST_NUMERIC_CPMG:
                     return model_info, compa_model
 
         # If all fails.




Related Messages


Powered by MHonArc, Updated Tue Aug 19 10:00:08 2014