Author: bugman Date: Wed Jul 9 11:41:10 2008 New Revision: 6866 URL: http://svn.gna.org/viewcvs/relax?rev=6866&view=rev Log: Fixed the model checking in the minimise() method. Modified: branches/rdc_analysis/specific_fns/n_state_model.py Modified: branches/rdc_analysis/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/specific_fns/n_state_model.py?rev=6866&r1=6865&r2=6866&view=diff ============================================================================== --- branches/rdc_analysis/specific_fns/n_state_model.py (original) +++ branches/rdc_analysis/specific_fns/n_state_model.py Wed Jul 9 11:41:10 2008 @@ -536,8 +536,18 @@ cdp = ds[ds.current_pipe] # Test if the N-state model has been set up. - if not hasattr(cdp, 'N') or not hasattr(cdp, 'ref_domain'): + if not hasattr(cdp, 'model'): raise RelaxNoModelError, 'N-state' + + # '2-domain' model setup tests. + if cdp.model == '2-domain': + # The number of states. + if not hasattr(cdp, 'N'): + raise RelaxError, "The number of states has not been set." + + # The reference domain. + if not hasattr(cdp, 'ref_domain'): + raise RelaxError, "The reference domain has not been set." # Create the initial parameter vector. param_vector = self.assemble_param_vector(sim_index=sim_index)