8. Using Tables

This chapter describes the use of the Tables utility. QUANTA applications use tables for displaying data and allowing you to manipulate the data. Read this chapter for specific information on how to use these tables.

The Tables utility is used by the following QUANTA applications: Molecular Modeling and Molecular Similarity (Molecule Management Table), Maps (Maps Management Table), Graphical Objects (Object Management Table), Atom Property Editor (Edit Residue Table) and Constraint Options (Constraints Table). In addition, the utility is used by applications that may be purchased with QUANTA.

Tables present data appropriate for the application in which they are displayed. A table window opens when data to be presented in tabular form is generated.


Using Objects Specific to Tables

The Tables utility is composed of the following objects:


Operating Within the Table Window

The Table window consists of a title bar, table display, message line, and scroll bars. In some tables, there is also a menu bar. You move through the table using scroll bars or cursor keys.

Table operations fall into two categories: operations over an entire table, and operations over a portion of the table. Examples of operators that affect the entire table include Open, Save, Save As, Revert, and Sort. No explicit table selection is required to perform these operations.

To apply operators of the second type, table selections are required to identify a region of a table. Examples of these operations include Formatting, Fonts, Alignment, Color, Cut, Copy, Paste, and Clear.

Table selections are made using the mouse and keyboard. Visually, table selections appear in the highlight color.

The following section describes mouse and keyboard actions permitted in the table window.


Mouse Actions

When the cursor is within the table window, the following mouse actions are supported:


Keyboard Actions

The following keyboard actions are supported:


Using Table Menus

The File, Edit, Format, and Data menus are common to tables that include a menu bar. In addition, some tables may include a Table Tools menu that contains selections specific to the table that is displayed. Menus may contain some or all of the selections described below.

The File menu provides selections to save, export, and graph table data. You also quit the Tables utility through this menu. Table 37 lists and briefly describes the selections.

Table 37. Tables Utility File Menu 
Selection
Description
Save

Writes the contents of the table into the file named in the title bar of the Table window. Selecting Save always causes the application to write a table file even if there have been no changes to the displayed table. If no file name has been specified for the table, the Save As operation is performed to prompt for a filename.

Save As

Writes the contents of the table into a new file. The standard Save As dialog box is displayed to prompt for the name of the file. All modifications are written into the disk file.

Export

Allows tables to be written to files using a variety of formats. From the Export dialog box, you select the file to be used for export, the file format (ASCII, DIF), and a table group. The group designation controls the rows and columns exported. The Options button allows you to customize the selected file export method. If no options exist for a method, the Options button is disabled.

Quit

Terminates the Table utility and removes the table from the screen. If the table has been modified, the Save As dialog box is displayed, allowing you to preserve table changes.

The Edit menu provides facilities to modify the contents of cells and the general organization of the table. Users can insert and delete rows and columns, clear table cells, and select table components. Most of the items on the Edit menu operate on the current table selection. Table 38 lists and briefly describes selections.

Table 38. Tables Utility Edit Menu 
Selection
Description
Select Group

Allows you to select table cells based on the contents of a named group. The operation displays a dialog box that contains a scrolling list of the groups defined within the table. When a group is selected, the cells within the group are redrawn using the highlight color. The table window is scrolled, as appropriate, to show the upper left cell of the group. This cell is the new current cell. If there are no groups defined, Select Group is disabled.

Select All

Selects all cells in the table.

Insert Row

Inserts a new row before the row containing the current cell. The number of rows selected prior to selecting Insert Row determines the number of rows that are added. Cells in the new rows are initialized to null and appear empty. The table is reorganized by this operation (new rows are inserted before old ones). New rows are always added before the row containing the current cell.

Insert Column

Inserts a new column before the column containing the current cell. The number of columns selected prior to selecting Insert Column determines the number of columns that are added. The cells in the new columns are initialized to null and appear empty. New columns are assigned the default column data type, which can be modified using the Column Properties dialog box. New columns are always added before the column containing the current cell.

