Author: bugman Date: Fri Jan 11 11:52:28 2008 New Revision: 4639 URL: http://svn.gna.org/viewcvs/relax?rev=4639&view=rev Log: Added a check to the minimise() method to see if the N-state model had been set up. Modified: branches/N_state_model/specific_fns/n_state_model.py Modified: branches/N_state_model/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4639&r1=4638&r2=4639&view=diff ============================================================================== --- branches/N_state_model/specific_fns/n_state_model.py (original) +++ branches/N_state_model/specific_fns/n_state_model.py Fri Jan 11 11:52:28 2008 @@ -28,6 +28,7 @@ from data import Data as relax_data_store from maths_fns.n_state_model import N_state_opt from minimise.generic import generic_minimise +from relax_errors import RelaxNoModelError from specific_fns.base_class import Common_functions @@ -182,6 +183,13 @@ @type sim_index: None or int """ + # Alias the current data pipe. + cdp = relax_data_store[relax_data_store.current_pipe] + + # Test if the N-state model has been set up. + if not hasattr(cdp, 'params'): + raise RelaxNoModelError + # Create the initial parameter vector. param_vector = self.assemble_param_vector(sim_index=sim_index)