ScienceSoft, LLC

CHAPTER 10: Using the Directory Editor

The Directory Editor can be started from the [Directory Editor] button in the NMRanalyst application window as described in CHAPTER 9: "Using the NMRanalyst Window". The editor window shows the current values of the NMRDIR, NMRUSER, NMRDATA, and NMRSPEC shell variables. [OK] commits the current input values and exits from the editor. [Cancel] exits from this window and leaves input values unchanged. While computations are in progress, the [OK] button is disabled (dimmed).

When clicking on a history button ([NMRDIR], [NMRUSER], [NMRDATA], [NMRSPEC]), a list of previous shell variable entries is displayed. The folder buttons at the right side of the text fields open a Filebox for locating the desired directory. See CHAPTER 11: "Using the Filebox Popup" for details.

10.1 NMRDIR, NMRUSER, NMRDATA, and NMRSPEC Shell Variables

The [NMRDIR], [NMRUSER], [NMRDATA], and [NMRSPEC] buttons in the Directory Editor show a history list of the corresponding shell variables. Up to 50 previous entries for each shell variable are saved in the $HOME/.analyst setup file. For example, the shown history list is started by the [NMRDATA] button and allows setting the NMRDATA shell variable.

These shell variables have the following functions:

Specifies the NMRanalyst installation directory. If the NMRDIR variable is not set before NMRanalyst is started, the variable is set automatically given that the installation directory is in a default location. See CHAPTER 2: "NMRanalyst Installation" and CHAPTER 9: "Using the NMRanalyst Window" for details. Being able to change NMRDIR allows one to switch between different installation directories. However, the components of different NMRanalyst versions might not be compatible. So switching between installation directories of different software versions is not encouraged.

Identifies the NMRanalyst working directory. If it is unset upon program startup, NMRDATA defaults on Linux to the current directory and on MS Windows to $NMRDIR/data. All user-specified files without pathname are saved in and loaded from this directory. All NMRanalyst interface files (*.txt, *.log, and *.log.bck) are written in the NMRSPEC subdirectory of the NMRDATA directory (e.g., $NMRDATA/INADEQUATE/report.log). To switch between analysis directories, change the NMRDATA variable from the Directory Editor. To change the analysis spectrum type, change the NMRanalyst Spectrum Type menu as described in CHAPTER 9: "Using the NMRanalyst Window" or change the NMRSPEC variable as desired below.

If the NMRDATA directory does not contain an input file (*.txt) for a selected workwindow, then a default file is loaded from the NMRSPEC subdirectory of the NMRUSER directory. If NMRUSER is unset upon program startup, this variable defaults to $NMRDIR/UserData. Directory NMRUSER contains files used by NMRanalyst, which a user might want to modify, such as default workwindow input screen values. To modify these files, create a copy of the whole directory (normally called UserData), modify the files as desired, and set the NMRUSER variable to the modified directory.

User added structures to the FindIt database are also stored in the NMRUSER directory. In order to add structures to the FindIt database, a user must have write permission to the NMRUSER directory. In case that a user does not have write access to the default NMRUSER directory ($NMRDIR/UserData), a copy of the directory can be copied to a new location and the NMRUSER variable can be set accordingly.

The NMRSPEC shell variable specifies the spectrum type to be analyzed. The value must be one of the supported types; otherwise an error popup window is displayed. Changing variable NMRSPEC in the Directory Editor and applying the change is equivalent to changing the spectrum type from the NMRanalyst menu. See CHAPTER 9: "Using the NMRanalyst Window" for details.

Note that NMRDIR, NMRUSER, NMRDATA, and NMRSPEC are regular UNIX (Linux) shell variables. User specified values always overwrite program defaults. To permanently set these shell variables, assign them values from the shell setup file $HOME/.profile for the Bourne and Korn shells. For example, a Bourne or Korn shell user can install customized workwindow input screen files by: (1) copying the UserData directory from the installation directory to the $HOME directory, (2) modifying the *.txt files in one of its subdirectories, and (3) setting NMRUSER in the .profile setup file to use the modified directory with:

 % NMRUSER=$HOME/UserData; export NMRUSER

It is still possible to change NMRUSER to another directory from the Directory Editor or to load input screen value files on an individual basis from another directory using the NMRanalyst [Load] button. When clicking on the Directory Editor [OK] button, several dialog windows might appear:

If the specified NMRDATA directory does not exist, the shown popup is displayed to query whether a new directory should be created. [Create] creates the specified directory, and [Cancel] removes the popup window. A new NMRSPEC directory is always created without questions.

In case of permission problems or a non-existent NMRDIR or NMRUSER directory, the following popup is displayed. [Cancel] removes the popup window, and [Reset ???] restores the last valid shell variable entry.

ScienceSoft, LLC