Author: bugman Date: Wed Jul 9 18:03:07 2008 New Revision: 6902 URL: http://svn.gna.org/viewcvs/relax?rev=6902&view=rev Log: Fixes for the __update_model() method. The probabilities and Euler angle parameter arrays are only created for the relevant N-state model. 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=6902&r1=6901&r2=6902&view=diff ============================================================================== --- branches/rdc_analysis/specific_fns/n_state_model.py (original) +++ branches/rdc_analysis/specific_fns/n_state_model.py Wed Jul 9 18:03:07 2008 @@ -67,27 +67,31 @@ else: return - # Set up the parameter array. + # Set up the parameter arrays. if not cdp.params: # Add the probability or population weight parameters. - for i in xrange(cdp.N-1): - cdp.params.append('p' + `i`) + if cdp.model in ['2-domain', 'population']: + for i in xrange(cdp.N-1): + cdp.params.append('p' + `i`) # Add the Euler angle parameters. - for i in xrange(cdp.N): - cdp.params.append('alpha' + `i`) - cdp.params.append('beta' + `i`) - cdp.params.append('gamma' + `i`) + if cdp.model == '2-domain': + for i in xrange(cdp.N): + cdp.params.append('alpha' + `i`) + cdp.params.append('beta' + `i`) + cdp.params.append('gamma' + `i`) # Initialise the probability and Euler angle arrays. - if not hasattr(cdp, 'probs'): - cdp.probs = [None] * cdp.N - if not hasattr(cdp, 'alpha'): - cdp.alpha = [None] * cdp.N - if not hasattr(cdp, 'beta'): - cdp.beta = [None] * cdp.N - if not hasattr(cdp, 'gamma'): - cdp.gamma = [None] * cdp.N + if cdp.model in ['2-domain', 'population']: + if not hasattr(cdp, 'probs'): + cdp.probs = [None] * cdp.N + if cdp.model == '2-domain': + if not hasattr(cdp, 'alpha'): + cdp.alpha = [None] * cdp.N + if not hasattr(cdp, 'beta'): + cdp.beta = [None] * cdp.N + if not hasattr(cdp, 'gamma'): + cdp.gamma = [None] * cdp.N def assemble_param_vector(self, sim_index=None):