What is FCL?

The FELIX Command Language (FCL) combines spectroscopic data-processing commands, a computer programming language, and a graphical user interface (GUI) protocol. This blend of tools gives FELIX its flexibility and adaptability as an NMR data-processing environment.

You can issue an FCL command inside the Command Window of FELIX main window to call a specific action. For example, you can enter:

 > mat yuin.mat w

to open a writable NMR matrix called yuin.mat.

Using a text editor, you can compose a document (called a macro) containing a series of FCL commands, save the document as a text file, then execute the macro as needed from the Command Window to complete a certain task. For example, you can enter:

 > .yuin

in the Command Window to execute a macro called yuin.mac. See Chapter 4 for more details about composing macros.

Virtually the entire GUI layout and every action invoked when you select a menu item or click an icon in FELIX are macro-based. You can customize the FELIX layout and actions by changing the relevant macros. To see which macros are being called during run-time, select the Preference/Macro Debug menu item, then select Show macro names in the dialog box.

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

This FELIX Command Language Reference Guide is designed for advanced users who want 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 long, and in this documentation are presented in boldface type. Commands are case sensitive, although command arguments are not. (See "Case sensitivity" in Chapter 2., FCL basics.) Symbols are also boldfaced, while parameters are italicized.

Using this guide

Note: All references cited in this guide are listed in Appendix A, References of the FELIX User Guide.

FCL command line

This section describes some of the basics of FCL and the conventions used in this document to describe the command syntax. When a command is shown in its general form, each parameter is indicated by an italicized_word. For example, the descriptive explicit forms of the command that defines the width of a spectrum (swidth) are shown below.

     def swidth spectrum_width (as described in the manual)

def swidth 4386 (as you would enter it)

To execute an FCL command, press <Enter> after you have finished typing it.

The commands within FCL consist of two- and three-letter acronyms that symbolize the action of the command. Each command performs some function or changes the state of the program in some way. Two examples of FCL commands are shown below:



ft causes FELIX to perform a Fourier transform on the data in the workspace, and hcp generates a hardcopy output of the current spectrum display.

A list of the FCL commands along with a detailed description of their functions is found in Appendix , Command reference.

Symbols and expressions

FELIX allows you to use symbols to represent any value or parameter. This symbolic substitution allows flexibility within the program and within the macros, which in turn generates automatic processing within FELIX. There are two distinct types of symbols within the program: reserved symbols and user symbols.

Reserved 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 using the reserved symbol datfil instead of entering the filename explicitly.

In addition, reserved symbols are used to define items such as the spectrum width (swidth), the number of contour levels (nlevel), and the datatype (datype). The quantity and names of reserved symbols are constant. They are initialized by FELIX when the program begins and cannot be deleted

User symbols

User symbols are any other symbols that are named and initialized by you 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 you can delete them at any time.

FELIX can also evaluate complex mathematical expressions. Sometimes you may want 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, symbols, and the arithmetic operators plus (+), minus (-), multiply (*), and divide (/). Expressions may also contain trigonometric, logarithmic, and datatype functions like sin, cos, log, int, etc. Expressions must be enclosed in 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 , 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 are an essential feature of the FELIX data-processing approach. A macro is a text file containing a series of FELIX commands that directs the program to perform a specific task. 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, goto'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. Using most text editors, you can modify FELIX macros to fit your specific needs. For example, the apodization function in the example macros will probably be customized by each user.

In addition to using macros for custom data processing and data analysis tasks, macros are also used to implement the FELIX GUI. Advanced FELIX users will create menus and control panels to design a custom environment.


The FELIX GUI contains a variety of menubars, pulldown menus, icons, and control panels that interact with the user to simplify data analysis and processing. The menu interface covers most aspects of NMR data processing, display, and analysis.The standard FELIX GUI exceeds the needs of most research groups.

While Accelrys has tried to include and place related processing and applications conveniently near each other within the GUI, it couldn't predict the needs of specific users. You can customize the FELIX interface to speed and simplify your NMR data processing and analysis by editing the menu interface macros provided or by writing your own.

For example, you can add a menu item to execute one of your own macros from within the interface. While this minor change to the menu system will not affect other aspects of the interface, it will enhance the power of the program for your specific application.

If your applications require repeated access to certain pulldowns, that pulldown can be removed from the top menu bar and placed elsewhere on the screen for easy access.

Creating a modification to the menu interface takes less than 15 minutes for someone experienced in writing FELIX macros. Making these changes require no access to source code.

The database

The FELIX database provides fast and efficient sorted access to large sets of spectrum 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, and the commands for baseline correction read that same dataset of baseline points to flatten the spectrum's baseline.

FCL also includes an extensive set of core database commands that provide explicit access to every primitive function the database was designed to perform. You 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 you wrote. This provides robust functionality with respect to storing, retrieving, and manipulating datasets of virtually any type.

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

Please see Chapter 6., Database and tables, for more detailed information about the FELIX database.