Felix Command Language Reference



1. Introduction

What is FCL?

The Felix Command Language (FCL) is a powerful combination of spectroscopic data processing commands and a computer programming language, joined to a graphical user interface protocol. This blend of tools comes together to give Felix its flexibility and adaptability as an NMR data processing environment.

The Felix User Guide gives a detailed description of how to use the standard user interface to do virtually all of your NMR processing. The vast majority of users will never require more functionality than that provided by the standard user interface.

The Felix Command Language Reference Guide is written for advanced users who wish to enhance, modify, and extend the abilities of Felix for their special requirements. This guide contains complete descriptions of all the elements that comprise FCL. FCL commands are two or three letters, and in this documentation are presented in boldface type. Commands are case sensitive, although command arguments are not (see Case sensitivity). Symbols are also boldfaced, while parameter names are presented in the format: <parameter name>.

Using this guide

This chapter gives a brief introduction to the major components of FCL. Chapter 2, FCL Basics, explains the syntax of Felix command lines and the behavior of the Felix command interpreter. Chapter 3, Symbols and Expressions, discusses the use of symbols and arithmetic expressions. Chapter 4, Macros, details writing macros and introduces the directives that control macro execution. Chapter 5, Real-Time Displays, illustrates the building of real-time display macros that generate animated graphics, showing the effect of changing command parameter values in real-time. Chapter 6, The Database, presents a detailed explanation of the database commands and explains how to store and extract information. Appendix A, Command Reference, lists the FCL commands and gives short descriptions of how they are used. Appendix B, Symbol Reference, lists the symbols used by FCL and gives descriptions of how they interact with FCL commands. Appendix C, Macro Examples gives a few examples to get you started with writing your own macros. Please note that all references citations in this manual are listed in Appendix A, References, in the Felix book.

FCL command line

This section introduces some of the basics of FCL and the conventions used in the manual to describe the command syntax. Throughout this manual, a bold font is used to distinguish FCL commands the surrounding text. Also throughout the manual, the prompt (>) is displayed on example lines. Do not enter these symbols when using the program. When a command is shown in its general form, any parameter is represented by a text description surrounded by angle brackets (<text>). For example, the descriptive form and the explicit form of the command that defines the spectral width of a spectrum (swidth) are shown below.


def swidth <spectral width>	(as described in the manual)

def swidth 4386 (as you would enter it)
Note that the angle brackets around the parameter are not entered. To execute FCL commands, a carriage return must follow the command or parameter.

The commands within FCL consist of two- and three-letter acronyms, which symbolize the action of the command. Each command performs some function or changes the state of the program in some way. For example, the following commands,

ft
hcp
represent two simple examples of FCL commands. The ft command causes Felix to perform a Fourier transform on the data in the workspace, while the hcp command generates a hard copy output of the current spectral display. Note that a carriage return (<Enter>) must follow each of the commands for the action to take place. A list of the FCL commands along with a detailed description of their functions is found in Appendix A, Command Reference.

Symbols and expressions

One of Felix's most useful capabilities is that it allows you to use symbols to represent any value or parameter you wish. This symbolic substitution capability allows flexibility within the program and within the macros, which in turn allows automatic processing within Felix. There are two distinct types of symbols within the program, reserved symbols and user symbols.

Reserved symbols report the current status of the program or workspace. For example, when you read an FID or spectrum, the reserved symbol datfil is defined automatically as the name of that file. At a later point in time (usually within a macro), that same file may be read by accessing the reserved symbol datfil instead of entering the file name explicitly. In addition, reserved symbols are used to define items such as the spectral width (swidth), the number of contour levels (nlevel), and the data type (datype). The quantity and names of reserved symbols is constant. They are initialized by Felix when the program begins, and they cannot be deleted.

User symbols are any other symbols that are named and initialized by the user or a macro while Felix is running. Examples include the loop counter defined by the for command and the result of the eva command. You can initially define as many user symbols as you want, and they can be deleted at any time.

