Cerius2 Modeling Environment



11       Working with Tables

In Cerius2 you can create your own tables containing both data and models and can modify tables created by Cerius2 application module. This section provides basic information on working with Cerius2 tables.

This section explains

Following an introduction to Cerius2 tables (Introduction to Cerius2 tables), this section contains information on:

Managing and editing tables

Table style and display

Values and mathematical expressions

Models in tables

Grouping table information

Searching for information in a table

Viewing subsets of a table

Sorting table information

Graphing table information

Exporting table information

Table 11. Finding information about tables

If you want to know about: Read:
Finding the Tables module.   Accessing the tools.  
Parts of the table window.   The table window.  
Making a table current.   Specifying the current table.  
Attaching control panels to tables.   Keeping track of the current table.  
Moving the cursor in a table.   Selecting a cell.  
Cursor wrapping.   Table expansion and cursor control.  
The current cell.   Understanding cell values, types, and formats.  
Default cell format.   Understanding cell values, types, and formats.  
Data type and display format.   Assigning data types, Technical notes, Setting display formats.  
Entering data into or editing a cell.   Editing cell contents.  
Recording your edits.   Entering your changes.  
Cutting and pasting values.   Copying, moving, and clearing information.  
Working with rows and columns.   Selecting rows and columns.  
Applying equations to cells and columns.   Entering mathematical expressions.  
Relation between values and expressions.   Concepts.  
Components to include in expressions.   Operators.  
Getting models into a table.   Copying models into columns.  
Referring to other cells in expressions.   Cross references.  
Refering to models in expressions.   Calculations on models, Setting up calculations on models.  
Displaying atom-atom distances and other measurements.   Measuring models.  
Displaying vector properties.   Vector properties.  
Updating calculations.   Recalculating table values.  
Column width and row height.   Changing row, column, and heading sizes.  
Aligning cell contents.   Aligning information within columns.  
Adding and removing rows and columns.   Inserting and deleting entire rows or columns, Table expansion and cursor control.  
Saving tables to files.   Saving a table.  
Saving models with tables.   Saving tables containing models.  
What kinds of data are associated with models.   What is saved as a model.  
Formatting ASCII files as tables.   Importing an ASCII text file into a new table.  
Mouse buttons and keyboard use.   Mouse and Keyboard Actions.  

Uses of tables

You can use Cerius2 tables to display and manipulate tabular information generated by Cerius2 application modules. Unlike many dedicated spreadsheet programs, the Cerius2 table facility understands and can make calculations that refer to (molecular) models. However, the Cerius2 table facility does not have all the features of a typical dedicated spreadsheet program. Therefore, you can export Cerius2 tables for further study to programs such as Microsoft® Excel. You can also import tabular data from ASCII files into a Cerius2 table for further manipulation and display.

You should already know...

The basics of starting Cerius2 and using its interface are demonstrated in Introducing Cerius2 and described in The Cerius2 Interface.

Tables in Cerius2 are produced as output from calculations in various other application modules. How to set up and run the appropriate calculations are discussed in the documentation for the relevant application modules.

Accessing the tools

The tools for handling tables are accessed from one of the decks of cards in the main Visualizer control panel. To access the Tables module, click the deck selector (see also Access to application modules) and choose TABLES & GRAPHS from the list that appears. If the TABLES card is not already in front of the GRAPHS card, click the title of the TABLES card. The deck of cards menu area should look like:

Additional information

Please see the on-screen help for details on the functioning of each control on the TABLES card.


Introduction to Cerius2 tables

Why read this section

This section introduces basic features of the Table Manager window, which controls the display of tables. Since each part of this window is presented where relevant in the task-oriented sections that follow (Managing and editing tables), this section is mainly useful as an overview or if you don't have a table displayed on your screen.

Finding information

This section includes information on:

The table window

Keeping track of the current table

You should already know...

How to access the Tables module is described under Accessing the tools). Mouse functions and keyboard shortcuts are summarized in Mouse and Keyboard Actions.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Manager window.

The table window

How it works

Any of several tables that are present in computer memory can be displayed, one at a time, in the table window. The current table is selected with the table manager, which is located near the bottom of the table window. The current table then appears in the current table area of the table window, where it may be edited and formatted, etc.

Accessing the tools

Click the Show Table Manager menu item on the TABLES card to display the Table Manager (or table) window. A new, empty table window appears:

Sections of the table window

