Relax-fit script mode - loading the data

To load the peak intensities into relax the spectrum.read_intensities and relax_fit.relax_times user functions are executed. Important keyword arguments for these user functions are the file name and directory, the spectrum identification string and the relaxation time period of the experiment in seconds. By default the file format will be automatically detected. Currently Sparky, XEasy, NMRView, and generic columnar formatted peak lists are supported. To be able to import any other type of format please send an email to the relax development mailing list with the details of the format. Adding support for new formats is trivial. The following series of commands - an expansion of the for loop in the sample script - will load peak intensities from six different relaxation periods, four of which have been duplicated, from Sparky peak lists with the peak heights in the 10 th column.

[numbers=none]
spectrum.read_intensities('T2_ncyc1.list',   spectrum_id='1', int_col=10)
relax_fit.relax_time(spectrum_id='1',   time=0.0176)
spectrum.read_intensities('T2_ncyc1b.list',  spectrum_id='1b', int_col=10)
relax_fit.relax_time(spectrum_id='1b',  time=0.0176)
spectrum.read_intensities('T2_ncyc2.list',   spectrum_id='2', int_col=10)
relax_fit.relax_time(spectrum_id='2',   time=0.0352)
spectrum.read_intensities('T2_ncyc4.list',   spectrum_id='4', int_col=10)
relax_fit.relax_time(spectrum_id='4',   time=0.0704)
spectrum.read_intensities('T2_ncyc4b.list',  spectrum_id='4b', int_col=10)
relax_fit.relax_time(spectrum_id='4b',  time=0.0704)
spectrum.read_intensities('T2_ncyc6.list',   spectrum_id='6', int_col=10)
relax_fit.relax_time(spectrum_id='6',   time=0.1056)
spectrum.read_intensities('T2_ncyc9.list',   spectrum_id='9', int_col=10)
relax_fit.relax_time(spectrum_id='9',   time=0.1584)
spectrum.read_intensities('T2_ncyc9b.list',  spectrum_id='9b', int_col=10)
relax_fit.relax_time(spectrum_id='9b',  time=0.1584)
spectrum.read_intensities('T2_ncyc11.list',  spectrum_id='11', int_col=10)
relax_fit.relax_time(spectrum_id='11',  time=0.1936)
spectrum.read_intensities('T2_ncyc11b.list', spectrum_id='11b', int_col=10)
relax_fit.relax_time(spectrum_id='11b', time=0.1936)

The replicated spectra a set up with the commands

[firstnumber=47]
# 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'])

Note that the relaxation time period should be calculated directly from the pulse sequence (as the sum of delays and pulses for the period), as the estimated time may not match the real time. For the Sparky peak lists, by default relax assumes that the intensity value is in the 4 th column. A typical file looks like:

     Assignment         w1         w2   Data Height

        LEU3N-HN    122.454      8.397       129722
        GLY4N-HN    111.999      8.719       422375
        SER5N-HN    115.085      8.176       384180
        MET6N-HN    120.934      8.812       272100
        ASP7N-HN    122.394      8.750       174970
        SER8N-HN    113.916      7.836       218762
       GLU11N-HN    122.194      8.604        30412
       GLY12N-HN    110.525      9.028        90144

By supplying the int_col argument to the spectrum.read_intensities user function, this can be changed. A typical XEasy file will look like:

 No.  Color    w1      w2     ass. in w1     ass. in w2    Volume     Vol. Err.  Method  Comment

   2    2    10.014 134.221   HN  21 LEU      N  21 LEU    7.919e+03  0.00e+00     m
   3    2    10.481 132.592  HE1  79 TRP    NE1  79 TRP    1.532e+04  0.00e+00     m
  17    2     9.882 129.041   HN 110 PHE      N 110 PHE    9.962e+03  0.00e+00     m
  18    2     8.757 128.278   HN  52 ASP      N  52 ASP    2.041e+04  0.00e+00     m
  19    2    10.086 128.297   HN  69 SER      N  69 SER    9.305e+03  0.00e+00     m
  20    3     9.111 127.707   HN  15 ARG      N  15 ARG    9.714e+03  0.00e+00     m

where the peak height is in the Volume column. And for an NMRView file:

label dataset sw sf
H1 N15
cNTnC_noe0.nv
2505.63354492 1369.33557129
499.875 50.658000946
H1.L H1.P H1.W H1.B H1.E H1.J H1.U N15.L N15.P N15.W N15.B N15.E N15.J N15.U vol int stat comment flag0
0 {70.HN} 10.75274 0.02954 0.05379 ++ 0.0 {} {70.N} 116.37241 0.23155 0.35387 ++ 0.0 {} -6.88333129883 -0.1694 0 {} 0
1 {72.HN} 9.67752 0.03308 0.05448 ++ 0.0 {} {72.N} 126.41302 0.27417 0.37217 ++ 0.0 {} -5.49038267136 -0.1142 0 {} 0
2 {} 8.4532 0.02331 0.05439 ++ 0.0 {} {} 122.20137 0.38205 0.33221 ++ 0.0 {} -2.58034267191 -0.1320 0 {} 0

The relax user manual (PDF), created 2016-10-28.