Author: bugman Date: Wed Jan 23 16:48:37 2013 New Revision: 18274 URL: http://svn.gna.org/viewcvs/relax?rev=18274&view=rev Log: Modified the N-state model metal_pos_opt.py system test script. This is to test optimisation with the new paramagnetic position gradients. 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=18274&r1=18273&r2=18274&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 16:48:37 2013 @@ -98,8 +98,8 @@ # Exact position check. self._execute_uf(uf_name='paramag.centre', fix=False) self._execute_uf(uf_name='calc') +print("Chi2: %s" % cdp.chi2) if cdp.chi2 > 1e-15: - print("Chi2: %s" % cdp.chi2) raise RelaxError("The chi2 value must be zero here!") # Shift the metal. @@ -109,13 +109,14 @@ cdp.paramagnetic_centre[0] = cdp.paramagnetic_centre[0] + 0.02 print("Shifted position: [%.3f, %.3f, %.3f]\n" % (cdp.paramagnetic_centre[0], cdp.paramagnetic_centre[1], cdp.paramagnetic_centre[2])) self._execute_uf(uf_name='calc') +print("Chi2: %s" % cdp.chi2) if cdp.chi2 < 1e-15: - print("Chi2: %s" % cdp.chi2) raise RelaxError("The chi2 value cannot be zero here!") # Optimise the Ln3+ position. x, y, z = cdp.paramagnetic_centre -self._execute_uf('simplex', constraints=False, max_iter=500, uf_name='minimise', verbosity=2) +#self._execute_uf(uf_name='n_state_model.select_model', model='population') +self._execute_uf('bfgs', constraints=False, max_iter=500, uf_name='minimise', verbosity=1) # Check that the metal moved. print("\nOriginal position: [%.3f, %.3f, %.3f]" % (x, y, z)) @@ -147,7 +148,7 @@ # Optimise everything. self._execute_uf(uf_name='align_tensor.fix', fixed=False) self._execute_uf(uf_name='paramag.centre', fix=False) -self._execute_uf('simplex', constraints=False, max_iter=50, uf_name='minimise') +self._execute_uf('bfgs', constraints=False, max_iter=50, uf_name='minimise') # Monte Carlo simulations. if SIMS: @@ -158,7 +159,7 @@ self._execute_uf(uf_name='monte_carlo.setup', number=3) self._execute_uf(uf_name='monte_carlo.create_data') self._execute_uf(uf_name='monte_carlo.initial_values') - self._execute_uf('simplex', constraints=False, max_iter=500, uf_name='minimise') + self._execute_uf('bfgs', constraints=False, max_iter=5, uf_name='minimise') self._execute_uf(uf_name='monte_carlo.error_analysis') # Write out a results file.