The two major sections of the table window are the upper (main) table section, which displays the contents of the current table, and the lower table manager section, which lists all tables currently in computer memory and under the control of the Table Manager window. (This table manager does not necessarily keep track of tables created by other Cerius2 applications, for example, the C2·QSAR+ module's Study Table.)

The tools in the current table tool bar affect only the current table (see Specifying the current table) and can be used to change parts of the table. Examples include specifying alignment, grid type, and numeric properties; formatting; and activities like cutting, copying, and pasting values.

The tools in the table manager tool bar operate on tables as a whole. Examples include creating a new table and opening an existing table, as well as saving and closing a table. You do not need to select any portion of the table to perform these types of activities.

Keeping track of the current table

How it works

The table manager has several control panels that can be open at the same time. Each control panel keeps track of the current table and updates its display to reflect the current conditions for the active table.

Precautions

When using control panels accessed from the Table Manager window or the TABLES card, you need to be sure of which table the panel is "attached" to, that is, which table is affected by using the tools in the control panel.

Note that the table window includes two tabular displays that contain a current cell: the current table in the main table section, and the list of tables in the table manager section. Therefore:

Caution

When you are working in a control panel, make sure its Table entry box contains main_table. Otherwise, changes you make may be applied to the list of tables rather than the current table.  

In addition, you may have several table windows open simultaneously, which may be associated with different Cerius2 modules. If so, control panels need to be attached to both the correct table and the correct table window (many table-related control panels can operate on any displayed table, even if the Table Manager window does not know about that table). Therefore:

Tip

If you have several table windows open, it is good practice to click once in the table window with which you are working before using tools in a control panel. This assures that the control panel's Table entry box refers to the correct current table.  


Managing and editing tables

Why read this section

If you run calculations in any application modules that output tables, you need to know at least how to load, save, and close tables and how to specify the current table in the table manager window.

The other information in this section is useful if you want to create tables by hand or from an imported text file, to edit any table, or to move around in tables that are larger than the current table display area in the table window.

Finding information

This section includes information on:

Creating a new table

Loading and reloading tables

Importing an ASCII text file into a new table

Specifying the current table

Entering values and editing individual cells

Copying, moving, and clearing information

Inserting and deleting entire rows or columns

Table expansion and cursor control

Saving a table

Closing a table

Related information

Table style and format is presented under Table style and display.

You should already know...

How to access the Tables module is described under Accessing the tools. How to display a table window is shown under Accessing the tools.

Concepts

Table management tasks are those that apply to tables as a whole rather than to the rows and columns of a table. In the Cerius2 Tables module, table management functions are accomplished in the table manager section of the Table Manager window.

Creating a new table

You can create a new, empty table and fill it in by hand (this section), or you can create a Cerius2 table from an ASCII text file (Importing an ASCII text file into a new table).

Creating a new empty table

To create a new, empty table, either:

or:

The new, empty table appears (as the current table) in the main section of the table window.

Loading and reloading tables

Tables that have been created and saved to a file (Saving a table) can be loaded into a subsequent Cerius2 session.

In addition, you can revert to the previously saved version of a table file if you want to discard changes that you made since the last time you saved the table.

Loading saved table files

To load a table, you need to access the Open Table control panel:

or:

Using the file browser in the control panel to navigate the directory structure is fairly intuitive. The procedure is described under Loading model structure files.

Reloading the current table

To revert to the previously saved version of the current table:

or:

Any changes you made since you last saved the table are lost when the table file is reloaded.

Additional information

Please see the on-screen help for details on the functioning of each control in the Open Table control panel.

File formats

Note that two different filetypes end in .tbl: those produced by Cerius2 are table files, but those produced by Insight II are graphs.

Importing an ASCII text file into a new table

You can create a table by importing appropriately formatted data from an ASCII text file.

File format

To be imported into the Cerius2 Tables module, the file must be as ASCII text file and meet these requirements:

For example:


"Sample"    "X1"  "X2"   "X3"   "X4"
"A 17" 7 26 6 60
"B 16" 12 9 15 52
"C" 11 56 8 20
"D 118" 11 31 8 47
"A 12" 7 52 6 33
Accessing the tools

To access the Import Table control panel:

or:

Finding the file

Using the file browser in the control panel to navigate the directory structure is fairly intuitive. The procedure is described under Loading model structure files.

The file extension .dat is present in the filename entry box by default, but you may use any extension. Enter the name of the file containing tabular data.

Interpreting the file contents

Since Cerius2 has no way of automatically knowing how the data is presented in the file, you need to specify whether the file contains row and/or column headings (labels) and what characters are used in the files to indicate new lines within text strings, to delimit text strings, and to separate columns.

If you are not sure of the file's format, you can examine it with any text editor. Alternatively, you can load the file with the Import Table control panel (Importing the data), examine the loaded table in the table window, and then if necessary, close the table (Closing a table) without saving any changes and then re-import it with different specifications.

Importing the data

Double-click the name of the desired file or select it and click the IMPORT pushbutton in the Import Table control panel. Cerius2 creates a new table from the imported data, adding an untitled entry to the list of tables

Additional information

Please see the on-screen help for details on the functioning of each control in the Import Table control panel.

Specifying the current table

To edit, format, or perform other tasks that work on the contents of one table, you need to select the desired table to make it current. The contents of the current table are displayed in the upper section of the table window.

Making a table current

To specify a table as current, click any cell in its row (or its row heading) in the list of tables that appears in the lower (table manager) section of the table window.

Entering values and editing individual cells

Understanding cell values, types, and formats

You can generally override table-, column-, and row-wide default values for any individual cell. However, you cannot override the data type for strongly typed cells (see Assigning data types).

You can enter or change values only in the current cell. The current cell is highlighted with a rectangle, its contents appear in the cell edit window, and the cell's location and additional information about its contents appear in the current cell information window (for illustration, see Accessing the tools). The additional information consists of:

For empty cells, the default numeric data type is double (an eight-byte real number), and the default cell format is a floating point number with two decimal places. If you enter a number with more decimal places, the displayed value is rounded to two places, but the value is stored in the cell the way you enter it. You can change the format and other properties of your entries, as described under Table style and display.

Related information

Formatting and naming rows and columns are presented under Table style and display. Applying mathematical expressions to columns is discussed under Values and mathematical expressions.

Selecting a cell

Make the desired cell current by clicking it with the mouse or moving the cursor to that cell with the arrow, <Tab>, or <Enter> keys.

Editing cell contents

To replace the current cell's content with new content, you can simply start typing while the cursor is anywhere in the table window.

To edit or replace the current cell's content, select the cell edit window by clicking it or by pressing <Shift> <Tab> on the keyboard. Then position the cursor as desired within the content of the cell edit window (by clicking and/or using the arrow keys) and type the desired cell contents. Until you enter the new content (Entering your changes), you can edit it in the cell edit window.

Entering your changes

To enter your changes, do one of:

Cancelling an edit

To cancel an edit, press <Esc> on the keyboard. The previously entered value (if any) is restored.

Additional information

Mouse functions and keyboard shortcuts are summarized in Mouse and Keyboard Actions.

Copying, moving, and clearing information

You can copy or move values from one cell, row, or column to another. You can also clear the contents of the current cell or of selected row(s) or column(s) without removing the emptied cell(s) from the table.

Selecting rows and columns

To work with cells, columns, and rows, you generally need to select them first.

You explicitly select (and highlight) a row or column by clicking a row or column heading (for illustration, see Accessing the tools). For some purposes, implicit selection of a row or column is sufficient: the row and column containing the current cell (see Selecting a cell) are implicitly selected.

To select a continuous range of rows or columns, click the first row or column heading, then <Shift> click the last row or column heading in the range. <Shift> click to select additional contiguous rows or columns.

To select several noncontiguous rows or columns, click the first row or column heading, then <Ctrl> click each additional row or column heading that you want to select. Your final selection may contain both rows and columns.

To select all cells in the current table, do one of the following:

Copying one or more cells

To copy the contents of selected row(s) or column(s) or the current cell to the system clipboard for later pasting to a row, column, or cell (respectively):

See Pasting a column or row for pasting the copied information into a new location.

Moving (cutting) one or more cells

To clear (cut) the contents from selected row(s) or column(s) or the current cell and place them in the system clipboard for later pasting to a row, column, or cell (respectively):

See Pasting a column or row for pasting the copied information into a new location.

Pasting a column or row

To paste the contents of the paste buffer (clipboard) into selected row(s) or column(s) or the current cell:

See Copying one or more cells and Moving (cutting) one or more cells for copying or cutting information into the clipboard.

Technical notes on copying, cutting, and pasting

The Cerius2 table clipboard holds the contents of only the one most recent copy or cut operation.

Pasted rows and columns are always inserted into the table; the pasted information does not replace the contents of any selected row(s) or column(s).

If both rows and columns are selected for the copy or cut operation, Cerius2 asks you before pasting whether you want to past the rows or the columns into the current selection. (The results are more intuitively predictable if only contiguous columns or only contiguous rows are selected during copying or cutting.)

If no region is selected before pasting, or if the selected region is differently shaped than the contents of the clipboard, the paste operation fills down and to the right starting from the top cell in the selected column, the left-most cell in the selected row, or (if no row or column is selected) the current cell.

You can use this feature to copy or move a column or row to a different part of the target column or row. For example, you can copy rows 1-4 of a column to rows 5-8 of the target column. You do this by clicking row 5 of the target column before pasting. You can offset the pasted-in information by making some cell other than the first one in row 5 current and not selecting the entire row.

It makes no difference if the target region is larger than the region contained in the clipboard. The pasted-in material either (if it is from one cell) replaces the contents of the current cell or (if it is a row or column) is inserted into the current table, displacing the selected area down or to the right (see Inserting and deleting entire rows or columns for information on inserting columns and rows).

Clearing one or more cells

To clear the values in the selected row(s) or column(s) or of the current cell (clearing does not remove mathematical expressions, see Deleting expressions):

or:

Technical notes on cutting, deleting, and clearing

You can cut or clear the contents of rows, columns, or cells (Moving (cutting) one or more cells and Clearing one or more cells), and you can delete entire rows or columns (Deleting columns and rows). The differences between these superficially similar operations are:

Inserting and deleting entire rows or columns

You can insert or delete entire rows or columns.

Related information

Selecting columns, rows, and cells is presented in Selecting rows and columns. The differences between cutting, clearing, and deleting are summarized under Technical notes on copying, cutting, and pasting.

Inserting columns and rows

To insert a new, empty column to the left of the selected column or current cell or to insert a new, empty row above the selected row or current cell:

or:

If you selected only a cell, choose Row or Column in the message window that appears.

Tip

Select two (or three, four, or more) rows or columns if you want two (or three, four, or more, respectively) new, empty rows or columns to be inserted.  

To insert a new column on the far right side of the table or a new row at the bottom of the table, please see Table expansion and cursor control.

Deleting columns and rows

To delete the selected column(s) or row(s) or the column or row containing the current cell:

or:

If you selected only a cell, choose Row or Column in the message window that appears.

Caution

Cerius2 does not ask you to confirm a row or column deletion. The information contained in these columns or rows is lost when they are deleted (unless you previously saved the table to a file).  

Table expansion and cursor control

Tables opened from a file, and certain tables generated by Cerius2 modules, have an initially fixed number of rows and columns. You may want to allow the current table to automatically expand when you use the arrow, <Tab>, or <Enter> keys.

Enabling table expansion

To enable the current table to automatically expand beyond its fixed size when you use the arrow, <Tab>, or <Enter> keys, check the Expand Table check box in the table window.

Enabling cursor wrap

To enable the cursor to wrap to the next column or row when you get to the end of a preceding column or row by using the arrow, <Tab>, or <Enter> keys, uncheck the Expand Table check box in the table window.

Saving a table

Saving and naming a table file

To save a table file for the first time (when you need to give it a name and specify a directory in which to save it) or to save a file under a different name (or in a different directory) from the previous version, you need to use the Save Table control panel:

or:

Enter a filename in the entry box and click the SAVE pushbutton to save your file.

Use of the file selection list box and other file selector controls to navigate the directory structure is presented in detail under Finding model file(s). Creating your own directories or subdirectories is described in Making custom directories.

Resaving a table file

A file that has been saved previously can be saved again without using the Save Table control panel.

To resave a file in the same directory and with the same filename as before:

or:

If the current table has previously been saved to a file, it is resaved as the same file, overwriting the previous version.

If the file has never been saved before, the Save Table control panel (Saving and naming a table file) appears so that you can name the file and specify a directory in which to place it.

Saving only part of a table

If you want to save only part of a table in MSI format, you need to "export" the table (Exporting table information).

Additional information

Please see the on-screen help for details on the functioning of each control in the Save Table control panel.

File formats

Cerius2 saves tables in MSI .tbl format and automatically adds .tbl to the filename if you have not specified some other extension.

Closing a table

You may remove any unwanted tables from the current Cerius2 session at any time by closing them.

Closing a table

To close the current table, you can:

or:


Table style and display

When you create a new table or when a Cerius2 application generates a table, the cells have a default set of properties. Many table properties can be modified to meet your specific requirements for how your data is displayed. You can modify the properties of all cells in a table, of the cells in the current selection, or of the cells in a named group.

Finding information

This section includes information on:

Aligning information within columns

Assigning data types

Setting display formats

Specifying headings and banners

Changing row, column, and heading sizes

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing is discussed under Specifying the current table. How to select columns (Selecting rows and columns) and make a cell current (Selecting a cell) are described above.

Aligning information within columns

You can align cell content in selected column(s) or the current cell both vertically and horizontally. As with many functions in the Table Properties control panel, alignment does not work on selected rows--if you select a row, only the current cell in that row is aligned as specified.

Accessing the tools

To modify any table properties, you need to access the Table Properties control panel:

or:

To align the contents of selected columns or of the whole table, access the Alignment pane of the Table Properties control panel by setting the Properties popup to Alignment.

Aligning selected columns or the current cell

Assure that the Selection control is selected, select the desired Horizontal and Vertical alignments, and click the APPLY TO pushbutton. The contents of the selected column(s) or of the current cell (if no column is selected) are aligned as specified.

Aligning the entire table

Assure that the Entire Table control is selected, select the desired Horizontal and Vertical alignments, and click the APPLY TO pushbutton. The contents of all columns in the table are aligned as specified.

Aligning named groups

Columns within named groups (Grouping table information) can similarly be alligned, by selecting the Group command and choosing the desired group from the Group pulldown.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.

Assigning data types

You can assign or reassign data types to selected column(s) or the current cell. The data type determines whether content that is subsequently entered in that cell or column is interpreted as real numbers, Booleans, text, etc. The type interacts with the cell format (Setting display formats) to affect how the cell content is displayed.

For example, when false is entered into a (weakly typed) character or real-number type cell, it is displayed and interpreted merely as text (and therefore evaluates to True if the format is subsequently changed to True/False, since it is true that the cell has content). However, when false is entered into a Boolean type cell, it is interpreted and displayed as 0.00 if the format is set to a floating-point real number or as False if the format is set to True/False.

Note

If a table generated by a Cerius2 application module contains strongly typed cells, you cannot change the data type for those cells.  

Accessing the tools

To assign or reassign data types, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Datatype to access the Datatype controls.

Assigning data types

To assign a data type to the selected column(s), the current cell (if no column is selected), or the entire table, choose the desired data type from the Column/Cell Data Type list box. Assure that Selection, Entire Table, or Group is set as desired, then click the APPLY TO pushbutton.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.

Setting display formats

You can assign a display format to selected column(s) containing numeric, Boolean, text, or model data. (You can also assign a display format to the current cell or the entire table.) These formats affect only how numbers are displayed--the full number is retained in computer memory and stored with the table.

Accessing the tools

To assign or reassign display formats for numeric, Boolean, or model data, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Format to access the Format controls.

To assign a display format to the selected column(s), the current cell (if no column is selected), or the entire table, choose the desired format (see below) from the list box. Assure that Selection, Entire Table, or Group is set as desired, then click the APPLY TO pushbutton.

Changing the display format for integers and real numbers

You can display numbers as integers (real numbers are rounded to the nearest integer), as floating-point real numbers, or as real numbers in scientific notation.

For either real-number format, you can enter the number of decimal places to display in the Decimal Places entry box.

Changing the display format for Booleans

Cell contents can be displayed in Boolean format as either Yes/No or True/False alternatives. A value of zero or an expression that evaluates to "False" is displayed as No or False, any other value is displayed as Yes or True, and empty cells remain empty.

Mapping numbers to categories

You can display numerical data as a limited set of text items called categories. Real numbers are rounded to the nearest integer for this purpose. Values that round to 1 (not zero) are assigned the first item in the set.

For example, you might want to display the values 1, 2, 3, etc. as the color names red, orange, yellow, etc. To do this, you select Category from the list box in the Table Properties control panel and then enter red,orange,yellow,green,blue,violet in the Categories entry box. Numbers that round to 1, 2, 3, 4, 5, or 6 are displayed as red, orange, yellow (etc.), respectively. Numbers outside this range are displayed as <Unknown>.

Changing the display of text

You can change the display of text from native (i.e., the text as entered) to all uppercase or all lowercase letters (and can return to the "native" format).

Changing the display format of model data

Model data can be displayed as small 2D structure diagrams or as the chemical formula, chemical name, or the internal Cerius2 identification number for that model.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.

Specifying headings and banners

You can enter text into the row and column headings and choose to display the headings or the row or column numbers (or both headings and numbers). You can also prevent a row or column from scrolling when you scroll the rest of the table, making it, in effect, an additional heading or banner row or column.

Accessing the tools

To label selected rows or columns (that is, enter some text to be displayed in the row or column headings) or to lock the scroll function for selected rows or columns, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Row or Column, respectively. The resulting control panel is referred to as the Row or Column pane of the Table Properties control panel.

To specify whether to show row or column headings, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Heading. The resulting control panel is referred to as the Heading pane of the Table Properties control panel.

Entering and displaying row headings

In the Row pane of the Table Properties control panel, enter the heading text for the selected row(s) in the Row Name entry box and assure that the Row Name check box is checked. Click the APPLY TO pushbutton.

Next, in the Heading pane of the Table Properties control panel, check either or both the Show Row Names and Show Row Numbers check boxes. Click the APPLY TO pushbutton.

You may want to change the width of the heading column (Changing heading sizes).

Entering and displaying column headings

In the Column pane of the Table Properties control panel, enter the heading text for the selected column(s) in the Column Name entry box and assure that the Column Name check box is checked.

If you want a second line of heading (often used to specify the units for the data, e.g., kcal or angstroms), enter the text in the Column Units entry box and assure that the Column Units check box is checked. Click the APPLY TO pushbutton.

Next, in the Heading pane of the Table Properties control panel, check one or more of the Show Column Names, Show Column Numbers, and Show Column Units check boxes. Click the APPLY TO pushbutton.

To display two lines of heading, you probably need to increase the height of the heading row (Changing heading sizes).

Specifying banners

To prevent a row or column from scrolling off the screen when the rest of a large table is scrolled, use the Row or Column pane (respectively) of the Table Properties control panel. Check the Lock Row Scroll or Lock Column Scroll check box (respectively) and click the APPLY TO pushbutton.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.

Changing row, column, and heading sizes

You can change the width of any column, including the column containing the row headings, and can change the height of any row, including the row containing the column headings.

Changing column width and row height

To resize a column, drag the line to the right of a column in the column heading area of the current table display. The cursor changes to red double arrows to indicate it is over the line.

Alternatively, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Column. Enter the desired width in the Column Width entry box and click the APPLY TO pushbutton.

To resize a row, drag the line below a row in the row heading area of the current table display. The cursor changes to red double arrows to indicate it is over the line.

Alternatively, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Row. Enter the desired height in the Row Height entry box and click the APPLY TO pushbutton. Rows may not be less than 0.25 inches high.

If more than one row or column is selected, all are resized equally.

Changing heading sizes

To change the depth of column headings, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Heading. Enter the desired value in the Column Heading Height entry box and click the APPLY TO pushbutton. Column heading rows may not be less than 0.25 inches high.

To change the width of row headings, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Heading. Enter the desired value in the Row Heading Width entry box and click the APPLY TO pushbutton.

Using grid lines

To change how cells are delineated, access the Table Properties control panel as above (see Accessing the tools) and set the Properties popup to Grid. Set the Horizontal Lines and Vertical Lines as desired and click the APPLY TO pushbutton.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.


Values and mathematical expressions

A mathematical expression can be applied to a cell or column. The cell displays the value derived from the expression, not the expression itself. The expression may contain scientific constants, binary math and text operators, built-in operators, unary math and text operators, trigonometric operators, statistical operators and transformations, binary and unary molecule operators, and command operators. The expression can return (that is, generate) numbers, text, or models.

Finding information

This section includes information on:

Applying mathematical expressions to cells or columns

Entering mathematical expressions

Recalculating table values

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing is discussed in Specifying the current table. How to select columns (Selecting rows and columns) and make a cell current (Selecting a cell) are described above.

Applying mathematical expressions to cells or columns

Concepts

The following terms define the relationship between values and mathematical expressions ("derivations") in Cerius2 tables:

Technical notes

The type of data that cells can contain is generally assigned to all cells in a column. Cells in tables generated by Cerius2 application modules may be weakly or strongly typed:

Generally, you cannot enter data of another type into a strongly typed cell. For example, if a strongly typed cell is assigned the character data type, you cannot enter numbers into the cell. However, Cerius2 can convert some data into the appropriate type. For example, if a strongly typed cell is assigned the integer data type and you enter a value of 2.2, Cerius2 rounds the value to 2 and stores it as an integer.

How to change the data type (where possible) is presented on (Assigning data types).

Accessing the tools

To enter a mathematical expression into the current cell or a selected column, you can type the expression in the cell edit window (illustrated under Accessing the tools) and then press <Enter> or <Tab> or click some other cell to enter the expression.

Alternatively, you can use the Table Properties control panel. The Table Properties control panel allows you to, in addition, enter mathematical expressions into the entire table, selected columns, or the columns in a named (Specifying headings and banners) group.

To access the Table Properties control panel.

or:

In the Table Properties control panel, set the Properties popup to Derivation to access the Derivation controls, then enter your mathematical expression in the Enter Cell Derivation entry box.

Entering mathematical expressions

The exact procedure, including the character(s) with which your mathematical expressions begin, differ depending on what tool you are using and whether you are applying the expression to the current cell or one or more selected columns:

Important

Applying an expression only once can save time later, since these expressions are not recalculated when the table is recalculated (Recalculating table values). However, you should not refer to other parts of the table (Cross references) in these expressions, since these unretained expressions cannot be recalculated if you change values in any of the columns, cells, etc. that are referred to.  

Deleting expressions

To remove an expression from the current cell or a selected column (without deleting the calculated value), enter an expression containing only two quotes (that is, ="" or =="") in the cell edit window.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Properties control panel.

Entering mathematical expressions

Finding information

This section includes information on:

Using numbers

Cross references

Calculations on models

Manipulating text

Table and command operations

Operators

Available components that may be included in expressions are:

Using numbers

Unary math operators

Unary math operators (Table 12) take one argument that must evaluate to a number.

Examples of expressions including unary mathematical operators are:


abs (col 5)
sqrt (abs (col 5 * col 6))
rand (20)
The column references (see To columns...) in this example all evaluate to numbers.

Table 12. Unary math operators in Cerius2 table expressions

Operator Returns Description
-   number   Negation.  
abs   number   Absolute value.  
ceil   number   Return the largest integer not less than x.  
cbrt   number   Cube root.  
exp   number   Exponentiation (inverse of log).  
fact   number   Factorial (x!).  
floor   number   Return the largest integer not greater than x.  
frac   number   Return the fractional part of x.  
ln   number   Natural log.  
log   number   Natural log.  
log10   number   Log base 10.  
neg   number   Negation.  
rand   number   Random number between zero and x.  
sign   number   Return 1 if x > 0.0, return 0 if x = 0, return -1 if x < 0.  
spline   number   Return x if x 0.0; otherwise return zero.  
sqrt   number   Square root.  

Binary math operators

Binary mathematical operators (Table 13) are placed between two values, both of which must be or evaluate to numbers.

Mathematical operations using binary mathematical operators are evaluated using algebraic logic in the standard order of precedence. You can use parentheses to alter the order of precedence.

Examples of expressions including binary mathematical operators are:


12 + 3
4 * col 6
7 * col Concentration +2
7 * (col Concentration + 2)
The column references (see To columns...) in this example all evaluate to numbers.

If division by zero is attempted, an error message shows the row and column where the error occurred, and the cell is set to null.

Table 13. Binary math operators in Cerius2 table expressions

Operator Description
+   Addition.  
-   Subtraction.  
*   Multiplication.  
/   Division.  
%   Modulus.  
mod   Modulus.  
^   Exponentiation.  

Statistical operators

Statistical operators (Table 14) take one argument. This argument must refer to a collection of numeric data, such as a column, a row, or a group consisting of numeric cells. Statistical operators return null if anything else is specified.

Examples of expressions including statistical operators are:


mean (col 1)
max (row TG)
sum (group "query results")
In general, statistical operators should be used only in cell expressions, not column expressions. The column, row, and group referred to (Cross references) in this example all contain numerical values.

Table 14. Statistical operators in Cerius2 table expressions

Operator Returns Description
avg   number   Numeric mean.  
mean   number   Numeric mean (same as avg).  
median   number   Median value.  
sum   number   Sum of all values.  
min   number   Minimum value.  
max   number   Maximum value.  
range   number   Numeric range (abs (max - min)).  
count   number   Number of non-null values in the data set.  
stdev   number   Standard deviation of the population (n).  
var   number   Variance of the population (n).  
skew   number   Skewness.  
kurtosis   number   Kurtosis.  

Statistical transformations

Statistical transformations (Table 15) take one argument that must refer to a column of numeric values. They return null if anything else is specified.

Examples of expressions including statistical transformations are:


normalize (col 1)
scale (col TG)
Statistical transformations should be used only in column expressions, not cell expressions. The columns referred to (see To columns...) in this example all contain numerical values.

Table 15. Statistical transformations in Cerius2 table expressions

Operator Returns Description
meancenter   number   Transform a data set so that its mean is 0.0.  
normalize   number   Transform a data set so that its mean is 0.0 and its standard deviation is 1.0.  
scale   number   Uniformly map a data set onto the range 0.0 to 1.0.  

Trigonometric operators

Trigonometric operators (Table 16) take one argument that must evaluate to a number.

Examples of expressions including trigonometric operators are:


sind (col 5)
tan (sqrt (abs (col 5 * col 6)))
The column references (see To columns...) in this example all evaluate to numbers.

Table 16. Trigonometric operators in Cerius2 table expressions

Operator Returns Description
sin   number   Sine (radians).  
cos   number   Cosine (radians).  
tan   number   Tangent (radians).  
asin   number   Arcsine (radians).  
acos   number   Arccosine (radians).  
atan   number   Arctangent (radians).  
sind   number   Sine (degrees).  
cosd   number   Cosine (degrees).  
tand   number   Tangent (degrees).  
asind   number   Arcsine (degrees).  
acosd   number   Arccosine (degrees).  
atand   number   Arctangent (degrees).  

Constants

In addition to numbers that you type in, you can use any of the physical constants shown in Table 17:

Table 17. Physical constants in Cerius2 table expressions

Constant Description
e   Base of the natural logarithm (2.71828).  
h   Planck's constant (9.53709 E-14 kcal sec mol-1).  
k   Boltzmann's constant (3.2998 E-27 kcal mol-1 deg-1).  
n   Avogadro's number (6.02204 E+23 particles mol-1).  
pi   Pi (3.14159).  
r   Gas constant (1.98717 E-3 kcal mol-1 deg-1).  

SMARTS table derivations

The following derivations can be entered as column headers in the QSAR study table:


      ==daysss(Structure, ) and


      ==daysss_unique(Structure, )

For example:


      ==daysss(Structure, "c1ccccc1")


      ==daysss_unique(Structure, "[C;H1]NOH")

Cross references

In writing expressions, you can refer to columns, rows, groups, or cells in the current table and to columns, rows, groups, or cells in other tables. These references are evaluated as numbers, text, or models, depending on the content of the items that are referred to.

Examples of expressions including cross references are:


sqrt (col 4)
sqrt (column 4)
sqrt (col Concentration)
sqrt (Concentration)
sqrt (col "H2SO4 Conc")
mean (row 6)
mean (row TG)
sum (group "query results") * 5
To columns...

You can refer to a column in any expression. The syntax for column cross references is any of:


col index 
col name
column index
column name
name
The column name (Setting display formats) must be enclosed in quotes (") if it contains spaces.

rows...

You can refer to rows only within statistical operators (Statistical operators). The syntax for row cross references is any of:


row index 
row name
The row name (Setting display formats) must be enclosed in quotes (") if it contains spaces.

groups...

You can refer to groups (Grouping table information) only within statistical operators (Statistical operators). The syntax for group cross references is:


group name

The group name (Creating a named group) must be enclosed in quotes (") if it contains spaces.

cells...

You can refer to a named cell in any expression. The syntax for cell cross references is:


cell name

You cannot name cells, but some application modules may name certain cells. The cell name must be enclosed in quotes (") if it contains spaces.

...and other tables

You can refer to named columns, rows, groups, or cells that are contained in other tables. The syntax for table cross references is any of:


col table_name::col_name
row table_name::row_name
group table_name::group_name
cell table_name::cell_name
The table_name is the name of the table in which the named entry is found. All names that contain spaces must be enclosed in quotes (").

Calculations on models

Columns in Cerius2 tables may contain chemical models (Models in tables), and calculations may be performed using these models.

Unary model operators

Unary model operators (Table 18) take one argument, which must evaluate to a cell of type molecular. The operators return null if anything else is specified.

Examples of unary model operators are:


mw (col Structure)
atoms (col 1) / bonds (col 1)

Table 18. Unary model operators in Cerius2 table expressions

Operator Returns Description
atoms   number   Number of atoms.  
bonds   number   Number of bonds.  
idtomol   chemical data   Convert a model ID number (assigned in the model table) into a model.  
inttomol   chemical data   Convert an integer into a Cerius2 model if that integer references an entire model.  
inttooid   chemical data   Convert an integer into a Cerius2 model component (for example, an atom, a bond, or an entire model).  
isvisible   number   Return 1 if the model is visible and 0 (zero) if the model is invisible.  
makecurrent   0 (zero)   Make the referenced model the current model.  
mf   text   Molecular formula.  
mw   number   Molecular weight.  
numchildren   number   The number of dependent objects contained in the parent object. For a model, this includes the total number of atoms and bonds, along with any other objects included in the model.  
thename   text   Object name.  

Binary model operators

Binary model operators (Table 19) take two arguments. The first argument must evaluate to a cell of type molecular. The operators return null if anything else is specified.

Several of these operators use atom names to specify the second argument. Atom names can be separated by commas or hyphens if more than one atom name is required. (Hyphens work exactly like columns in these table expressions; hyphens do not indicate ranges of atoms.)

The following examples assume that column one contains molecular type data:


distance (col Structure, "CA-CB")
charge (col 1, "CA") / bonds (col 1)

Tip

Some expressions involving models can be complicated to set up manually. Provided you have the desired model present in the model window, Cerius2 can calculate certain properties and automatically insert them in a table column (for details, see Setting up calculations on models).  

Table 19. Binary model operators in Cerius2 table expressions

Operator Returns Description
angle   number   Bond angle in degrees (atoms referenced using a named triple).
Usage: angle (col structure, "C1,C2,C3")  
anglebyname   number   Bond angle in degrees (atoms referenced using a user-assigned name).
Usage: angle (col structure, "CA,CB,CC")  
charge   number   Partial atomic charge of a named atom.
Usage: charge (col structure, "C1")  
chargebyname   number   Partial atomic charge of an atom referenced using a user-assigned name.
Usage: charge (col structure, "CA")  
distance   number   Interatomic distance (atoms referenced using a named pair).
Usage: distance (col structure, "C1,C2")  
distancebyname   number   Interatomic distance (atoms referenced using a user-assigned name).
Usage: distance (col structure, "CA,CB")  
ecount   number   Count the number of occurrences of a specified element.
Usage: ecount (col structure, "C")  
exact   number   Perform an exact search for an object and count the number of occurrences found. Hydrogens are not ignored.
Usage: exact (col structure, cell frag_tbl::CO)  
smol   number   Calculate various steric properties of a molecule. No coordinate transformations are made as part of this calculation. Thus, the result of this calculation changes as the molecule is reoriented. Properties are:
RX--Range of x coordinate values
RY--Range of y coordinate values
RZ--Range of z coordinate values
MINX--Smallest x coordinate value
MINY--Smallest y coordinate value
MINZ--Smallest z coordinate value
MAXX--Largest x coordinate value
MAXY--Largest y coordinate value
MAXZ--Largest z coordinate value
VOLUME--Volume of the box in which the molecule is contained  
Usage: smol (col structure, "RX")  
sss   number   Perform a substructure search for an object and count the number of occurrences found. Hydrogens are ignored.
Usage: sss (col structure, cell frag_tbl::CO)  
torsion   number   Torsion angle (atoms referenced using a named quad).
Usage: torsion (col structure, "C1,C2,C3,C4")  
torsionbyname   number   Torsion angle (atoms referenced using a user-assigned name).
Usage: torsion (col structure, "CA,CB,CC,CD")  
userdata   text   Return the named user data from the object (if the field exists). Array-based user data fields are not supported.
Usage: userdata (col structure, "Rotatable_Torsions")  

Additional information

Please see the on-screen help for details on the functioning of each control in the Tabulate Atom Properties control panel.

Manipulating text

Unary text operators

Unary text operators (Table 20) take one argument that must evaluate to characters. This argument either controls the operation of the function or is the text to be operated upon.

Table 20. Unary text operators in Cerius2 table expressions

Operator Returns Description
cdate   text   Return time and date based on the input argument:
TODAY--Today's date.
NOW--Today's date and time.
YEAR--Current year.
MONTH--Current month.
DAY--Current day.
DOW--Current day of the week.
TIME--Current time.  
ctext   text   Convert an entity to a text string.  
reverse   text   Reverse the order of characters in a string.  
strlen   number   Return the length of a string.  
tolower   text   Convert text to lower case.  
toupper   text   Convert text to upper case.  

Binary text operators

Binary text operators (Table 21) are placed between two values, both of which must evaluate to characters.

Table 21. Binary text operators in Cerius2 table expressions

Operator Returns Description
+   text   Concatenate text strings (for example, "A" + "B" produces "AB").  
cattonumber   number   Convert a category1 to its corresponding ordinal.  
format   text   Format an entity based on a C-style format string in the second argument, e.g.: format (col Activity, "%8.3f").  
numbertocat   text   Convert an ordinal number to the corresponding category1.  
1 "Categories are described under Mapping numbers to categories.

Table and command operations

Table operators

Table operators (Table 22) take no arguments. They return the row or column number of the current cell.

Table 22. Table operators in Cerius2 table expressions

Operator Returns Description
row#   number   Current row index.  
col#   number   Current column index.  

Command operators

Command operators (Table 23) enable you to run Cerius2 command scripts and/or evaluate Tcl (Tool Command Language) expressions and return the results to table cells. These operators take a single argument that must evaluate to one or more Cerius2 commands or one or more legal Tcl commands. For more information about Cerius2 and Tcl commands, refer to Cerius2 Command Script Guide.

Table 23. Command operators in Cerius2 table expressions

Operator Returns Description
eval   any   Evaluate a Cerius2 or Tcl command and return the result.  
source   any   Open the file named in the argument, evaluate each Cerius2 or Tcl command in that file, and return the result.  

Recalculating table values

How it works

When you type in or edit an expression for a column or cell using the cell edit window in the table window, Cerius2 calculates and displays the value of the derivation as soon as you enter the derivation by pressing <Enter> (Entering mathematical expressions).

If you use the Derivation pane of the Table Properties control panel (Entering mathematical expressions) to enter or edit an expression, Cerius2 calculates and displays the value of the derivation as soon as you click the APPLY TO pushbutton.

If you change the values in a column, row, group, or cell that is referred to in another cell or column's expression, the values in that cell or column are not recalculated until you request that the table be recalculated.

Recalculating table values

To recalculate all the expressions in the current table:

or:

To select a cell, column, or row and also send to Cerius2 any command that has been associated with that cell, column, or row by a module, double-click the cell or the column or row heading.


Models in tables

Cerius2 tables can store model information in table cells and can display this information in several formats (Setting display formats). You can also store atoms, bonds, and several other types of chemical data in the columns and cells of Cerius2 tables.

Uses of model data in tables

You can perform certain model-specific operations on model columns and can include model operators in mathematical expressions (Values and mathematical expressions) in other columns that refer to a cell containing a model.

Finding information

This section includes information on:

Copying models into columns

Setting up calculations on models

Saving tables containing models

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. How to select columns (Selecting rows and columns) and make a cell current (Selecting a cell) are described above.

Copying models into columns

Tables generated and presented by other Cerius2 modules, such as QSAR+, may contain models in columns.

You cannot copy models from the model window to a model data type column in a table. However, you can copy a model column from a table generated by another Cerius2 module, such as QSAR+, into some other table.

Copying models from other tables

Copying columns from one table to another is essentially the same as copying columns from one part of a table to another part of the same table (Copying, moving, and clearing information).

The tables need not be displayed in the same table window. However, if they are being handled by the same table manager, the table whose column(s) are being copied needs to be displayed as the current table (Specifying the current table), and then the other table needs to be made current in order to paste the column(s) into it.

The data type of the newly pasted column (Assigning data types) is automatically set to the model type.

Setting up calculations on models

Since it can be tedious to set up mathematical expressions including model references by hand (Binary model operators), Cerius2 can calculate certain properties and automatically insert them in a table column. The models you are working with must be present in computer memory and at least one of them must be displayed in the model window.

Accessing the tools

Select the Data/Atomistic Properties menu item from the TABLE card to access the Tabulate Atom Properties control panel.

Automated model calculations

If the table contains more than one model column, specify which one you want to refer to by choosing its name or number from the Molecule Column pulldown in the Tabulate Atom Properties control panel.

Several types of calculations are facilitated:

The correct mathematical expression is generated automatically and placed in an empty column in the table (on its right side). The calculated charge, distance, etc., is displayed in that column.

The term "representative model" (above) assumes that all the models in the column have some structural moiety in common. If, for example, you request the distance between atoms C1 and C2 and all models in the model column contain atoms labeled C1 and C2, then calculated values are displayed in all cells of the column containing the expression. If, however, you request the distance between C12 and C16, and these atoms are not present in all the models, calculated values are displayed only for those models that do have these atoms.

Tip

To input expressions into several columns simultaneously, you can select more than the number of atoms specified above and then double-click the desired tool. This method does not, for example, calculate all distances among the set of atoms selected, but the pairwise distances in the order in which atom pairs were selected.  

To recalculate model expressions after changing the models (for example, after optimizing their structures), click the RECALC button in the current table tool bar.

Help

Checking the Guide? check box gives you on-screen help (in the upper left corner of the model window) on using the Tabulate Atom Properties control panel.

Additional information

Please see the on-screen help for details on the functioning of each control in the Tabulate Atom Properties control panel.

Saving tables containing models

Saving a table (Saving a table) that contains models saves only the model ID with the table. Structural data are not saved; therefore, structures are not displayed if you open that table file in a future Cerius2 session. If you want to also save the models, you need to save the session (Saving the current session).


Grouping table information

You can define any subset of columns and/or rows as a group and give that group a name. Named groups are stored in the table file when you save the table to disk.

Finding information

This section includes information on:

Creating a named group

Editing a group definition

Selecting named groups

Deleting a group definition

Uses of named groups

Groups can be used in several ways in the Cerius2 table window. You can:

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. Selecting columns and rows is discussed under Selecting rows and columns.

Creating a named group

You can create a named group from a selection of rows or columns, by saving the results of a search (Searching for information in a table) as a group, or by duplicating an existing group.

Creating a named group from a selection

To create a named group from selected rows and/or columns, you need to access the Table Groups control panel:

or:

Assure that the Selection tool is selected, enter a name in the Group Name entry box, then click the CREATE pushbutton. All currently selected rows and/or columns are included in the newly defined group. (The columns and/or rows need not be contiguous.)

Defining the entire table as a named group

First defining a table as a group could be a convenient way of selecting or displaying the original table after you have added columns or rows to that table.

To create a group from the entire table, access the Table Groups control panel as under Creating a named group from a selection. Select the Entire Table tool, enter a name in the Group Name entry box, then click the CREATE pushbutton.

Creating a named group from search results

To create a named group from the results of a search, you can specify that the search results be output as a group. Before starting the search (Searching for information in a table), check the Save Results check box in the Find Cells control panel and enter a name in the associated Group entry box. After the search is complete, the results are defined as a named group.

Duplicating an existing group

To use an existing group as the basis for starting to define a new group, you can duplicate the original group.

To make a copy of an existing group, access the Table Groups control panel as under Creating a named group from a selection. Select the Group tool and enter the name of the group to be duplicated in the Group entry box by choosing its name from the associated popup. Enter a name for the new group (the copy) in the Group Name entry box, then click the CREATE pushbutton.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Groups and Find Cells control panels.

Editing a group definition

You can add more rows and/or columns to an existing named group, merge two groups, and remove rows and/or columns from an existing group.

Adding rows or columns to a named group

To add selected rows and/or columns to an existing group, access the Table Groups control panel as under Creating a named group from a selection. Select the name of that group by clicking its name in the Groups In Table list box. Assure that the Selection tool is selected and click the MERGE pushbutton.

Merging existing groups

To merge two or more existing groups into a new, larger group, access the Table Groups control panel as under Creating a named group from a selection. Enter a name for the new group in the Group Name entry box. Select the Group tool and enter the name of the first group to be merged in the Group entry box by choosing its name from the associated popup. Click the CREATE pushbutton.

The new group's name appears in the Groups In Table list box and should be highlighted. Enter the name of the second group to be merged in the Group entry box by choosing its name from the associated popup and click the MERGE pushbutton. Repeat for any additional groups that you want to include in the new group.

To simply merge the contents of two or more existing groups without creating a new group, access the Table Groups control panel as under Creating a named group from a selection. Select the name of the group that you want to add material to by clicking its name in the Groups In Table list box. Select the Group tool and enter the name of the group to be merged in the Group entry box by choosing its name from the associated popup. Click the MERGE pushbutton. Repeat for any additional groups that you want to include in the enlarged group.

Removing rows or columns from a group

To remove selected rows and/or columns from an existing group, access the Table Groups control panel as under Creating a named group from a selection. Select the name of that group by clicking its name in the Groups In Table list box. Assure that the Selection tool is selected and click the REMOVE pushbutton.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Groups control panel.

Selecting named groups

You can select a group, either to use it in some task or as a way of viewing its contents.

Selecting groups

To select (and highlight) an existing group, access the Table Groups control panel as under Creating a named group from a selection. Select the name of that group by clicking its name in the Groups In Table list box. Click the SELECT pushbutton.

Related information

If you want only the desired named group to be visible in the table window, please see Viewing named groups.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Groups control panel.

Deleting a group definition

You can delete a group definition from the current table. This deletes only the definition, not the rows and/or columns themselves, which remain in the table.

Removing named groups

To remove the definition of an existing group, access the Table Groups control panel as under Creating a named group from a selection. Select the name of that group by clicking its name in the Groups In Table list box. Click the DELETE pushbutton.

Removing all groups

To remove all group definitions from the table, click the Delete All Groups action button in the Table Groups control panel.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Groups control panel.


Searching for information in a table

Why read this section

You can use a search facility to locate cells containing information of interest. You can specify relational operators and perform comparison operations and can save the result of the query as a table group or view the results as a subset view. You can also replace found values with new values that you specify.

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. Selecting columns and rows is discussed under Selecting rows and columns.

Accessing the tools

To search selected rows and/or columns or the entire table, you need to access the Find Cells control panel:

or:

Where to search

You can search all or part of the current table:

What to look for

To find any string of alphanumeric characters, enter what you want to look for in the Find entry box. The associated popup must be set to Text.

To search for exact matches to your entered characters, assure that the Where Cells Are popup is set to an equals sign (=). (To search for values that are greater than or less than (etc.) your entered characters, see What constitutes a find.)

Potential text matches are compared with your entered characters as text strings. Case is ignored in character matches unless you check the Case Sensitive check box. Potential numeric matches are compared with your entered characters as numbers, unless you check the Compare Numbers as Text check box.

To search for all empty cells, set the Find popup to Null Cells.

What constitutes a find

To perform tests other than exact matches between the potential matches and your entered characters, change the Where Cells Are popup from an equals sign (=) to some other criterion (Table 24).

Text comparisons are done alphabetically. For example, searching for cells containing values greater than m would match toluene and xylene, but not acetate.

Table 24. Comparison criteria in Cerius2 table searches

Relational operator Description
=   Search cells for an exact match to the entered characters1.  
~   Search cells for an approximate match to the entered characters, using a tolerance value specified in the Tolerance entry box.  
!=   Search cells for items that do not match the entered characters.  
>   Search cells for items that are greater than the entered characters.  
>=   Search cells for items that are greater than or equal to the entered characters.  
<   Search cells for items that are less than the entered characters.  
<=   Search cells for items that are less than or equal to the entered characters.  
in   For text comparisons, search cells to determine whether the entered characters is contained within a cell value.   In a replace operation, only the matching content of the found cell(s) is replaced with the specified replacement characters. For example, suppose the entered characters1 bcd is to be replaced with the value BCD. If the string AbcdEF is found, it is replaced with ABCDEF (not simply BCD).  
!in   For text comparisons, search cells to determine whether the entered characters are not contained within a cell value.  
1 That is, the characters you entered in the Find entry box.

Changing the contents of "found" cells

To replace found material with something else, enter the replacement characters in the Replace entry box and assure that the associated popup is set to Text.

To delete found material from the cells containing them, set the Replace popup to Null Cells.

(Then initiate the search by clicking the FIND & REPLACE pushbutton, see Initiating the search.)

Where to put the results

Ordinarily, "found" cells are just highlighted after the search is complete. However, you may also:

and/or:

Initiating the search

To simply search for the desired information, click the FIND pushbutton in the Find Cells control panel.

To search for information and replace it with the specified text, click the FIND & REPLACE pushbutton in the Find Cells control panel.

Additional information

Please see the on-screen help for details on the functioning of each control in the Find Cells control panel.


Viewing subsets of a table

You can collapse the view of a table so that only a designated set of rows or columns is displayed. You can toggle between viewing the full table and viewing the designated subset.

Finding information

This section includes information on:

Viewing named groups

Viewing search results

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above.

Viewing named groups

Accessing the tools

To view only a named group, you need to access the Table Groups control panel:

or:

Viewing named groups

To view only an existing group, select the name of that group by clicking its name in the Groups In Table list box in the Table Groups control panel. Click the VIEW pushbutton.

Viewing the whole table

To view the entire table, do one of thee:

Related information

Creation of named groups is discussed under Grouping table information. If you just want to highlight the desired named group (without hiding columns or rows that are not in the group), please see Selecting named groups.

Additional information

Please see the on-screen help for details on the functioning of each control in the Table Groups control panel.

Viewing search results

Accessing the tools

To view only the results of a search, you need to request this while setting up the search criteria with the Find Cells control panel:

or:

Viewing only search results

You can specify that only the search results be displayed after a search. Before starting the search (Searching for information in a table), check the View Results check box in the Find Cells control panel. After the search is complete, only the results are visible in the current table.

Viewing the whole table

To view the entire table, click the RESTORE VIEW tool in the table manager tool bar or select the Data/Restore View menu item from the TABLES card. (The RESTORE VIEW pushbutton in the Table Groups control panel also works.)

Related information

Conducting searches is discussed under Searching for information in a table.

Additional information

Please see the on-screen help for details on the functioning of each control in the Find Cells control panel.


Sorting table information

You can reorganize a table by sorting its rows on the basis of the contents of up to three columns.

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. Selecting columns and rows is discussed under Selecting rows and columns.

Accessing the tools

To sort all or part of a table, you need to access the Sort Table control panel:

or:

Specifying sort criteria

To specify the primary sort criterion (that is, the column whose contents are used first for ordering the table), enter the column name or number in the Sort First By entry box by:

or:

For situations in which more than one row contains identical values in the column containing the primary sort criterion, you can use one or two additional sort criteria. Enter these columns' names or numbers in the Then By entry boxes (as described above for the first criterion).

Tip

You can set the first (and second and third) sort criteria by simply selecting the column(s) in that order. Those column names or numbers automatically appear in the correct entry boxes in the Sort Table control panel.  

You cannot use columns containing model data (Models in tables) as sort criteria unless the column contents are displayed as object IDs. However, you can use a binary (Binary model operators) or unary (Unary model operators) model operator in an expression in some other column and use that column as a sort criterion.

Specifying sort order

Specify whether the sort order for each criterion is to be Ascending or Descending by setting the popups under each of the criterion entry boxes.

How many rows to sort

You can specify whether all or only part of the table is sorted:

All nonsorted rows remain in their original positions within the table.

Starting the sort

When you have specified all your desired options, click the SORT pushbutton to initiate the sort.

Additional information

Please see the on-screen help for details on the functioning of each control in the Sort Table control panel.


Graphing table information

You can plot selected columns or rows as line graphs, scatter plots, or histograms. (Values in columns are plotted vs. corresponding values in other columns, or values in rows vs. values in rows.)

Related information

Editing (Displaying and editing graphs) and managing (Managing graphs) graphs are discussed in Working with Graphs.

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. Selecting columns and rows is discussed under Selecting rows and columns.

Accessing the tools

To graph table contents, you need to access the Plot Table control panel:

or:

Specifying the data to plot on the y axis

Ordinarily, related data are contained in columns, and the Y Axis popup should remain set as Columns.

To plot all data contained in one or more columns, select the column(s) whose values you want to plot on the y axis and assure that the Selection control on the left is selected.

You can plot every column in the table by selecting the Entire Table control on the left side of the control panel.

If groups are present (Grouping table information), you can plot only columns contained in a group by selecting Group (on the left) and choosing the group name from the associated popup.

The procedure is analogous if you set the Y Axis popup to Rows.

Specifying the x axis

To specify the data to be used as the x axis, choose a column name or number from the X Axis popup.

To plot all values in the table, select the Entire Table control on the right side of the control panel.

You can restrict the x axis to a part of the specified column by selecting the desired rows and selecting the Selection control on the right side of the control panel or by selecting Group (on the right) and choosing a group name (Grouping table information) from the associated popup.

You could, for example, plot all columns within a restricted range of values along the x axis by selecting Entire Table on the left and Selection on the right.

Note

If the x axis is anything other than the row index numbers, you probably want to sort (Sorting table information) the table using the column that you will use as the x axis as the primary sort criterion.  

The procedure is analogous if you set the Y Axis popup to Rows. In this case only rows appear in the X Axis popup.

Specifying the type of graph

To specify the type of graph, choose Line, ScatterPlot, or Histogram from the Type popup.

Titles and labels

If you want a title for your graph, enter it in the Title entry box.

You can enter axis labels for the x and y axes in the Axis Label entry boxes on the right and left sides (respectively) of the control panel.

Generating the graph

Finally, click the PLOT pushbutton in the Plot Table control panel.

Additional control over graph style, range, labels, annotations, etc. is available in the Graph module of Cerius2 (Working with Graphs) and can be used to modify graphs after they are generated by the Table module and to control, for example, whether new graphs replace or are added to previous graphs displayed in the graph window.

Note

The graph in the graph window is not automatically updated if you change the data in the table or decide you want a different type of graph. You must click the PLOT pushbutton to regenerate a graph.  

Additional information

Please see the on-screen help for details on the functioning of each control in the Plot Table control panel.


Exporting table information

You can export all or part of the current table to disk in a variety of formats for later importation into an external program such as a spreadsheet.

Related information

The usual procedure for saving a table in the default MSI table format is discussed in Saving a table. However, if you want to save only part of a table in MSI format, you need to use the procedure described here.

You should already know...

How to access the Tables module is described under Accessing the tools. How to select a table for display and editing (Specifying the current table) and how to make sure control panels are connected to the desired table window (Keeping track of the current table) are discussed above. Selecting columns and rows is discussed under Selecting rows and columns.

Accessing the tools

To export table contents, you need to access the Export Table control panel:

or:

Exporting table information

To select the file format in which to save the current table, set the Format popup as desired.

To save the entire table, select the Entire Table control. Columns containing model data (Models in tables) cannot be saved in any format other than MSI. However, you may save other columns in your table in any available format, by selecting only part of the table:

To save selected row(s) and/or column(s), select the Selection control. To save a group (if present in the table, see Grouping table information), select the Group control and choose a group name from the associated popup.

To set any additional options you want to use, set the appropriate controls in the area of the control panel below the Format popup. (The controls that are available in this section depend on which format you choose.)

Enter a filename in the entry box and click the EXPORT pushbutton to save your file.

Use of the file selection list box and other file selector controls to navigate the directory structure is presented in detail under Finding model file(s). Creating your own directories or subdirectories is described under Making custom directories.

Additional information

Please see the on-screen help for details on the functioning of each control in the Export Table control panel.




Last updated April 08, 1999 at 05:09PM Pacific Daylight Time.
Copyright © 1999, Molecular Simulations Inc. All rights reserved.