Hi,
This is part of the clean design of relax. The code in the lib and
target_functions packages are absolutely forbidden from touching the relax
data store. Only the code in the pipe_control and specific_analyses can.
These last two packages are for handling data input, packaging for other
parts of relax, and data output. An exception is the data package which
defines the relax data store. All the other relax packages - multi, docs,
graphics, user_functions - are also forbidden. One grey area is the gui
package. I would really like to make a clean separation for the gui by
accessing data via functions in pipe_control and specific_analyses. Such a
transition is slow though, and has been in progress since Michael Bieri
created the first version of the relax GUI. But my eventual aim is to
abstract the GUI from the data store layout, and forbid that package too.
Regards,
Edward
On Tuesday, 22 October 2013, Troels Emtekær Linnet wrote:
> Ah ja. :-)
>
> I found the information in:
> specific_analyses/relax_disp/api.py
> specific_analyses/relax_disp/disp_data.py
>
> It is the return_offset_data() function.
>
> For reference:
> ----------------
>
>
> # Convert the shift from ppm to rad/s and store it.
> shifts[spin_index, frq_index] = spin.chemical_shift * 2.0 * pi * frq / g1H
> * return_gyromagnetic_ratio(spin.isotope) * 1e-6
>
> # Store the offset in rad/s.
> offsets[spin_index, frq_index, disp_pt_index] = cdp.spin_lock_offset[id] *
> 2.0 * pi * frq / g1H * return_gyromagnetic_ratio(spin.isotope) * 1e-6
>
> # Calculate the tilt angle.
> point = cdp.spin_lock_nu1[id]
> omega1 = point * 2.0 * pi
>
> Delta_omega = shifts[spin_index, frq_index] - offsets[spin_index,
> frq_index, disp_pt_index]
> if Delta_omega == 0.0:
> theta[spin_index, frq_index, disp_pt_index] = pi / 2.0
> else:
> theta[spin_index, frq_index, disp_pt_index] = atan(omega1 /
> Delta_omega)
> ------------------
>
> Which resembles:
>
> $OMEGA=($centerPPM-$chemShift{$peakName})*$frq+$offset{$i};
> $omegaEFF=sqrt($OMEGA**2+$omega1{$i}**2);
> if (($omega1{$i}/$OMEGA) > 0){
> $theta=180/$PI*abs(atan($omega1{$i}/$OMEGA));
> }else{
> $theta=180-180/$PI*abs(atan($omega1{$i}/$OMEGA));
>
>
>
>
> 2013/10/22 Edward d'Auvergne <[email protected]>
>
> I have to give up for the day, but just a quick hint - look in the
> modules of the specific_analyses.relax_disp package! The disp_data
> module is probably your best bet.
>
> Bye,
>
> Edward
>
>
>
> On 22 October 2013 19:16, Troels Emtekær Linnet <[email protected]>
> wrote:
> > Hi Edward.
> >
> > I prefer to do the calculations straight away in my scripts, from the
> > information which is ex-tractable from the procpar files.
> > But I guess that is a matter of taste.
> >
> > But now I think I got it. :-) Thanks!
> > I guess that relax calculates "omega_rf_ppm - chemShift{peakName} ", but
> I
> > could not locate this functions call.
> > ( I do load the chemical shifts from a SPARKY list, (the seriesTab
> format is
> > not yet supported). )
> >
> >
> > I now do the settings script, by settting variables:
> > # In MHz
> > yOBS = 81.050
> > # In ppm
> > yCAR = 118.078
> > centerPPM_N15 = yCAR
> >
> > And then I calculate the offset in ppm for each spectrum.
> >
> > # Calculating the spin-lock offset in ppm, from offsets values provided
> in
> > Hz.
> > #frq_N15_Hz = set_sfrq * 1E6 * gyro15N / gyro1H
> > frq_N15_Hz = yOBS * 1E6
> > offset_ppm_N15 = float(deltadof2) / frq_N15_Hz * 1E6
> > omega_rf_ppm = centerPPM_N15 + offset_ppm_N15
> >
> > And the range is now 118.078 ppm to 241.45 ppm.
> >
> > I tried to locate the corresponding calculation of OMEGA in relax, but i
> was
> > not successful.
> > I looked in:
> >
> > lib/dispersion/dpl94.py
> > target_functions/relax_disp.py
> >
> > I wonder where how to locate the calculation of theta?
> >
> > Best
> > Troels
> >
> >
> >
> >
> >
> >
> > 2013/10/22 Edward d'Auvergne <[email protected]>
> >>
> >> Hi,
> >>
> >> You could look at the relax code for how omega_eff is calculated.
> >> However you will never use this - it is never input into relax. If
> >> you have a look at the sample_scripts/relax_disp/R1rho_analysis.py
> >> script, you will see that all is needed is an equivalent of the table:
> >>
> >> # The spectral data - spectrum ID, peak list file name, spin-lock
> >> field strength (Hz), the spin-lock offset (ppm), the relaxation time
> >> (s), spectrometer frequency (Hz), and experimental error (RMSD of the
> >> base plane noise for each spectrum).
> >> data = [
> >> ['ref_500MHz', 'ref_500MHz.list', , None, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_1000.0_500MHz', 'nu_1000.0_500MHz.list', 1000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_1500.0_500MHz', 'nu_1500.0_500MHz.list', 1500.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_2000.0_500MHz', 'nu_2000.0_500MHz.list', 2000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_2500.0_500MHz', 'nu_2500.0_500MHz.list', 2500.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_3000.0_500MHz', 'nu_3000.0_500MHz.list', 3000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_3500.0_500MHz', 'nu_3500.0_500MHz.list', 3500.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_4000.0_500MHz', 'nu_4000.0_500MHz.list', 4000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_4500.0_500MHz', 'nu_4500.0_500MHz.list', 4500.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_5000.0_500MHz', 'nu_5000.0_500MHz.list', 5000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_5500.0_500MHz', 'nu_5500.0_500MHz.list', 5500.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['nu_6000.0_500MHz', 'nu_6000.0_500MHz.list', 6000.0, 110.0, 0.1,
> >> 500e6, 200000.0]
> >> ['ref_800MHz', 'ref_800MHz.list', , None, 110.0, 0.1,
> >> 800e6, 200000.0]
> >> ['nu_1000.0_800MHz', 'nu_1000.0_800MHz.list', 1000.0, 110.0, 0.1,
> >> 800e6, 200000.0]
> >> ['nu_1500.0_800MHz', 'nu_1500.0_800MHz.list', 1500.0, 110.0, 0.1,
> >> 800e6, 200000.0]
>
>
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel mailing list
[email protected]
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-devel