Author: bugman Date: Wed Mar 27 12:56:08 2013 New Revision: 19175 URL: http://svn.gna.org/viewcvs/relax?rev=19175&view=rev Log: Ported r8324 from the old relax_disp branch into the new branch. The command used was: svn merge -r8323:8324 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp@r18123 . ..... r8324 | semor | 2009-01-07 22:16:16 +0100 (Wed, 07 Jan 2009) | 5 lines Changed paths: M /branches/relax_disp/test_suite/system_tests/relax_disp.py M /branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py Modified the script so it will test for fast-exchange curve fitting from CPMG data. Data and functions to treat it arestill missing. ..... Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py Modified: branches/relax_disp/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/relax_disp.py?rev=19175&r1=19174&r2=19175&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/relax_disp.py (original) +++ branches/relax_disp/test_suite/system_tests/relax_disp.py Wed Mar 27 12:56:08 2013 @@ -59,8 +59,9 @@ ds.__reset__() - def test_curve_fitting(self): - """Test the relaxation dispersion curve fitting C modules.""" + def test_curve_fitting_cpmg_fast(self): + """Test the relaxation dispersion curve fitting C modules for CPMG data in the + fast-exchange limit.""" # Execute the script. self.relax.interpreter.run(script_file=sys.path[-1] + '/test_suite/system_tests/scripts/relax_disp.py') Modified: branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py?rev=19175&r1=19174&r2=19175&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py (original) +++ branches/relax_disp/test_suite/system_tests/scripts/relax_disp.py Wed Mar 27 12:56:08 2013 @@ -1,13 +1,13 @@ -# Script for relaxation curve fitting. +# Script for CPMG relaxation dispersion curve fitting in the fast-exchange limit. import sys # Create the data pipe. -pipe.create('rx', 'relax_fit') +pipe.create('rex', 'relax_disp') # The path to the data files. -data_path = sys.path[-1] + '/test_suite/shared_data/curve_fitting' +data_path = sys.path[-1] + '/test_suite/shared_data/disp_curve_fitting' # Load the sequence. sequence.read('Ap4Aase.seq', dir=sys.path[-1] + '/test_suite/shared_data') @@ -15,56 +15,40 @@ # Name the spins so they can be matched to the assignments. spin.name(name='N') -# Spectrum names. -names = [ - 'T2_ncyc1_ave', - 'T2_ncyc1b_ave', - 'T2_ncyc2_ave', - 'T2_ncyc4_ave', - 'T2_ncyc4b_ave', - 'T2_ncyc6_ave', - 'T2_ncyc9_ave', - 'T2_ncyc9b_ave', - 'T2_ncyc11_ave', - 'T2_ncyc11b_ave' -] +## Spectrum names. +#names = [ +# 'T2_ncyc1_ave', +# 'T2_ncyc11b_ave' +#] +# +## Relaxation dispersion CPMG frequencies (in Hz). +#frq = [ +# 0.0176, +# 0.1936 +#] -# Relaxation times (in seconds). -times = [ - 0.0176, - 0.0176, - 0.0352, - 0.0704, - 0.0704, - 0.1056, - 0.1584, - 0.1584, - 0.1936, - 0.1936 -] +# Set the relaxation dispersion experiment type. +relax_disp.exp_type('cpmg') + +# Set the relaxation dispersion curve type. +relax_disp.select_model('fast') # Loop over the spectra. for i in xrange(len(names)): # Load the peak intensities. spectrum.read_intensities(file=names[i]+'.list', dir=data_path, spectrum_id=names[i], int_method='height') - # Set the relaxation times. - relax_fit.relax_time(time=times[i], spectrum_id=names[i]) + # Set the relaxation dispersion CPMG frequencies. + relax_disp.relax_time(frq=frq[i], spectrum_id=names[i]) # Specify the duplicated spectra. -spectrum.replicated(spectrum_ids=['T2_ncyc1_ave', 'T2_ncyc1b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc4_ave', 'T2_ncyc4b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc9_ave', 'T2_ncyc9b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc11_ave', 'T2_ncyc11b_ave']) +#spectrum.replicated(spectrum_ids=['T2_ncyc1_ave', 'T2_ncyc1b_ave']) # Peak intensity error analysis. spectrum.error_analysis() # Deselect unresolved spins. deselect.read(file='unresolved', dir=data_path) - -# Set the relaxation curve type. -relax_fit.select_model('exp') # Grid search. grid_search(inc=11) @@ -79,18 +63,19 @@ minimise('simplex', constraints=False) monte_carlo.error_analysis() -# Save the relaxation rates. -value.write(param='rx', file='devnull', force=True) +# Save the relaxation dispersion parameters. +value.write(param='rex', file='devnull', force=True) # Save the results. results.write(file='devnull', force=True) # Create Grace plots of the data. grace.write(y_data_type='chi2', file='devnull', force=True) # Minimised chi-squared value. -grace.write(y_data_type='i0', file='devnull', force=True) # Initial peak intensity. -grace.write(y_data_type='rx', file='devnull', force=True) # Relaxation rate. -grace.write(x_data_type='relax_times', y_data_type='int', file='devnull', force=True) # Average peak intensities. -grace.write(x_data_type='relax_times', y_data_type='int', norm=True, file='devnull', force=True) # Average peak intensities (normalised). +grace.write(y_data_type='R2', file='devnull', force=True) # R2 parameter without Rex contribution. +grace.write(y_data_type='Rex', file='devnull', force=True) # Chemical exchange contribution to observed R2. +grace.write(y_data_type='kex', file='devnull', force=True) # Exchange rate. +grace.write(x_data_type='frq', y_data_type='int', file='devnull', force=True) # Average peak intensities. +grace.write(x_data_type='frq', y_data_type='int', norm=True, file='devnull', force=True) # Average peak intensities (normalised). # Save the program state. state.save('devnull', force=True)