Another of Felix's powerful capabilities is that it can evaluate complex mathematical expressions. Sometimes it is desirable to express a number or a symbol value arithmetically in terms of other numbers or symbols. Felix performs expression evaluation, where an expression may contain numbers, and symbols, as well as the arithmetic operators plus (+), minus (-), multiply (*), and divide (/). Expressions may also contain trigonometric, logarithmic and data type functions like: sin, cos, log, int, etc. Expressions must be enclosed by parentheses and may contain internal parentheses defining the order of evaluation. The expressions used in Felix are similar to those found in the BASIC and FORTRAN programming languages.

See Appendix B, Symbol Reference, for more detailed information on individual reserved symbols. See Chapter 3, Symbols and Expressions, for more information on general symbol use and expression evaluation.

Macros

Macros are an essential feature of the Felix data processing philosophy. A macro is simply a text file containing a series of Felix commands, which together perform a specific task. You can edit a macro file using most text editors. In addition to direct commands, a macro can contain symbol substitution, arithmetic expressions, and flow control statements (i.e. for loops, if/then/else statements, go to's, and subroutine calls). In effect, macros combine the capabilities of a programming language with the standard capabilities of Felix, allowing you to design customized processing procedures.

Felix comes with a library of macros capable of many common processing tasks. You can modify these macros to fit your specific needs. For example, the apodization function in our example macros will probably be customized by each user. In addition to using macros for custom data processing and analysis tasks, macros are also used to implement the Felix graphical user interface. In fact, the advanced user will find it easy to create dialog boxes and pulldown menus to design a custom environment.

Menus

The graphical user interface of Felix contains a variety of menu bars, pulldown menus, icons, and dialog boxes that interact with the user to simplify data analysis and processing. You can modify the components of the graphical user interface if you wish. In fact, the graphical user interface consists of a set of Felix macros that use specific commands to build and display graphical menus. Within Felix, you can therefore customize the program's interface to meet the needs of your laboratory by simply editing the menu interface macros provided, or by writing your own.

The menu interface covers most aspects of NMR data processing, display, and analysis. While we have tried to include and place related processing and applications conveniently near each other within the graphical user interface, it is extremely difficult to predict the needs for a specific user's application. For this reason, we encourage you to make any modifications to the menu interface that will speed and simplify your NMR data processing and analysis. For example, you can easily add a menu item to execute one of your own macros from within the menu interface. While this minor change to the menu system will not affect other aspects of the menu interface, it will greatly enhance the power of the program for your specific application. For users whose applications require repeated access to the certain pulldowns, the menu can be removed from the top menu bar and placed elsewhere on the screen for easy access. Modifications to the menu interface are very simple to make (10 minutes for someone experienced in writing Felix macros) and do not require any access to source code. We fully expect that some laboratories will totally redesign the interface so it is more directly applicable to their ongoing research. However, we have found that the standard graphical user interface provided exceeds the needs of most research groups.

The database

An NMR data processing program is only as good as its ability to store and retrieve the spectral information that it produces. In this regard, Felix again combines power and flexibility. The Felix database provides fast and efficient sorted access to large sets of spectral data. Many FCL commands directly generate or read whole datasets, like ND peakpicking and volume integration. Generating baseline points creates a dataset in the database, while the commands for baseline correction read that same dataset of baseline points to perform their flattening of the spectrum's baseline.

At the same time, FCL includes an extensive set of core database commands that provide explicit access to every primitive function the database was designed to perform. This means the user can have complete read and write access to any information stored in the database, whether it was generated by an FCL command or by a macro written by you. This provides almost unlimited functionality with respect to storing, retrieving and manipulating datasets of any type whatsoever.

One of these core database commands is the entity editor. It functions like a spreadsheet, giving the user a graphical way to edit, add, and delete information in a dataset.

Please see Chapter 6, The Database, for more detailed information about the Felix database.

Operating system access

When Felix is running in command mode it is possible to access the UNIX operating system without exiting the program or opening a separate graphics window. To perform this action, enter the command sys from the command interface. When in system mode (characterized by the "sys>" prompt), almost all of the normal operating system commands are functional. It is possible to edit, print, or type any file just as you would if you were not running Felix. You may not, however, change directories while in system mode. To return to Felix from the system mode prompt, enter quit or press <Ctrl>-<d>.




Last updated November 23, 1998.
Copyright © 1997, 1998 Molecular Simulations, Inc. All rights reserved.