Author: bugman Date: Wed Jan 23 21:41:08 2013 New Revision: 18284 URL: http://svn.gna.org/viewcvs/relax?rev=18284&view=rev Log: Improved the checks of the metal_pos_opt.py N-state model system test script. Modified: trunk/test_suite/system_tests/scripts/n_state_model/metal_pos_opt.py Modified: trunk/test_suite/system_tests/scripts/n_state_model/metal_pos_opt.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/metal_pos_opt.py?rev=18284&r1=18283&r2=18284&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/n_state_model/metal_pos_opt.py (original) +++ trunk/test_suite/system_tests/scripts/n_state_model/metal_pos_opt.py Wed Jan 23 21:41:08 2013 @@ -118,13 +118,14 @@ self._execute_uf(uf_name='n_state_model.select_model', model='population') self._execute_uf(uf_name='calc') print("Chi2: %s" % cdp.chi2) +chi2 = cdp.chi2 if cdp.chi2 < 1e-15: raise RelaxError("The chi2 value cannot be zero here!") self._execute_uf(uf_name='paramag.centre', fix=True) self._execute_uf(uf_name='calc') print("Chi2: %s" % cdp.chi2) -if cdp.chi2 < 1e-15: - raise RelaxError("The chi2 value cannot be zero here!") +if abs(cdp.chi2 - chi2) > 1e-15: + raise RelaxError("The chi2 value must match the previous value of %s." % chi2) self._execute_uf(uf_name='paramag.centre', fix=False) self._execute_uf('bfgs', constraints=False, max_iter=500, uf_name='minimise', verbosity=1)