Author: tlinnet Date: Fri Aug 29 16:02:33 2014 New Revision: 25436 URL: http://svn.gna.org/viewcvs/relax?rev=25436&view=rev Log: Implemented systemtest: test_bug_negative_intensities_cpmg, to show lack of error message to user. Maybe these spins should be de-selected, or at least show a better warning. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. Added: trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ncyc.txt trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/peaks_list_max_standard.ser Modified: trunk/test_suite/system_tests/relax_disp.py Added: trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ncyc.txt URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ncyc.txt?rev=25436&view=auto ============================================================================== --- trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ncyc.txt (added) +++ trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/ncyc.txt Fri Aug 29 16:02:33 2014 @@ -0,0 +1,17 @@ +28 0.06 466.66666666666666666666 599.8908622 2.47e+03 +0 0.06 0 599.8908622 2.34e+03 +4 0.06 66.66666666666666666666 599.8908622 2.41e+03 +32 0.06 533.33333333333333333333 599.8908622 2.42e+03 +60 0.06 1000.00000000000000000000 599.8908622 2.45e+03 +2 0.06 33.33333333333333333333 599.8908622 2.42e+03 +10 0.06 166.66666666666666666666 599.8908622 2.42e+03 +16 0.06 266.66666666666666666666 599.8908622 2.44e+03 +8 0.06 133.33333333333333333333 599.8908622 2.39e+03 +20 0.06 333.33333333333333333333 599.8908622 2.4e+03 +50 0.06 833.33333333333333333333 599.8908622 2.42e+03 +18 0.06 300.00000000000000000000 599.8908622 2.46e+03 +40 0.06 666.66666666666666666666 599.8908622 2.41e+03 +6 0.06 100.00000000000000000000 599.8908622 2.45e+03 +12 0.06 200.00000000000000000000 599.8908622 2.45e+03 +0 0.06 0 599.8908622 2.39e+03 +24 0.06 400.00000000000000000000 599.8908622 2.45e+03 Added: trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/peaks_list_max_standard.ser URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/peaks_list_max_standard.ser?rev=25436&view=auto ============================================================================== --- trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/peaks_list_max_standard.ser (added) +++ trunk/test_suite/shared_data/dispersion/KTeilum_FMPoulsen_MAkke_2006/bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223/peaks_list_max_standard.ser Fri Aug 29 16:02:33 2014 @@ -0,0 +1,17 @@ +REMARK SeriesTab Input: peaks_list.tab Output: peaks_list_max_standard.ser +REMARK Mode: Maximum Dimensions: 2 +REMARK Input Region: X +/- 0 X-ZF: 1 +REMARK Analysis Region: X +/- 0 +REMARK Input Region: Y +/- 0 Y-ZF: 1 +REMARK Analysis Region: Y +/- 0 + +VARS INDEX X_AXIS Y_AXIS X_PPM Y_PPM VOL ASS Z_A0 Z_A1 Z_A2 Z_A3 Z_A4 Z_A5 Z_A6 Z_A7 Z_A8 Z_A9 Z_A10 Z_A11 Z_A12 Z_A13 Z_A14 Z_A15 Z_A16 +FORMAT %5d %9.3f %9.3f %8.3f %8.3f %+e %s %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f %7.4f + +NULLVALUE -666 +NULLSTRING * + + 1 1711.104 3040.110 8.514 121.681 +5.586445e+05 A3N-HN 1.0000 1.7492 0.9997 1.0075 1.0081 0.8991 1.0205 0.9893 1.0145 1.0078 1.0133 1.0020 0.9995 1.0020 1.0249 1.7571 1.0016 + 2 2011.491 4112.494 8.025 117.805 +6.213668e+05 E4N-HN 1.0000 -1.6032 0.8322 0.9920 0.9951 0.8300 0.9458 0.9689 0.9246 0.9936 0.9914 0.9842 1.0011 0.8529 0.9727 1.5845 0.9822 + 3 1974.019 2629.250 8.086 123.166 +4.592940e+05 F5N-HN 1.0000 1.8235 0.8614 1.0135 1.0134 0.8825 0.9332 0.9772 0.9273 0.9803 0.9986 1.0000 1.0012 0.8923 0.9421 1.8102 1.0062 + 4 1608.518 3683.374 8.681 119.356 +5.293190e+05 D6N-HN 1.0000 1.6865 0.8531 1.0052 1.0065 0.8530 0.9280 0.9594 0.8989 0.9914 1.0115 0.9743 1.0063 0.8177 0.9264 1.6855 0.9981 Modified: trunk/test_suite/system_tests/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=25436&r1=25435&r2=25436&view=diff ============================================================================== --- trunk/test_suite/system_tests/relax_disp.py (original) +++ trunk/test_suite/system_tests/relax_disp.py Fri Aug 29 16:02:33 2014 @@ -1749,6 +1749,81 @@ # Auto-analysis execution. with self.assertRaises(RelaxError): relax_disp.Relax_disp(pipe_name='relax_disp', results_dir=RESULTS_DIR, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, modsel=MODSEL, insignificance=INSIGNIFICANCE, numeric_only=NUMERIC_ONLY) + + + def test_bug_negative_intensities_cpmg(self): + """Test data, where peak intensities are negative in CPMG + + This uses the data from paper at U{http://dx.doi.org/10.1073/pnas.0509100103}. This is CPMG data with a fixed relaxation time period. Experiment in 0.48 M GuHCl (guanidine hydrochloride). + """ + + data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'KTeilum_FMPoulsen_MAkke_2006'+sep+'bug_neg_int_acbp_cpmg_disp_048MGuHCl_40C_041223' + + # Create the spins + self.interpreter.spectrum.read_spins(file="peaks_list_max_standard.ser", dir=data_path) + + # Name the isotope for field strength scaling. + self.interpreter.spin.isotope(isotope='15N') + + # Read the spectrum from NMRSeriesTab file. The "auto" will generate spectrum name of form: Z_A{i} + self.interpreter.spectrum.read_intensities(file="peaks_list_max_standard.ser", dir=data_path, spectrum_id='auto', int_method='height') + + # Loop over the spectra settings. + ncycfile=open(data_path + sep + 'ncyc.txt', 'r') + + # Make empty ncyclist + ncyclist = [] + + i = 0 + for line in ncycfile: + ncyc = line.split()[0] + time_T2 = float(line.split()[1]) + vcpmg = line.split()[2] + set_sfrq = float(line.split()[3]) + rmsd_err = float(line.split()[4]) + + # Test if spectrum is a reference + if float(vcpmg) == 0.0: + vcpmg = None + else: + vcpmg = round(float(vcpmg), 3) + + # Add ncyc to list + ncyclist.append(int(ncyc)) + + # Set the current spectrum id + current_id = "Z_A%s"%(i) + + # Set the current experiment type. + self.interpreter.relax_disp.exp_type(spectrum_id=current_id, exp_type='SQ CPMG') + + # Set the peak intensity errors, as defined as the baseplane RMSD. + self.interpreter.spectrum.baseplane_rmsd(error=rmsd_err, spectrum_id=current_id) + + # Set the NMR field strength of the spectrum. + self.interpreter.spectrometer.frequency(id=current_id, frq=set_sfrq, units='MHz') + + # Relaxation dispersion CPMG constant time delay T (in s). + self.interpreter.relax_disp.relax_time(spectrum_id=current_id, time=time_T2) + + # Set the relaxation dispersion CPMG frequencies. + self.interpreter.relax_disp.cpmg_setup(spectrum_id=current_id, cpmg_frq=vcpmg) + + i += 1 + + # Specify the duplicated spectra. + self.interpreter.spectrum.replicated(spectrum_ids=['Z_A1', 'Z_A15']) + + # Delete replicate spectrum + #self.interpreter.spectrum.delete('Z_A15') + + MODELS = ['R2eff'] + GRID_INC = 5; MC_NUM = 3; MODSEL = 'AIC' + + results_dir = ds.tmpdir + + # Execute + relax_disp.Relax_disp(pipe_name='relax_disp', results_dir=results_dir, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, modsel=MODSEL) def test_check_missing_r1(self):