Re: Relaxation curve fitting
Hi Edward, Thank you for your suggestions. I have tried to open qtgrace first and then open the intensities file, but I can not seen any curve in qtgrace. I have submitted the bug report. Regards, Mengjun Citat af Edward d'Auvergne edw...@nmr-relax.com: Hi Mengjun, This looks like a bug in relax on Windows with spaces in the directory name! I thought I fixed this many, many years ago - maybe it has resurfaced in a new place. Could you please submit a bug report with this issue? Actually, before you do that, can you open qtgrace and then open this file? If the error is in qtgrace, then the bug report is not needed as there is nothing relax can do to fix it. You can submit a bug using the link https://gna.org/bugs/?func=additemgroup=relax. You can also attach the file there. Note that you should not have your data files in the same directory as relax. You should always keep your data files separate from the software files. Mixing the files together is quite dangerous and might result in program files or directories being overwritten by data and results files. If you place your files into a directory on the C:\ drive without any spaces, this problem will not appear. Regards, Edward On 4 March 2014 18:38, mengjun@mailbox.tu-berlin.de wrote: Hi Edward, Thank you very much for your suggestion. As you suggested, I have started grace.view user function under Relax Gui, and select qtgrace.exe file and intensities.agr file, but a error occurs: [Error] Can't stat file C:\\Program [Error] Can't stat file Files\\relax-3.1.5\\grace\\intensities.agr Please find the intensities.agr file (which include 3 residues for test) in the attachment. Thank you. With best regards, Mengjun Xue Citat af Edward d'Auvergne edw...@nmr-relax.com: Hi Mengjun, If you are using the GUI, you don't need to change the qtgrace.exe file. The grace.view user function window allows you to choose the Grace executable file. Just click on the Select the file button and select the qtgrace.exe file. Regards, Edward On 3 March 2014 17:51, mengjun@mailbox.tu-berlin.de wrote: Hi Troels and Martin, Thank you so much for your responses. According to your suggestions, the raw intensities data can be extracted from results.bz file or rx.save.bz2 file now. For the xmgrace installation, I have downloaded qtgrace at http://sourceforge.net/projects/qtgrace/, and uppack it to C:\Python27\qtgrace_windows_binary, in the C:\Python27\qtgrace_windows_binary\bin folder, I found qtgrace.exe,but I did not find xmgrace.exe, how to put both qtgrace.exe and xmgrace.exe in the same bin folder? xmgrace.exe should be downloaded from internet and then put it in the same bin file? Thank you so much. Best regards, Mengjun Quoting Troels Emtekær Linnet tlin...@nmr-relax.com: Dear Mengjun. For xmgrace installation, follow this: http://wiki.nmr-relax.com/Installation_windows_Python_x86-32_Visual_Studio_Express_for_Windows_Desktop#xmgrace_-_for_the_plotting_results_of_NMR-relax In short. 1 ) Download and install 2) Copy qtgrace.exe to xmgrace.exe in same folder 3) Add to your windows path, the path to where xmgrace.exe resides. 4) Test it with opening cmd and write xmgrace. (You may need to restart computer to update PATH) Or if you have matplob lib, try this tutorial: http://wiki.nmr-relax.com/Matplotlib_example 2014-03-03 16:11 GMT+01:00 mengjun@mailbox.tu-berlin.de: Hi Edward, I have tried to use relax_fit.py to extract R1 data, I have got 3 files: rx.out file (R1 values), rx.save.bz2 file, and results.bz2 file, as Xmgrace is not available on my computer, I want to display the intensity decay curves in others software, so how to extract the raw data from the output (results.bz2) of relax_fit.py? It seems rx.save.bz2 file is same to results.bz2 file. Thank you very much. With best regards, Mengjun Xue ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users
Re: Relaxation curve fitting
Dear Mengjun. For xmgrace installation, follow this: http://wiki.nmr-relax.com/Installation_windows_Python_x86-32_Visual_Studio_Express_for_Windows_Desktop#xmgrace_-_for_the_plotting_results_of_NMR-relax In short. 1 ) Download and install 2) Copy qtgrace.exe to xmgrace.exe in same folder 3) Add to your windows path, the path to where xmgrace.exe resides. 4) Test it with opening cmd and write xmgrace. (You may need to restart computer to update PATH) Or if you have matplob lib, try this tutorial: http://wiki.nmr-relax.com/Matplotlib_example 2014-03-03 16:11 GMT+01:00 mengjun@mailbox.tu-berlin.de: Hi Edward, I have tried to use relax_fit.py to extract R1 data, I have got 3 files: rx.out file (R1 values), rx.save.bz2 file, and results.bz2 file, as Xmgrace is not available on my computer, I want to display the intensity decay curves in others software, so how to extract the raw data from the output (results.bz2) of relax_fit.py? It seems rx.save.bz2 file is same to results.bz2 file. Thank you very much. With best regards, Mengjun Xue ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users
Re: Relaxation curve fitting
Dear Mengjun. Let me extend the previous explanation. Use the GUI to load results.bz2 file. Then use the User function: Value write, to write a text file with the desired results. These are just flat text files as: rx.out and can include intensities instead, of normalized intensities. Use these files to plot in any program. Or use the User function: Grace write, to make grace files. Best Troels 2014-03-03 16:33 GMT+01:00 Troels Emtekær Linnet tlin...@nmr-relax.com: Dear Mengjun. For xmgrace installation, follow this: http://wiki.nmr-relax.com/Installation_windows_Python_x86-32_Visual_Studio_Express_for_Windows_Desktop#xmgrace_-_for_the_plotting_results_of_NMR-relax In short. 1 ) Download and install 2) Copy qtgrace.exe to xmgrace.exe in same folder 3) Add to your windows path, the path to where xmgrace.exe resides. 4) Test it with opening cmd and write xmgrace. (You may need to restart computer to update PATH) Or if you have matplob lib, try this tutorial: http://wiki.nmr-relax.com/Matplotlib_example 2014-03-03 16:11 GMT+01:00 mengjun@mailbox.tu-berlin.de: Hi Edward, I have tried to use relax_fit.py to extract R1 data, I have got 3 files: rx.out file (R1 values), rx.save.bz2 file, and results.bz2 file, as Xmgrace is not available on my computer, I want to display the intensity decay curves in others software, so how to extract the raw data from the output (results.bz2) of relax_fit.py? It seems rx.save.bz2 file is same to results.bz2 file. Thank you very much. With best regards, Mengjun Xue ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users ___ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@gna.org 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-users
Re: relaxation curve fitting
. 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 rbob...@aucklanduni.ac.nz 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 relax 2.0.0 Molecular dynamics by NMR data analysis Copyright (C) 2001-2006 Edward d'Auvergne Copyright (C) 2006-2012 the relax development team This is free software which you are welcome to modify and redistribute under the conditions of the GNU General Public License (GPL). This program, including all modules, is licensed under the GPL and comes with absolutely no warranty. For details type 'GPL' within the relax prompt. Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within the prompt. Processor fabric: Uni-processor. script = 'relax_fit.py' ### # # # Copyright (C) 2004-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # # relax is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # relax is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with relax; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # ### Script for relaxation curve fitting. # Create the 'rx' data pipe. pipe.create('rx', 'relax_fit') # Load the backbone amide 15N spins from a PDB file. structure.read_pdb('IL6_mf.pdb') structure.load_spins(spin_id='@N') # Spectrum names. names = [ 'T1_1204.04', 'T1_1504.04', 'T1_1804.04', 'T1_2104.04', 'T1_2404.04', 'T1_2754.04', 'T1_304.04', 'T1_304.040', 'T1_54.04', 'T1_604.04', 'T1_604.040', 'T1_904.04', ] # Relaxation times (in seconds). times = [ 1.204, 1.504, 1.804, 2.104, 2.404, 2.754, 0.304, 0.304, 0.054, 0.604, 0.604, 0.904 ] # Loop over the spectra. for i in xrange(len(names)): # Load the peak intensities. spectrum.read_intensities(file=names[i]+'.list', dir='', spectrum_id=names[i], int_method='height') # Set the relaxation times. relax_fit.relax_time(time=times[i], spectrum_id=names[i]) # Specify the duplicated spectra. spectrum.replicated(spectrum_ids=['T1_304.04', 'T1_304.040']) spectrum.replicated(spectrum_ids=['T1_604.04', 'T1_604.040']) # Peak
Re: relaxation curve fitting
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 rbob...@aucklanduni.ac.nz 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 relax 2.0.0 Molecular dynamics by NMR data analysis Copyright (C) 2001-2006 Edward d'Auvergne Copyright (C) 2006-2012 the relax development team This is free software which you are welcome to modify and redistribute under the conditions of the GNU General Public License (GPL). This program, including all modules, is licensed under the GPL and comes with absolutely no warranty. For details type 'GPL' within the relax prompt. Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within the prompt. Processor fabric: Uni-processor. script = 'relax_fit.py' ### # # # Copyright (C) 2004-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # # relax is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # relax is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with relax; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # ### Script for relaxation curve fitting. # Create the 'rx' data pipe. pipe.create('rx', 'relax_fit') # Load the backbone amide 15N spins from a PDB file. structure.read_pdb('IL6_mf.pdb') structure.load_spins(spin_id='@N') # Spectrum names. names = [ 'T1_1204.04', 'T1_1504.04', 'T1_1804.04', 'T1_2104.04', 'T1_2404.04', 'T1_2754.04', 'T1_304.04', 'T1_304.040', 'T1_54.04', 'T1_604.04', 'T1_604.040', 'T1_904.04', ] # Relaxation times (in seconds). times = [ 1.204, 1.504, 1.804, 2.104, 2.404, 2.754, 0.304, 0.304, 0.054, 0.604, 0.604, 0.904 ] # Loop over the spectra. for i in xrange(len(names)): # Load the peak intensities. spectrum.read_intensities(file=names[i]+'.list', dir='', spectrum_id=names[i], int_method='height') # Set the relaxation times. relax_fit.relax_time(time=times[i], spectrum_id=names[i]) # Specify the duplicated spectra. spectrum.replicated(spectrum_ids=['T1_304.04', 'T1_304.040']) spectrum.replicated(spectrum_ids=['T1_604.04', 'T1_604.040']) # Peak intensity error analysis. spectrum.error_analysis() # Deselect unresolved spins. # deselect.read(file='unresolved', mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5) # Set the relaxation curve type. relax_fit.select_model('inv') # Grid search