Author: bugman
Date: Tue Oct 21 17:56:08 2014
New Revision: 26329
URL: http://svn.gna.org/viewcvs/relax?rev=26329&view=rev
Log:
Bug fix for the N-state model grid search when only alignment tensor parameters
are optimised.
The algorithm for splitting up the grid search to optimise each tensor
separately, hence massively
collapsing the dimensionality of the problem, was being performed incorrectly.
The grid_search()
API method inc, lower, and upper arguments are lists of lists, but were only
being treated as lists.
Modified:
trunk/specific_analyses/n_state_model/api.py
Modified: trunk/specific_analyses/n_state_model/api.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/n_state_model/api.py?rev=26329&r1=26328&r2=26329&view=diff
==============================================================================
--- trunk/specific_analyses/n_state_model/api.py (original)
+++ trunk/specific_analyses/n_state_model/api.py Tue Oct 21 17:56:08 2014
@@ -321,11 +321,11 @@
"""The grid search function.
@param lower: The lower bounds of the grid search which must
be equal to the number of parameters in the model.
- @type lower: array of numbers
+ @type lower: list of lists of floats
@param upper: The upper bounds of the grid search which must
be equal to the number of parameters in the model.
- @type upper: array of numbers
+ @type upper: list of lists of floats
@param inc: The increments for each dimension of the space
for the grid search. The number of elements in the array must equal to the
number of parameters in the model.
- @type inc: array of int
+ @type inc: list of lists of int
@keyword scaling_matrix: The per-model list of diagonal and square
scaling matrices.
@type scaling_matrix: list of numpy rank-2, float64 array or
list of None
@param constraints: If True, constraints are applied during the
grid search (elinating parts of the grid). If False, no constraints are used.
@@ -377,12 +377,12 @@
tensor.set('fixed', False)
# Grid search parameter subsets.
- lower_sub = lower[i*5:i*5+5]
- upper_sub = upper[i*5:i*5+5]
- inc_sub = inc[i*5:i*5+5]
+ lower_sub = lower[0][i*5:i*5+5]
+ upper_sub = upper[0][i*5:i*5+5]
+ inc_sub = inc[0][i*5:i*5+5]
# Minimisation of the sub-grid.
- self.minimise(min_algor='grid', lower=lower_sub,
upper=upper_sub, inc=inc_sub, constraints=constraints, verbosity=verbosity,
sim_index=sim_index)
+ self.minimise(min_algor='grid', lower=[lower_sub],
upper=[upper_sub], inc=[inc_sub], scaling_matrix=[None],
constraints=constraints, verbosity=verbosity, sim_index=sim_index)
# Fix the tensor again.
tensor.set('fixed', True)
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits