Frequently Asked Questions
Tools Home Molecular Biology NMR Data Model VENN Links
               
UCHC>SBF>TOOLS_HOME>FAQ>NMR>NMR_TOOLKIT
FAQ List
1. How may I obtain a copy of the Rowland NMR Toolkit (RNMRTK) program suite?
2. What is shared memory?
3. How do I increase the amount of shared memory on my system?
4. What special changes are needed to make RNMRTK work on an Apple OSX system?
5. Why does the script error with "noisecalc: command not found"?
6. Why does the script error with "Insufficient memory" when executing the rnmrtk LOAD or LOADVNMR command?
7. My section program does not support the -c and -d options. What do I do?
8. Why do I get an "Illegal size value" error when creating a shared memory section?
9. How can I setup a Varian BioPack sequence to use a sample schedule?



1. How may I obtain a copy of the Rowland NMR Toolkit (RNMRTK) program suite? (top)
The Rowland NMR Toolkit program suite is made freely available to academic and not-for-profit institutions. It is asked that you fill out a license agreement which can be found here. The license agreement may be mailed to the address listed at the top of the agreement or faxed to 1-860-679-8407. Contact Jeffrey Hoch for further information, including commercial licenses.

2. What is shared memory? (top)
Shared memory, as the name implies, is system memory that may be shared between programs. The Rowland NMR Toolkit programs utilize shared memory as a "scratch pad" to store data while computations are performed. The shared memory will utilize physical memory if it is available but can also be located on the disk in a swap partition. Before running RNMRTK programs a shared memory section file needs to be created and needs to be created large enough to contain the data. The size must be large enough to hold the raw NMR data and any signal processing events which may change the data size such as zero-filling. Shared memory sections are created using the RNMRTK program section. By default unix systems have restrictions on the size of shared memory sections that may be created. In order to utilize the RNMRTK it is very likely that you will need to change the configuration files to allow larger shared memory sections to be created. See increasing the size of shared memory sections on my system for more details. Note that the RNMRTK script generator relies on a newer version of the program section which has -c (create) and -d (delete) options. If you have an older version of section which does not support these options it is strongly advised that you obtain a more current version of the software. Contact Jeff Hoch to obtain a more recent version.

3. How do I increase the amount of shared memory on my system? (top)
The maximum size of a shared memory section is controlled by the kernel parameter shmmax. This parameter is set slightly differently depending on the operating system you are using. Below are instructions for Linux, Mac OSX 10.3 and earlier, and Mac OSX 10.4. shmmax may be changed up to a value which is equal to the total amount of memory in the system (physical + swap). Note that increasing the value of shmmax does not affect the amount of available RAM for the system and other programs. Also, once a shared memory section is created with the section program NO memory is actually used. Memory is only used once data is loaded into the shared memory section. Thus creating a shared memory section by itself will do nothing to system performance. However, once data is loaded into the shared memory section it will remain there until it is purged or the shared memory section is destroyed. Note that the script generator by default deletes all shared memory sections at the end of the script to avoid wasting memory by accidentally forgetting to delete the shared memory section after processing is complete. Data can simply be loaded into the RNMRTK program with the load command if needed after the processing is complete.
How large should you set shmmax? You want to set shmmax to a value large enough to handle any data set you may want to process with the RNMRTK. shmmax is entered in bytes. I often set shmmax equal to 1,000 or 2,000 MB on our systems, where 1 MB = 1048576 bytes. The section program, which creates the shared memory sections, creates a 1024 byte header in addition to the size stipulated when it is executed. Because of this I generally set shmmax 1 MB larger than the largest data set size I expect to process. For example if I want to set shmmax to 1 GB the value you will enter for shmmax will be equal to 1048576 x (1000 + 1) = 1049624576.
Information about the current shared memory size limitations for your system may be obtained by using the ipcs command. For linux comptuers you may use ipcs -ml. For OSX systems you may try ipcs -M.


