Author: bugman Date: Wed Jan 12 16:40:22 2011 New Revision: 12253 URL: http://svn.gna.org/viewcvs/relax?rev=12253&view=rev Log: Created a system test for checking model-free model m3 against the tm2 grid data. Modified: 1.3/test_suite/system_tests/model_free.py Modified: 1.3/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/model_free.py?rev=12253&r1=12252&r2=12253&view=diff ============================================================================== --- 1.3/test_suite/system_tests/model_free.py (original) +++ 1.3/test_suite/system_tests/model_free.py Wed Jan 12 16:40:22 2011 @@ -383,6 +383,58 @@ # Check the values. self.value_test(spin, s2=s2[s2_index], te=te[te_index]*1e12, chi2=0.0) + + # Increment the residue index and deselect the spin. + res_index += 1 + spin.select = False + + + def test_m2_grid_vs_m3(self): + """Test the optimisation of the m3 model-free model against the tm2 parameter grid.""" + + # Setup the data pipe for optimisation. + self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opt_setup_tm2_grid.py') + + # Select the model-free model. + self.interpreter.model_free.select_model(model='m3') + + # The model-free parameters. + tm = [2e-9, 10e-9, 21e-9] + s2 = [0.2, 0.8, 0.95] + te = [2e-12, 40e-12, 1e-9] + + # Deselect all spins. + self.interpreter.deselect.spin() + + # Residue index. + res_index = 0 + + # Loop over te. + for te_index in range(3): + # Loop over s2. + for s2_index in range(3): + # Loop over tm. + for tm_index in range(3): + # Alias the relevent spin container. + spin = cdp.mol[0].res[res_index].spin[0] + + # Select the spin. + spin.select = True + + # Set up the diffusion tensor. + if res_index: + self.interpreter.diffusion_tensor.delete() + self.interpreter.diffusion_tensor.init(tm[tm_index]) + + # Set up the initial model-free parameter values (bypass the grid search for speed). + spin.s2 = s2[s2_index] + spin.te = te[te_index] + + # Minimise. + self.interpreter.minimise('newton', 'gmw', 'back') + + # Check the values. + self.value_test(spin, s2=s2[s2_index], te=te[te_index]*1e12, rex=0.0, chi2=0.0) # Increment the residue index and deselect the spin. res_index += 1