Author: tlinnet Date: Tue Aug 12 10:54:46 2014 New Revision: 24987 URL: http://svn.gna.org/viewcvs/relax?rev=24987&view=rev Log: Fix for nesting kex, when model is CR72, and analysed models is LM63. 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=24987&r1=24986&r2=24987&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:46 2014 @@ -907,6 +907,10 @@ 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 + # Else break out of the loop. else: # Break the for loop, if not found. 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=24987&r1=24986&r2=24987&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:46 2014 @@ -143,6 +143,18 @@ # Test the return. self.assertEqual(nesting_model(self_models=self_models, model=model)[1].model, MODEL_B14_FULL) + ## Test MODEL_CR72 model request, when models are LM63. + # Define all the models tested in the analysis. + self_models = [MODEL_R2EFF, MODEL_NOREX, MODEL_LM63, MODEL_CR72] + + # Define which current model is selected + 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) + + def test_nesting_model_cpmg_mmq(self): """Unit test of function nesting_model, which determine which model to nest from, testing for CPMG MMQ experiments."""