Delete Row

Deletes the selected rows and data from the table. Rows below those being deleted are moved up.

Delete Column

Deletes the selected columns and data from the table. Columns next to those being deleted are moved to the left.

Label

Displays a dialog box through which you can modify row and column labels and units. Rows and columns can have alphanumeric labels that can be displayed as well as used to reference rows and columns for various operations. Columns can have an optional Units field for display purposes only. If more than one row (or column) is selected, then the entered label (and units) is applied to all rows (columns). Labels and units can contain letters, numbers, spaces, punctuation characters, and any other special characters supported by the base display. Carriage returns can also be inserted using the UNIX special character convention "\n".

Expand Table

Controls whether new rows and columns can be added to the table. If Table Expands is on (checked), then the Insert Row and Insert Column menu items are available. New rows and columns are created if you attempt to go beyond the current bounds of the table. If Table Expands is off, then Insert Row and Insert Column are disabled, and the cell cursor moves to the next line if you attempt to go beyond the bounds of the table.

The Format menu controls the appearance of the data displayed in a table as well as attributes of the table display itself. You can specify the format of cell data and can control the font and alignment used to render numbers and text, the row, column, and cell coloring, and the appearance of the grid lines drawn between cells. Selections in this menu also control the visibility of table components such as row and column labels and the table title. Table 39 lists and briefly describes selections.

Table 39. Tables Utility Format Menu 
Selection
Description
Numeric

Displays the available numeric and Boolean formatting options, and allows users to set the format of numeric columns and cells. The format you choose is applied to all columns and cells in the current selections. See Table 40 for available numeric and Boolean formatting options

Molecule

Displays the available molecule formatting options, and allows users to set the format of columns and cells that contain molecules. The format you choose is applied to all columns and cells in the current selection. See Table 41 for formatting options.

Data Type

Modifies the data type of a set of columns or cells.

Font

Selects the font family, size, and style used to render textual and numeric table data, column and row labels, and the table title. The font families supported are Times Roman, Helvetica, Courier, and Symbol. The sizes supported are 8. 10, 12, 14, 18, and 24 points. The styles supported are bold, italic, and underline.

Alignment

Specifies the alignment of textual and numeric data inside table cells.

Width/Height

Changes the display width and height of table rows and columns as well as the width and height of the column labels and row labels. In order for these fields to be active, the table selection must contain complete rows or complete columns. If it contains a simple cell range, the fields are disabled.

Color

Selectively colors entire rows, columns, and/or cells. The color value entered in the dialog box is applied to the current table selections. The color value must be between 1 and 14.

Grid

Controls the appearance of the grid lines drawn between table cells. It is not possible to control grid lines on a per cell, per row, or column basis.

Display

Controls the visibility of various table components such as row and column numbers and labels, the table title, and the edit window. When a component is disabled, it is removed from the display, and the table cell display is expanded to fill the vacant space.

Table 40. Numeric and Boolean Format Options
Format
Description

0

Displays numbers as integers.

0.00

Displays numbers as floating point.

0.00E+00

Displays numbers using scientific notation.

True/False

Displays zero and FALSE values as False, all others as True.

Yes/No

Displays zero and FALSE values as No, all others as Yes.

Table 41. Molecule Display Options
Format
Description

Structure

Displays a pictograph of the structure.

Formula

Displays a molecular formula such as C9H7ClO2.

File Name

Displays the name of the base file that contains the structure.

Chemical Name

Displays the chemical name of the structure.

The Data menu provides facilities to manipulate, organize, and find data stored in tables. You can create and delete groups, go to specific cells or to a group, search for data within a table, sort rows and columns, and perform calculations. Table 42 lists and briefly describes selections.

Table 42. Tables Utility Data Menu
Selection
Description
Groups

Creates, manipulates, and deletes table groups, and collections of related rows and columns designated by the user. Groups can be used to limit sorts and queries and to view a subset of a table. They can be created manually through the Groups menu item, through a query, or through an application.

