mailr24988 - in /branches/R1_fitting: specific_analyses/relax_disp/ test_suite/unit_tests/_specific_analyses/_relax_disp/


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

Header


Content

Posted by tlinnet on August 12, 2014 - 10:54:
Author: tlinnet
Date: Tue Aug 12 10:54:49 2014
New Revision: 24988

URL: http://svn.gna.org/viewcvs/relax?rev=24988&view=rev
Log:
Fix for nesting kex, when model is CR72, and analysed models is IT99.

sr #3135(https://gna.org/support/?3135): Optimisation of the R1 relaxation 
rate for the off-resonance R1rho relaxation dispersion models.

Modified:
    branches/R1_fitting/specific_analyses/relax_disp/variables.py
    
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py

Modified: branches/R1_fitting/specific_analyses/relax_disp/variables.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/specific_analyses/relax_disp/variables.py?rev=24988&r1=24987&r2=24988&view=diff
==============================================================================
--- branches/R1_fitting/specific_analyses/relax_disp/variables.py       
(original)
+++ branches/R1_fitting/specific_analyses/relax_disp/variables.py       Tue 
Aug 12 10:54:49 2014
@@ -911,6 +911,10 @@
                 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.
@@ -953,6 +957,13 @@
                 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 there is no comparable models according to EXP_TYPE, check if some 
models can be nested anyway.
     else:

Modified: 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py?rev=24988&r1=24987&r2=24988&view=diff
==============================================================================
--- 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  (original)
+++ 
branches/R1_fitting/test_suite/unit_tests/_specific_analyses/_relax_disp/test_variables.py
  Tue Aug 12 10:54:49 2014
@@ -151,9 +151,27 @@
         model = MODEL_CR72
 
         # Test the return.
-        print nesting_model(self_models=self_models, model=model)
         self.assertEqual(nesting_model(self_models=self_models, 
model=model)[1].model, MODEL_LM63)
 
+        ## Test MODEL_IT99 model request, when models are CR72.
+        # Define all the models tested in the analysis.
+        self_models = [MODEL_R2EFF, MODEL_NOREX, MODEL_CR72, MODEL_IT99]
+
+        # Define which current model is selected
+        model = MODEL_IT99
+
+        # Test the return.
+        self.assertEqual(nesting_model(self_models=self_models, 
model=model)[1].model, MODEL_CR72)
+
+        ## Test MODEL_CR72 model request, when models are MODEL_IT99.
+        # Define all the models tested in the analysis.
+        self_models = [MODEL_R2EFF, MODEL_NOREX, MODEL_IT99, MODEL_CR72]
+
+        # Define which current model is selected
+        model = MODEL_CR72
+
+        # Test the return.
+        self.assertEqual(nesting_model(self_models=self_models, 
model=model)[1].model, MODEL_IT99)
 
 
     def test_nesting_model_cpmg_mmq(self):




Related Messages


Powered by MHonArc, Updated Tue Aug 12 11:00:03 2014