Hi Peixiang, Do you have original peak lists with the peak intensities? Or only processed R2eff data? For the variable time dispersion data, if you have peak lists, this is very easy to use in the relax GUI. From the perspective of the user, there is actually no difference between the variable time and fixed time experiment types in relax. That is probably why you cannot find this difference that you are looking for ;) In the peak intensity wizard, via the 'Add' button in the spectra list box, you simply set your relaxation time periods for each peak list to what ever value you wish. For a fixed time experiment, you would simply set everything to say 0.03 seconds. For a variable time experiment, you set it to 0.01, 0.02, 0.03, 0.04, ... seconds, or which ever times you have collected. Perform the rest of the setup as normal, and click the 'Execute' button. Done. The difference between the two happens internally in relax. You will only see this in the log messages. The difference is in the R2eff model (http://www.nmr-relax.com/manual/R2eff_model.html). If all peak lists have the same relaxation time period, then the two point calculation will be used (for both the value and error). If there are different relaxation times, then exponential curve-fitting will be used to determine R2eff (and errors calculated via Monte Carlo simulations). The R2eff model automatically switches to the fixed or variable time mode depending on your input relaxation times. Regards, Edward On 30 May 2014 15:51, pma <Peixiang.Ma@xxxxxx> wrote:
Thanks, Troels, I would say I did not find a better way than getting 'dirty' hands to handle my data. My data is not fix-time R1rho. In gui, I did not figure out where to input the variable-relaxation-time spectra data. I only find that the scripts M61 could do it easily. So I chose the M61 script as my starting point. I want to check how it does the fitting, so I looked up into the codes. Actually, I have all the fitted R2eff by other software (not Relax), do you have a idea, whether I could use gui to directly do the dispersion analysis with my fitted R2eff? If I could do this, then it will be much easier for me. I saw in the gui, I could import relaxation data from 'R1 Relaxation data'. But gui still asks for spectra data. I could not go further with gui. Anyway, thanks a lot Troels, with your suggestion I could already do some analysis although still not enough :) Peixiang On 05/28/2014 11:17 AM, Troels Emtekær Linnet wrote:Hi Peixiang. It sounds like you would like to get your hands "dirty" with code. 1) Regarding Global fitting / Clustering. First perform a normal analysis, which makes a result folder for each model, and a final model. Then perform global analysis. Cluster residues you find interesting. Point to the previous results folder. It will find the result files, and copy over the parameters. For the shared variables, it will take the values for clustered residues and do a mean. This will be you starting point for minimisation. See it as a replacement for the grid search. You can tweak this process, by making a script that sets the parameter values before grid search. See help(value), or make some "fake" parameter files. 2) Input values Input in the unit as documentations says. :-) The conversion is being done for you: See lib/nmr.py specific_analyses/relax_disp/data.py in function return_offset_data. Best Troels 2014-05-28 10:48 GMT+02:00 pma <Peixiang.Ma@xxxxxx>:Thanks, Edward and Troels, 'The trick with the auto-analysis is to use the result of the analytic model as the starting point for optimisation of the numeric model, so that the grid search is bypassed.' That is very useful trick, I solved most of the errors with it. I did not mean 8 inc is heavy for grid search, but the calculated "Searching through 32768 grid nodes." is too heavy! That is only one residue for 5 dimensions parameters grid. You can imagine how much it will be if I clustered several residues. Actually I indeed tried with cluster several residues, the program warns too much grid search and stop. Actually, this problem could also be solved by the individual res fitting and then load the individual results and run the 'cluster' version scripts. This could be a common problem for the fresh user like me. Thanks for you remind, I update to 3.2.0. However, I met new questions again. I thought there is a mistake in the sample script. (relax-3.2.1/sample_scripts/relax_disp/R1rho_analysis.py) The script read the data relax_disp.spin_lock_field(spectrum_id=id, field=field), I checked the function by help, field is Hz. However, in MP05 and ns_r1rho_2site.The R1rho spin-lock field strengths (in rad.s^-1). I did not find where the program will multipy 2*pi. I think the simplest way would be multiply 2*pi in reading the field (field=field*2*pi). However, I do not know whether it will affect other calculation or not if change the field like this. ######################################################### The relax_disp.spin_lock_field user function. Synopsis Set the relaxation dispersion spin-lock field strength (nu1). Defaults relax_disp.spin_lock_field(spectrum_id=None, field=None) Keyword Arguments spectrum_id: The spectrum ID string to associate the spin-lock field strength to. field: The spin-lock field strength, nu1, in Hz. Description This sets the spin-lock field strength, nu1, for the specified R1rho spectrum in Hertz. Prompt examples To set a spin-lock field strength of 2.1 kHz for the spectrum 'nu1_2.1kHz_relaxT_0.010', type one of: relax> relax_disp.spin_lock_field(2100, 'nu1_2.1kHz_relaxT_0.010') relax> relax_disp.spin_lock_field(field=2100, spectrum_id='nu1_2.1kHz_relaxT_0.010') #################################################################### Best, Peixiang On 05/22/2014 05:02 PM, Edward d'Auvergne wrote:Hi Peixiang, You should find the answers to most of your questions in the relax manual. Please see below:Thanks for you reply. I used the script mode in linux. I tried with 'r1rho_on_res_m61.py', but I think in the script it has a mistake. in line27 ds.fixed = True, I think it should be False, because this experiment has different time period, they do not need the ref. I changed to False, the M61 model still give right result.Anything starting with 'ds' in the test suite scripts can be ignored. These are internal data structures used to share scripts between different tests in the test suite - they are not to be used by normal users. You should be very careful with the scripts in test_suite/system_tests/scripts/, as these can be full of such developer-only code. If these are tripping you up and the sample_scripts are not sufficient, you might prefer to use the graphical user interface (GUI). This makes the dispersion analysis very simple.But I still have some other questions. 1. How did you declare replicates in such Variable relaxation period experiments? I saw in the example r1rho_on_res_m61.py, you read all the data into a big Matrix data and did not declare the replicate. But for the fixed time period you declare by the spectrum ID. Did you have a solution for this?relax is fully flexible. You simply use the spectrum.replicated user function - then relax will take care of the rest. See the manual (http://www.nmr-relax.com/manual/Dispersion_script_mode_loading_data.html and http://www.nmr-relax.com/manual/Dispersion_GUI_mode_loading_data.html). Please note that you really must upgrade to the recently release relax 3.2.0 as it fixes a severe bug in the replicated spectra error analysis for the relaxation dispersion analysis in relax: http://www.nmr-relax.com/download.html, https://mail.gna.org/public/relax-announce/2014-05/msg00000.html, https://freecode.com/projects/nmr-relax/releases/363882, https://gna.org/forum/forum.php?forum_id=2461. I can see that you are not signed up for the relax-announce mailing list, so you probably missed the announcement. It is worth signing up to this list at https://mail.gna.org/listinfo/relax-announce/. This email list receives around 10 emails per year, so it is a very low traffic list.2. I want to test NS R1rho 2-site, so I simply add it into the MODELS in 'r1rho_on_res_m61.py'. It seems does not work. first, they give the warning when it comes to NS R1rho 2-site, (grid_inc =8 ) ------------------------------------------------------------------------------------------------------------------------------ Searching through 32768 grid nodes. lib/dispersion/ns_r1rho_2site.py:118: RuntimeWarning: divide by zero encountered in double_scalars theta = atan(spin_lock_fields[i]/dA) lib/dispersion/ns_r1rho_2site.py:132: RuntimeWarning: invalid value encountered in double_scalars back_calc[i]= -inv_relax_time * log(MA) -----------------------------------------------------------------------------------------------------------------------------We are working on removing these warnings at the moment. It is safe to ignore them.I think the grid search is too heavy for the NS model, do you have a solution to constrain it?A grid_inc of 8 will be very much insufficient! For any NMR theory. I suggest you use the dispersion auto-analysis I have developed and talked about in the publication (http://dx.doi.org/10.1093/bioinformatics/btu166). The trick with the auto-analysis is to use the result of the analytic model as the starting point for optimisation of the numeric model, so that the grid search is bypassed. This is described in the paper and extensively in the relax manual. In the auto-analysis, for the numeric R1rho model, Art Palmer's analytic model MP05 (http://wiki.nmr-relax.com/MP05) is used.Or for example, if I want to limit grid search only for kex and pA, but not for others, how can I declare that?I'm not sure what you mean. Do you mean only perform a grid search over certain parameters and not others? Such tricks should only be used if you have extensive knowledge of the relaxation dispersion phenomenon and you know exactly what the consequences of this will be. If so, you will know what the user function relax_disp.set_grid_r20_from_min_r2eff that Troels Linnet added to relax can do for you.For RuntimeWarning: divide by zero encountered in double_scalars, do you have suggestions for this?Ignore them.The final results for 'NS R1rho 2-site' did not fit at all, so the data for M61 can only be fit with M61 model but not other models?The M61 model, according to the relax manual (http://www.nmr-relax.com/manual/M61_2_site_fast_exchange_R1_model.html), is for on-resonance data. The 'NS R1rho 2-site' is for off-resonance data. That will probably explain what you see. I hope these explanations help. You should look at the relaxation dispersion chapter of the relax manual though, as some of your questions are extensively covered in there. Regards, Edward_______________________________________________ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@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-users_______________________________________________ relax (http://www.nmr-relax.com) This is the relax-users mailing list relax-users@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-users