Chris, I've copied your 'auto_select' branch to 'auto_select_merged' and merged the main development line back into it. In doing this, the rudimentary test-suite can now be used to test the changes. I've also added a new test whereby three runs are created with only a single residue selected. Using value.set(), an S2 value of 0.9 is set on the first run and an S2 value of 0.7 on the second. The difference between the two is then set to the third run. If the S2 value of the third run is not ~0.2, the test will fail. The summary of the test-suite is: ---------------------------------------------------------------------------------------------------------------------- ############################# # Results of the test suite # ############################# The run tests: Test of the user function run.create() .............................................. [ OK ] The sequence tests: Test of the user function sequence.read() ........................................... [ OK ] Test of loading the sequence from a PDB file ........................................ [ OK ] The diffusion tensor tests: Test of the user function diffusion_tensor.init() ................................... [ OK ] Test of the user function diffusion_tensor.delete() ................................. [ OK ] Test of the user function diffusion_tensor.display() ................................ [ OK ] Test of the user function diffusion_tensor.copy() ................................... [ OK ] The relaxation curve-fitting tests: Test of the loading of Sparky peak heights .......................................... [ Failed ] The model-free tests: Test of the user function results.read() ............................................ [ Failed ] The generic tests: Test of S2 difference stored in a new run. .......................................... [ Failed ] Synopsis ................................................................................ [ Failed ] ----------------------------------------------------------------------------------------------------------------------
From these tests and also from the restrictions in flexibility which
the auto_select functionality naturally induces, I do not believe that the auto_select approach to fix bug #5501 (https://gna.org/bugs/?func=detailitem&item_id=5501) can be made to work with relax. The fix causes all user functions operating on model-free runs to be dependent on there being relaxation data loaded. However, there are many non-standard situations whereby runs are used without any relaxation data. The only two user functions which actually require the presence of relaxation data are 'grid_search()' and 'minimise()', and both already test for the presence of the data. A workable, yet less elegant, alternative is the suggestion in bug report #5501 whereby residues are reselected when data is encountered by the 'relax_data.read()' user function. As for over-fitting, residue deselection can be done when k > n (number of parameters > number of relaxation data sets) within the 'grid_search()' and 'minimise()' user functions. These two changes should be sufficient to resolve the bug. Chris, as bug #5501 is assigned to you, would you like to try this alternative instead. Otherwise, I can make the modifications and close off the bug. Thanks again, Edward