Library of NMR Software


                 drx2pipe
                ==========

What the script does:
---------------------

Automatically creates the conversion file for Bruker Avance data to NMRPipe(1)
format for off-line processing.  This makes the creation of the required file
fast, trivial and error-free.  It works by inspecting the acqus files and
extracting the required parameters.  It also has the advantage that additional
information on the experiment such as the sign of peaks or indirect dimension
phasing information can be stored in the header.  The header already stores
the original filename, date, temperature, number of scans and instrument and
pulse program names.  In addition, it makes the inspection of 2D and 3D
experiments in progress very simple because the value of TD in the last
dimension is extracted to provide the current experiment status.


What you need to do:
--------------------

Install the 5 scripts (drx2pipe, 1D2pipe, 2D2pipe, 3D2pipe and 4D2pipe) in a
directory in your path and ensure that you have execute permissions on each
one.  The pulse program name is evaluated to determine if the data was recorded
as Echo/Antiecho.  I use the string "ea" in the pulse program name to flag
this, and change yMODE to "Rance-Kay" in the convert.com script.  I also use
other pairs of letters to describe the experiment.  These pairs are stripped
off the pulse program name in order to make a guess at the output filename e.g.
hnco.fid.  You will need to edit these pairs according to your own naming
convention.

Edit drx2pipe to set the directory name for the nD2pipe scripts - these lines
are marked in drx2pipe.  Also edit it for allowed instrument names ("spect" is
not an allowed name, I use an alias such as "drx500", so the string "drx" is
checked for).

If you wish to add a comment to the conversion file header simply add the
string "; NMRPipe" followed by the text to appear in the header wherever you
add comments in your pulse program.  Each occurrence of this string is
replaced by "#" in the file convert.com so it is treated as a comment.  I use
this feature to remind users of the phasing in the indirect dimensions, but it
could also be used for example to state the sign of particular peaks in the
data.

The mixing time for NOESY data can be reported in the convert.com header.  Just
add the line ";Pipeinfo NOESY" in the comments section of your pulse program,
and the value of d9 will be reported in ms.  If you use a delay other than d9
for NOESY mixing times, edit drx2pipe where indicated.

For those who use 4D NMR the script 4D2pipe makes assumptions about the way the
data has been acquired.  This is essential because XWIN-NMR currently does not
handle 4D NMR experiments in eda.  The A dimension nucleus label is stored in
the parameter EXP, the incremented delay is D20 and the number of complex
points is set by L20.  The carrier is derived from the nucleus label.  If you
run 4D experiments differently from this you will need to change 4D2pipe
accordingly.

It has been written for SGI's running Irix 5.3-6.5.  No guarantee whatsoever is
provided.  No attempt has been made to make the scripts applicable to the way
every Bruker user runs their experiments.  You are responsible for customizing
them to suit your method of working and your own needs.

Note that there is a bug in XWIN-NMR which means that the Z dimension SWH
value in 3D experiments is sometimes incorrectly recorded.  The value is
therefore calculated from the parameter IN10, but this will fail if ND10 <> 2.


How to run the scripts:
-----------------------

Type "drx2pipe" and you will be asked to enter the pathname of the data on the
spectrometer up to and including the EXPNO.  The file convert.com is created
and displayed, and you are asked if you want to convert the data now.  If you
answer "y" or hit return the data will be put into a directory called "fid"
within your current directory.  If you prefer to use a different output
filename answer "e" and use your favorite editor (specified by setting the
environment variable $EDITOR; vi is used if not set) to change the convert.com
file.

Here is an example of the output:

#! /bin/csh -f
#  convert.com
#  Created by drx2pipe on Thu Apr 4 13:25:42 PST 1996
#  Data recorded at 308.0K on drx500
#  Thu Apr  4 12:10:51 1996
#  File: /u/data/user/nmr/mydata/8/acqus
#  using pulse program hncoeags3d with 16 scans per FID
#  Phases = -90, 180 for both indirect dimensions, but P0 for 13C is approx.
#
bruk2pipe -in /u/data/user/nmr/mydata/8/ser -DMX -decim 24 -noswap \
  -xN          1024    -yN            64    -zN           128   \
  -xT           512    -yT            32    -zT            64   \
  -xMODE    Complex    -yMODE  Rance-Kay    -zMODE    Complex   \
  -xSW     8012.821    -ySW     1571.339    -zSW     1635.056   \
# -xSWppm    16.021    -ySWppm    31.006    -zSWppm    13.002   \
  -xOBS  500.130000    -yOBS   50.677748    -zOBS  125.757453   \
  -xCAR       4.702    -yCAR     119.000    -zCAR     176.000   \
  -xLAB          1H    -yLAB         15N    -zLAB         13C   \
  -ndim           3    -aq2D      States                        \
  | pipe2xyz -out fid/hnco%03d.fid -verb -ov -nofs


Reference:
----------

1.  "NMRPipe - A Multidimensional Spectral Processing System Based On Unix
    Pipes", F Delaglio et al, J Biomol NMR 6 #3, pp277-93 (1995).


If you find any bugs or have suggestions for improvement please contact me.
Good luck!


Duncan M Smith
Molecular Structure Department
Mailstop 14-2-B
Amgen Inc.
One Amgen Center Drive
Thousand Oaks
CA 91320-1789
USA

Phone   (805) 447-3171
Fax     (805) 499-7464
E-mail  duncan@amgen.com