Restore View

Causes the table display to show the entire table rather than a specific group.

Find

Allows the table to be queried by row or by column. Relational operators can be specified to perform comparison operations. Options are listed in Table 43. If you select Case Sensitive in the box, character case is considered for string comparisons. If View Results is selected, the rows and columns that meet the query are displayed, and the Restore View menu item is activated. The results of a query can be saved as a group

Sort

Reorganizes table rows and columns by performing multi-level sorts on table columns or rows. All data in the table is reorganized.

Derivation

Derives an equation to be associated with a column. The equation is used to fill the column with data. Derivations are simple mathematical equations that can include math operators, math functions, and subroutine calls. Derivations can reference other table columns either by name or index. They are evaluated by selecting Recalculate. The derivation is checked for correct syntax and applied to the column. The table is redisplayed to show the results. If the derivation can not be parsed, an error message is displayed, and the user is returned to the Edit Derivation dialog box. It is not possible to store an incorrect derivation in a column. Supported binary math operators, unary math operators, trigonometric functions, scientific constants, table functions, and 2D molecular functions are listed in Table 44.

Recalculate

Recalculates all derived columns. Recalculate must be selected for derived columns and cells to be updated.

Table 43. Relational Operators for Find
Option
Description

=

Equality

~

Approximate equality using user-defined tolerance value

!=

Inequality (not equals)

>

Greater than

>=

Greater than or equal

<

Less than

<=

Less than or equal

in

Query is contained within a value (text comparison)

!in

Query is not contained within a value (text comparison)

Table 44. Math Operators for Table Equations 
Operators
Description

Binary Math Operators

+

Addition

-

Subtraction

*

Multiplication

/

Division

%

Modulus (also "mod")

^

Exponentiation

Unary Math Operators

-

Negation (also "neg")

abs

Absolute value

sqrt

Square root

log10

Log base 10

exp

Exponentiation (inverse of log)

ln

Natural log (also "ln")

rand

Random number

Trigonometric Functions

sin

Sine (radians)

cos

Cosine (radians)

tan

Tangent (radians)

asin

Arc-sine (radians)

acos

Arc-cosine (radians)

atan

Arc-tangent (radians)

sind

Sine (degrees)

cosd

Cosine (degrees)

tand

Tangent (degrees)

asind

Arc-sine (degrees)

acosd

Arc-cosine (degrees)

atan

Arc-tangent (degrees)

Scientific Constraints

pi

Pi (3.1415926)

k

Boltzmann constant (1.98713 E-3 kcal/mol deg)

h

Planck constant (9.53709 E-14 kcal sec/mol)

r

Gas constant (0.08206 liter atm/mol deg)

e

Base of the natural logarithm (2.71828)

n

Avogadro's number (6.02217 E+23 particles/mole)

Table Functions

row#

Current row index

col#

Current column index

2D Molecular Functions

mw

Molecular Weight


Summary

QUANTA applications use tables for data display and manipulation. The Tables utility is used by the following QUANTA applications: Molecular Modeling and Molecular Similarity (Molecule Management Table), Maps (Maps Management Table), Graphical Objects (Object Management Table), Atom Property Editor (Edit Residue Table) and Constraint Options (Constraints Table). In addition, the utility is used by applications that may be purchased with QUANTA. Tables present data appropriate for the application in which they are displayed.

A Table window opens when an application generates data to be displayed in tabular form. The Table window consists of a title bar, table display, message line, and scroll bars. In some tables, there is also a menu bar. The File, Edit, Format, and Data menus are common to tables that include a menu bar. In addition, some tables may include an application-specific menu that contains selections specific to the table that is displayed.

Table operations fall into two categories: operations that impact an entire table, and operations that impact only a portion of the table. Table selections are made using the mouse and keyboard. Visually, table selections are rendered in the QUANTA highlight color.


© 2006 Accelrys Software Inc.