Hi Troels, This code will not work on Python 3. To make sure something will run, try the command: $ 2to3 -j 4 -w \ -f buffer \ -f idioms \ -f set_literal \ -f ws_comma \ -x except \ -x import \ -x imports \ -x long \ -x numliterals \ -x xrange \ specific_analyses/relax_disp/optimisation.py This is from the docs/2to3_checklist document. The value of j can be anything up to the number of CPUs and CPU cores + 1. This command will change the file and you can then commit it. Here is a commit example: http://article.gmane.org/gmane.science.nmr.relax.scm/20556. Regards, Edward On 25 April 2014 19:15, <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet Date: Fri Apr 25 19:15:29 2014 New Revision: 22860 URL: http://svn.gna.org/viewcvs/relax?rev=22860&view=rev Log: Fix for skipping grid search, when set parameter values are of dict() type. Feature request: #3151, (https://gna.org/support/index.php?3151) - User function to set the R20 parameters in the default grid search using the minimum R2eff value. Modified: trunk/specific_analyses/relax_disp/optimisation.py Modified: trunk/specific_analyses/relax_disp/optimisation.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/optimisation.py?rev=22860&r1=22859&r2=22860&view=diff ============================================================================== --- trunk/specific_analyses/relax_disp/optimisation.py (original) +++ trunk/specific_analyses/relax_disp/optimisation.py Fri Apr 25 19:15:29 2014 @@ -394,6 +394,18 @@ inc[param_index] = 1 lower[param_index] = val upper[param_index] = val + + # Test if the value is a dict, for example for r2. + if type(val) == dict: + val_dic = val[r20_key] + if is_float(val_dic) and val_dic != 0.0: + # Printout. + print("The spin '%s' parameter %s '%s[%i]' is pre-set to %s, skipping it in the grid search." % (spin_ids[si], r20_key, param_name, param_index, val_dic)) + + # Turn of the grid search for this parameter. + inc[param_index] = 1 + lower[param_index] = val_dic + upper[param_index] = val_dic # The full grid size. grid_size = 1 _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@xxxxxxx 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