Re: relaxation curve fitting
Hi Romel, I hope you don't mind, but I have taken your test data and script and created a relax system test with it. I have only included the data for residues 24, 28, and 29, and have not used the PDB file. The data will be located in the directory test_suite/shared_data/peak_lists/bug_19887, and the script is called test_suite/system_tests/scripts/curve_fitting/bug_19887_curvefit_fail.py. If you'd like to keep it secret, I can randomise the peak heights a little if you like. I can now reproduce the problem by running this specific test with: $ relax -s Relax_fit.test_bug_19887_curvefit_fail To perform this test yourself, you'd need the subversion program installed. If you have this, you can get the most up-to-date copy of relax (and the minfx and bmrblib libraries) by typing: $ svn co http://svn.gna.org/svn/relax/trunk relax-trunk $ cd relax-trunk $ svn co http://svn.gna.org/svn/minfx/trunk/minfx $ svn co http://svn.gna.org/svn/bmrblib/trunk/bmrblib This might be needed later to obtain the fixes. Regards, Edward On 2 July 2012 10:38, Edward d'Auvergne wrote: > Cheers! Hopefully I'll be able to reproduce the problem and come up > with a fix soon. > > Regards, > > Edward > > > > On 2 July 2012 10:32, Romel Bobby wrote: >> Hi Edward, >> >> I've submitted the bug under #19887 and included the output of 'relax >> --info' in relax_info.txt. I also included tar.gz file containing all the >> input files (ie lists for relaxation delays, pdb, log file, etc.). >> Thanks >> >> Kind regards, >> >> Romel >> >> >> On 2 July 2012 19:29, Edward d'Auvergne wrote: >>> >>> Hi, >>> >>> This appears to be a unique bug! I would guess that it has something >>> to do with the software versions in use - on most systems this code >>> path works flawlessly. But I should be able to modify relax to handle >>> this. Would you be able to please make a bug report? The link is >>> https://gna.org/bugs/?func=additem&group=relax. If you could include >>> a short description, the error message, and the output of 'relax >>> --info', this would be of significant help. If possible, I would like >>> to try to catch this in the relax test suite. The more information >>> you provide the better - because if I can reproduce the problem on my >>> computer, I can then fix the problem within minutes. Otherwise it >>> takes much, much longer. >>> >>> Cheers, >>> >>> Edward >>> >>> >>> >>> On 30 June 2012 21:16, Romel Bobby wrote: >>> > Hi Edward, >>> > >>> > I tried the 'exp' model and it gave me the very same error message (see >>> > below). >>> > >>> > File "/usr/local/relax/multi/processor.py", line 480, in run >>> > self.callback.init_master(self) >>> > File "/usr/local/relax/multi/__init__.py", line 319, in >>> > default_init_master >>> > self.master.run() >>> > File "/usr/local/relax/relax.py", line 183, in run >>> > self.interpreter.run(self.script_file) >>> > File "/usr/local/relax/prompt/interpreter.py", line 280, in run >>> > return run_script(intro=self.__intro_string, local=locals(), >>> > script_file=script_file, quit=self.__quit_flag, >>> > show_script=self.__show_script, >>> > raise_relax_error=self.__raise_relax_error) >>> > File "/usr/local/relax/prompt/interpreter.py", line 570, in run_script >>> > return console.interact(intro, local, script_file, quit, >>> > show_script=show_script, raise_relax_error=raise_relax_error) >>> > File "/usr/local/relax/prompt/interpreter.py", line 455, in >>> > interact_script >>> > exec_script(script_file, local) >>> > File "/usr/local/relax/prompt/interpreter.py", line 329, in >>> > exec_script >>> > runpy.run_module(module, globals) >>> > File >>> > >>> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >>> > line 180, in run_module >>> > fname, loader, pkg_name) >>> > File >>> > >>> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >>> > line 72, in _run_code >>> > exec code in run_globals >>> > File "/Users/b_romel/temp_relax/backup/relax_fit.py", line 87, in >>> > >>> > grid_search(inc=11) >>> > File "/usr/local/relax/prompt/uf_objects.py", line 220, in __call__ >>> > self._backend(*new_args, **uf_kargs) >>> > File "/usr/local/relax/generic_fns/minimise.py", line 141, in >>> > grid_search >>> > grid_search(lower=lower, upper=upper, inc=inc, >>> > constraints=constraints, >>> > verbosity=verbosity) >>> > File "/usr/local/relax/specific_fns/relax_fit.py", line 609, in >>> > grid_search >>> > self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc, >>> > constraints=constraints, verbosity=verbosity, sim_index=sim_index) >>> > File "/usr/local/relax/specific_fns/relax_fit.py", line 716, in >>> > minimise >>> > if constraints and not match('^[Gg]rid', min_algor): >>> > File >>> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", >>> > line 137, in match >>> > return _compile(pattern, flags).match(str
Re: relaxation curve fitting
Cheers! Hopefully I'll be able to reproduce the problem and come up with a fix soon. Regards, Edward On 2 July 2012 10:32, Romel Bobby wrote: > Hi Edward, > > I've submitted the bug under #19887 and included the output of 'relax > --info' in relax_info.txt. I also included tar.gz file containing all the > input files (ie lists for relaxation delays, pdb, log file, etc.). > Thanks > > Kind regards, > > Romel > > > On 2 July 2012 19:29, Edward d'Auvergne wrote: >> >> Hi, >> >> This appears to be a unique bug! I would guess that it has something >> to do with the software versions in use - on most systems this code >> path works flawlessly. But I should be able to modify relax to handle >> this. Would you be able to please make a bug report? The link is >> https://gna.org/bugs/?func=additem&group=relax. If you could include >> a short description, the error message, and the output of 'relax >> --info', this would be of significant help. If possible, I would like >> to try to catch this in the relax test suite. The more information >> you provide the better - because if I can reproduce the problem on my >> computer, I can then fix the problem within minutes. Otherwise it >> takes much, much longer. >> >> Cheers, >> >> Edward >> >> >> >> On 30 June 2012 21:16, Romel Bobby wrote: >> > Hi Edward, >> > >> > I tried the 'exp' model and it gave me the very same error message (see >> > below). >> > >> > File "/usr/local/relax/multi/processor.py", line 480, in run >> > self.callback.init_master(self) >> > File "/usr/local/relax/multi/__init__.py", line 319, in >> > default_init_master >> > self.master.run() >> > File "/usr/local/relax/relax.py", line 183, in run >> > self.interpreter.run(self.script_file) >> > File "/usr/local/relax/prompt/interpreter.py", line 280, in run >> > return run_script(intro=self.__intro_string, local=locals(), >> > script_file=script_file, quit=self.__quit_flag, >> > show_script=self.__show_script, >> > raise_relax_error=self.__raise_relax_error) >> > File "/usr/local/relax/prompt/interpreter.py", line 570, in run_script >> > return console.interact(intro, local, script_file, quit, >> > show_script=show_script, raise_relax_error=raise_relax_error) >> > File "/usr/local/relax/prompt/interpreter.py", line 455, in >> > interact_script >> > exec_script(script_file, local) >> > File "/usr/local/relax/prompt/interpreter.py", line 329, in >> > exec_script >> > runpy.run_module(module, globals) >> > File >> > >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >> > line 180, in run_module >> > fname, loader, pkg_name) >> > File >> > >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", >> > line 72, in _run_code >> > exec code in run_globals >> > File "/Users/b_romel/temp_relax/backup/relax_fit.py", line 87, in >> > >> > grid_search(inc=11) >> > File "/usr/local/relax/prompt/uf_objects.py", line 220, in __call__ >> > self._backend(*new_args, **uf_kargs) >> > File "/usr/local/relax/generic_fns/minimise.py", line 141, in >> > grid_search >> > grid_search(lower=lower, upper=upper, inc=inc, >> > constraints=constraints, >> > verbosity=verbosity) >> > File "/usr/local/relax/specific_fns/relax_fit.py", line 609, in >> > grid_search >> > self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc, >> > constraints=constraints, verbosity=verbosity, sim_index=sim_index) >> > File "/usr/local/relax/specific_fns/relax_fit.py", line 716, in >> > minimise >> > if constraints and not match('^[Gg]rid', min_algor): >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", >> > line 137, in match >> > return _compile(pattern, flags).match(string) >> > TypeError: bad argument type for built-in operation >> > >> > Regards, >> > >> > Romel >> > >> > On 1 July 2012 06:42, Edward d'Auvergne wrote: >> >> >> >> Hi Romel, >> >> >> >> The problem is that unfortunately the 'inv' model is simply not >> >> implemented yet. This is the model for the very old-school inversion >> >> recovery type R1 experiments whereby the magnetisation returns to the >> >> Boltzmann equilibrium. I'm guessing you should be using the 'exp' >> >> model instead. This is the standard 2 parameter exponential fit >> >> whereby the magnetisation goes to zero. This is the standard nowadays >> >> as it is considered far more accurate for the extraction of the rates >> >> (simply by having one less parameter to fit). >> >> >> >> If you have collected the old-school data, there is a relax branch >> >> created by Sébastien Morin for handling this experiment type. This is >> >> the 'inversion-recovery' branch located at >> >> http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/. >> >> However this branch is not complete and will require someone willing >> >> to dive into C code to complete it (see >> >> http://www.mail-archive.com/relax-devel@gna.o
Re: relaxation curve fitting
Hi, This appears to be a unique bug! I would guess that it has something to do with the software versions in use - on most systems this code path works flawlessly. But I should be able to modify relax to handle this. Would you be able to please make a bug report? The link is https://gna.org/bugs/?func=additem&group=relax. If you could include a short description, the error message, and the output of 'relax --info', this would be of significant help. If possible, I would like to try to catch this in the relax test suite. The more information you provide the better - because if I can reproduce the problem on my computer, I can then fix the problem within minutes. Otherwise it takes much, much longer. Cheers, Edward On 30 June 2012 21:16, Romel Bobby wrote: > Hi Edward, > > I tried the 'exp' model and it gave me the very same error message (see > below). > > File "/usr/local/relax/multi/processor.py", line 480, in run > self.callback.init_master(self) > File "/usr/local/relax/multi/__init__.py", line 319, in > default_init_master > self.master.run() > File "/usr/local/relax/relax.py", line 183, in run > self.interpreter.run(self.script_file) > File "/usr/local/relax/prompt/interpreter.py", line 280, in run > return run_script(intro=self.__intro_string, local=locals(), > script_file=script_file, quit=self.__quit_flag, > show_script=self.__show_script, raise_relax_error=self.__raise_relax_error) > File "/usr/local/relax/prompt/interpreter.py", line 570, in run_script > return console.interact(intro, local, script_file, quit, > show_script=show_script, raise_relax_error=raise_relax_error) > File "/usr/local/relax/prompt/interpreter.py", line 455, in > interact_script > exec_script(script_file, local) > File "/usr/local/relax/prompt/interpreter.py", line 329, in exec_script > runpy.run_module(module, globals) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", > line 180, in run_module > fname, loader, pkg_name) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", > line 72, in _run_code > exec code in run_globals > File "/Users/b_romel/temp_relax/backup/relax_fit.py", line 87, in > grid_search(inc=11) > File "/usr/local/relax/prompt/uf_objects.py", line 220, in __call__ > self._backend(*new_args, **uf_kargs) > File "/usr/local/relax/generic_fns/minimise.py", line 141, in grid_search > grid_search(lower=lower, upper=upper, inc=inc, constraints=constraints, > verbosity=verbosity) > File "/usr/local/relax/specific_fns/relax_fit.py", line 609, in > grid_search > self.minimise(min_algor='grid', lower=lower, upper=upper, inc=inc, > constraints=constraints, verbosity=verbosity, sim_index=sim_index) > File "/usr/local/relax/specific_fns/relax_fit.py", line 716, in minimise > if constraints and not match('^[Gg]rid', min_algor): > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", > line 137, in match > return _compile(pattern, flags).match(string) > TypeError: bad argument type for built-in operation > > Regards, > > Romel > > On 1 July 2012 06:42, Edward d'Auvergne wrote: >> >> Hi Romel, >> >> The problem is that unfortunately the 'inv' model is simply not >> implemented yet. This is the model for the very old-school inversion >> recovery type R1 experiments whereby the magnetisation returns to the >> Boltzmann equilibrium. I'm guessing you should be using the 'exp' >> model instead. This is the standard 2 parameter exponential fit >> whereby the magnetisation goes to zero. This is the standard nowadays >> as it is considered far more accurate for the extraction of the rates >> (simply by having one less parameter to fit). >> >> If you have collected the old-school data, there is a relax branch >> created by Sébastien Morin for handling this experiment type. This is >> the 'inversion-recovery' branch located at >> http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/. >> However this branch is not complete and will require someone willing >> to dive into C code to complete it (see >> http://www.mail-archive.com/relax-devel@gna.org/msg03353.html). Note >> that if someone does know C, completing this will require about 50 >> lines of code changed in the maths_fns/relax_fit.c and >> maths_fns/exponential.c files (my rough guess anyway). It should be >> incredibly trivial for someone with C knowledge. Anyway, I hope some >> of this info helps. >> >> Regards, >> >> Edward >> >> >> >> On 30 June 2012 18:01, Romel Bobby wrote: >> > Dear all, >> > >> > I've been trying to use the curve fitting routine for R1 and R2 in relax >> > using the sample script relax_fit.py. I managed to read in the spectra >> > and >> > obtain a value for the uncertainty. However, once it gets to the point >> > of >> > performing a grid_search that's where it fails (see below). Has anyone >> > had a >> > similar problem? >> > >> > [?1034h