4. What special changes are needed to make RNMRTK work on an Apple OSX system? (top)
Installation of the RNMRTK program suite is not significantly different on an OSX system than any other system. Like all other systems the exe folder of the RNMRTK program should be placed in the path and the maximum size of allowed shared memory sections should be increased (see FAQ #3 for more information). In addition, on OSX systems the user process resource limit for the stack size and the size of the data area  need to be adjusted using the shell built-in command ulimit. To do this add two lines to wherever you set the path. One line should be "ulimit -s 32768" and the other line should be "ulimit -d 300000" both without the quotes. As an example here is a section from my /etc/profile file on an OSX system running bash as my default shell:
# Setup for Rowland NMR Toolkit
PATH=$PATH:/private/imports/cluster-apps/rnmrtk.v3/exe
export PATH
ulimit -s 32768
ulimit -d 300000

5. Why does the script error with "noisecalc: command not found? (top)
The program nosiecalc is a new addition to the RNMRTK suite and may not be located in the exe folder of rnmrtk program if you did not recently obtain a copy. The noisecalc program analyzes noise in your spectrum in order to automatically obtain initial guess for def and aim to perform a maximum entropy reconstruction. If noisecal is not in your copy of the RNMRTK you may either go to the downloads and follow the instructions for installing noisecalc, or obtain a more recent version of the RNMRTK program suite. I recommend the latter as there have been many fixes to the program besides the addition of noisecalc.

6. Why does the script error with "Insufficient memory" when executing the rnmrtk LOAD or LOADVNMR command? (top)
The RNMRTK script generator is setup to always create the smallest shared memory sections needed to process the data. The RNMRTK program uses 32 bit data (4 bytes) and utilizes a 1024 byte header. When the program section is used to create shared memory sections, only the size of the actual NMR data is entered. The section program automatically multiplies the total size by 4 to deal with the 32 bit data and adds 1024 bytes to take care of the header size. Older version of the section program did not do this. If you have an older version of section program which does not adjust automatically for 32 bit data and the header size you can fix the problem by manually editing the script to make the shared memory sections larger or obtain a more recent version of the RNMRTK program suite. I highly recommend the latter as many other changes to the program have been made. Another possible problem is that there was an earlier error in the script when creating a shared memory section that stated "Illegal value". In this case an existing shared memory section would exist that is too small to hold all of the data and the script encountered an error when trying to make a larger shared memory section. The most likely cause of this would be that the value of shmmax has not been set large enough on your system for the data set you are processing. See FAQ #3 for more information about this.

7. My section program does not support the -c and -d options. What do I do? (top)
The scripts created with the RNMRTK script generator utilize the -c (create) and -d (delete) options of the section program. These options are new additions to the section program and may not be present on your distribution if it is older. The fix is to get the latest version of the RNMRTK program suite.

8. Why do I get an "Illegal size value" error when creating a shared memory section? (top)
The most likely scenario for getting an "Illegal size value" error when creating a shared memory section is that the value of the kernel parameters shmmax or shmall are set too small for the memory section you are attempting to create. shmmax sets the largest single shared memory section which may be created on the system and shmall sets the maximum size of all shared memory sections combined on the system. In order to use the RNMRTK the value of shmmax and possibly shmall will need to be adjusted to a value large enough to hold the NMR data sets which you are processing. See FAQ #3 for instructions on how to do this.

9. How can I setup a Varian BioPack sequence to use a sample schedule? (top)
Forturnatly the folks at Varian and the Orekhov group have made this very easy. Once you have a BioPack sequence loaded and setup properly it is a two step process. First you run the macro BP_NLSinit (which is installed in the latest version of BioPack). This macro creates a new pulse sequence suitable for non-uniform data collection with the same base pulse sequence name with a _S added to the end and compiles it. Creates new parameters needed to use a sample schedule, changes some parameters such as seqfil to match the new sequence, and creates a new parameter list dgnls. By entering dgnls the newly created parameters can be adjusted. To run the BP_NLSinit macro you simply type BP_NLSint(dim) from the VNMR command line, where dim is the number of dimensions in the experiment. For VNMRJ these steps are done through buttons in the Digital Filters page. However, I do not have a copy of VNMRJ yet so I can't speak for the exact method. It should be quite straightforward. The second step is to create a sample schedule and adjust parameters so that the sample schedule is used in the data collection. There are two options for this. One is to let the Varian macros generate the sampling schedule for you based on information provide in the dgnls window. The second is to create your own schedules with sampsched2d, coast, our on-line sample scheduler, or any other method you choose. To use the Varian macro method you need to set nimax and ni2max to the maximum increment size you want in each dimension. You then set ni and ni2 to some values. The product of ni and ni2 will determine the number of acquisition units (lines in the sample schedule) that are created. ni and ni2 lose their traditional meaning when using a sample schedule as both are incremented together based on the values in the sample schedule. They are only used here as a means of setting the number of lines in the sample schedule. There is one issue however, the macro is designed so that ni and ni2 must be smaller than nimax and ni2max, respectively. Once ni and ni2 are set you must set T2sp and T2sp2 which controls the decay constant which shifts the distribution of points that will be picked. The parameter SPARSE should be set to "y" and then you execute the macro BP_NLSset. This will create a sample schedule in the /vnmrsys/exp# folder with a name that is the same as the pulse sequence but has a .hdr_3 extension. If you are using your own sample schedule simply copy the schedule to the /vnmrsys/exp# folder and rename it to have the same name as the pulse sequence but with a .hdr_3 extension. Set ni=1 and ni2=the number of lines in the sample schedule. Make sure the SPARSE flag is set to "y" and you are ready to go. Just a few notes. This procedure describes a 3D case, but can be easily adapted to other dimensionality experiments. This method uses sample schedules that start at 0. The RNMRTK needs the sample schedule to start at 1. In the downloads page you may download a Perl script that can be used to adapt sample schedules by either adding or subtracting 1 from all the values.. Make sure the the SPARSE flag is set to "y" or you will collect a "normal" experiment. Also make sure that the phase and phase2 parameters are set properly (typically to phase2,phase) for 3D experiments.