Author: bugman Date: Tue Jan 15 15:35:00 2008 New Revision: 4752 URL: http://svn.gna.org/viewcvs/relax?rev=4752&view=rev Log: Wrote some code to create the grid search options (currently non-functional). 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=4752&r1=4751&r2=4752&view=diff ============================================================================== --- branches/N_state_model/specific_fns/n_state_model.py (original) +++ branches/N_state_model/specific_fns/n_state_model.py Tue Jan 15 15:35:00 2008 @@ -95,6 +95,28 @@ """This structure is a list of lists. The first dimension corresponds to the model parameter. The second dimension has the elements: 0, the number of increments in that dimension; 1, the lower limit of the grid; 2, the upper limit of the grid.""" + + # Set the grid search options. + for i in xrange(n): + # Probabilities (default values). + if cdp.params[i] == 'pc': + grid_ops.append([inc[m], 0.0, 1.0]) + + # Angles (default values). + if cdp.params[i] == 'alpha' or cdp.params[i] == 'gamma': + grid_ops.append([inc[m], 0.0, 2*pi]) + elif cdp.params[i] == 'beta': + grid_ops.append([inc[m], 0.0, pi]) + + # Lower bound (if supplied). + if lower: + grid_ops[i][1] = lower[i] + + # Upper bound (if supplied). + if upper: + grid_ops[i][1] = upper[i] + + print `grid_ops` # Minimisation. self.minimise(min_algor='grid', min_options=grid_ops, constraints=constraints, verbosity=verbosity, sim_index=sim_index)