-> Table of Contents

Moloc: Molecular Modelling on UNIX Workstations: 3 Control of the Program

Control of the Program

The program Moloc has been designed in such a way that no non-standard devices are needed to operate it. Keyboard and three-button mouse provide enough possibilities to control the program properly, no use is made of special devices such as dial boxes or switch boards. This has the advantage that no special equipment is needed to run the program.

Furthermore, the design is such that most of the control functions are performed by using the mouse, while the keyboard is needed either to enter text or to switch between different functionalities of the mouse.

Generally, options are chosen from a menu bar that appears at the bottom of the window. In the main menu the options are indicated by three letters, while the submenus generally use a one-letter code.

3.1 Start-up File

The user can have a start-up file called .Moloc to reset various parameter values from their defaults. If the program finds such a file in the users home directory, it reads it and resets the indicated parameters from the default values to the ones indicated in this file, then it looks further for such a file in the current (start-up) directory and performs an additional reset. Features that can be modified include number and definition of colors, view parameters, help presentation, and a mask for the force field calculation. This file enables the user to customize the appearance of the program to his personal likings.

Such files can be produced from the running program and then contain the current values of all parameters that are accessible to customizing. To test new settings such files can also be read from the running program to test the result of modified settings.

3.2 Help Facilities

Apart from this brochure the user can obtain help directly on-line, when operating the program. There are two such possibilities:

The first item on every menu bar is the short-help choice (?). Depending on the value of the parameter menuhelp in the start-up file (.Moloc) two modes of operation are possible. If menuhelp is 'no', choosing '?' leads to the presentation of the options in a vertical arrangement. After each possible choice a short explanation is printed to provide a list of content of the current menu. Upon continuing operation of the program the list disappears again. Choices can only be made on the horizontal menu bar. However, if menuhelp is 'yes' the list of content is toggled on and off by subsequent choices of '?'. In this case choices can also be made on the letters of the vertical list of content (if displayed).

A more detailed help text can be produced on single options by choosing them while the control key is pressed. Instead of performing the action, some text is put to the control window which is intended to explain the action of the option. The help texts of the top (3-letter) menu consist of keyword lists which are intended to characterize the type of activities accessible in these corresponding submenus.

Applying this extended help mechanism to the ? button leads to the presentation of a requester in which the user can write a string. The program takes this string and performs a search in the help texts of every item of the current menu. For every item where the string has been found, the full help text is printed with the search string highlighted in capitals. Together with the keyword lists of the top menu this provides a kind of interactively accessible index for the activities that can be performed in the program. If the search-string is a single question mark '?' extended help for the whole menu is presented.

Help is also available in some of the requesters described below. For a description of its access see there.

This manual is a status of menus as implemented in November 1997. Since there will be continued development on Moloc, the menus will extend and possibly also change for reorganization. Thus, the user is advised to consult on-line help to be sure to get an up to date description of the options. In this respect the manual should be considered a snapshot of available functionalities.

3.3 Mouse Functionality

The basic functions of the mouse are to click on selections from menu bar or requesters and to manipulate the view.

Selections are made by clicking the right-hand button (R) of the mouse after having moved the pointer to the appropriate field on the display. If an item requires further action by the user (e.g. picking of an atom), its choice is indicated by a color change of the text in the menu bar.

Clicking the R-button in the display area causes the window to flip on top of the window stack. This is useful when resuming the Moloc session, after other activities which might have partially covered the Moloc window.

In the case of text input, the R-button works like the return key, which means that the keyboard need not be touched if an offered default is accepted.

Sliders are changed by clicking with the left-hand mouse button (L), or continuously by keeping L pressed and moving the mouse in x-direction. The action is finished by a R click.

The orienting function of the mouse is generally active, except when a requester has to be answered. To change the view, the mouse is moved over the tablet while pressing down either left (L), middle (M) or both these mouse buttons. In order to activate precise rotations about single axes one needs to press down the Alt-key (Alt) of the keyboard in addition. The following table summarizes the various possibilities.

Moloc Mouse Functionality

Keys pressed Function under x-movement Function under y-movement
L Rotate about Y-axis Rotate about X-axis
M Shift along X-axis Shift along Y-axis
L and M Zoom in and out Shift along Z-axis
L and Alt Rotate about Y-axis no function
M and Alt no function Rotate about X-axis
L and M and Alt Rotate about Z-axis no function

3.4 The Ctrl-key (C) Function (select)

By pressing down the Ctrl-key (C) of the keyboard, the mouse alters its functionality. It is then used as a picking device on displayed structures. Depending on the situation, picking of an atom, a bond or either of both is enabled. Clicking the left hand mouse button chooses an item and performs the indicated action (dependent on the present menu selection). In cases where this makes sense, clicking the middle mouse button performs the reverse function. For example, if no particular menu choice is active, an L-pick presents the label of an atom while a M-pick removes it. The Alt-key is again used to modify the picking functionality. Without pressing it, any item visible on the screen can be picked. However, if the Alt-key is also pressed down, only items of so called "active" entries (see below) are susceptible to being picked.

As mentioned above the C-key is in addition used to get on- line help on the menu items.

3.5 Shift-key (S) Function (operate)

In certain situations (e.g. while forging coordinates) a further functionality in addition to spacial manipulation is required. Typical examples are driving a torsional angle, or moving about a set of atoms. In such cases this functionality is enabled by pressing down the shift-key (S) of the keyboard in addition to the appropriate mouse key. By this token switching back and forth between manipulation and view- changing is very fast, thus providing the possibility to immediately adjust the view in a way optimally suited for the manipulation in question.

Some options require picking with both S- and C-keys pressed. In the default key binding of the window manager this combination is trapped. To remove this trap the user is requested to have a private start-up file for the window manager (.4Dwmrc) in his home directory, in which this binding is removed. This is also convenient in several options in which shift operations and picking alternate. The shift key can be pressed continuously, even during picking.

3.6 Requesters

In addition a set of various requesters are implemented namely:

- confirmation

- selection of a single item

- selection of multiple items

- cyclic setting of switches (with several positions)

- input of text

- input of numbers

- input of several values of various type

3.6.1 Confirmation

A dialog box with a question pops up. Answer the question by clicking in the 'yes' or 'no' box with the right mouse button (R). In some cases an additional help box is presented. Clicking this box presents the user with a help- text to facilitate the decision.

3.6.2 Selection of a Single Item

A box with several choices pops up. Choose by clicking one of the choices with the right or middle mouse button (R or M). The exit (q) choice aborts the action.

3.6.3 Selection of Multiple Items

A box with several items pops up. Select or unselect the items you want by clicking the corresponding box with the right or middle mouse button (R or M). The all item will select or unselect all items, the x item will accept the current selection and exit the box.

3.6.4 Cyclic Setting of Switches

A box with several items pops up. Cycle through the switches of a item by clicking the corresponding box with the right (forward cycling) or middle (backward cycling) mouse button (R or M). The all item will cycle the switches of all items, the x item will accept the current switch setting and exit the box.

3.6.5 Input of Text

A titled box pops up. It works as a little editor with the following features:

Characters: The characters are inserted into the current text, or overwrite the current text depending on the mode at the cursor position. Default mode is insert. The mode is switched by Ctrl a (^A).

Back Space key (^H): Deletes the character in front of the cursor.

Delete key: Deletes the current text.

Esc key (^[) and Ctrl z (^Z): Deletes the current text and exits the text box. If an empty string has no special meaning this results in an abort.

Left arrow key ( \xac ): moves the cursor one position backwards.

Right arrow key ( \xae ): moves the cursor one position forwards.

Up arrow key ( \xad ): moves the cursor to the beginning of the text.

Down arrow key ( \xaf ): moves the cursor to the end of the text.

Enter key (^M): If the text string starts with a percent sign (%), the line is executed as a shell command, otherwise the current string is returned to the program.

Right mouse button (R): exits the text box with the current string. This is identical to the Enter-key action, and often convenient when a default, proposed by the program, is accepted unaltered.

Left mouse button (L): positions the cursor.

3.6.6 Input of Numbers (Sliders)

A box with several sliders pops up. With the left mouse button (L) you can move the sliders by clicking or dragging. Clicking the right mouse button (R) accepts the new setting of the sliders and exits the slider box. Minimal and maximal values are presented on both sides of the slider. Furthermore the variable is characterized in a field and its current value in an additional field to the very right. This last field can also be used to enter a value by typing the corresponding number.

3.6.7 Simultaneous Input of Parameters of Mixed Type

To set parameter values of various types in a single requester a box (widow) pops up with a single line for each parameter. The left hand section of each line characterizes the parameter. By clicking in this field with the right hand mouse button help on the function of the corresponding parameter is presented. In the right-hand field(s) the values can be modified. Text parameters and numerical values are modified with the small editor described in Section 3.6.5 . Choices are altered with the right-hand mouse button.

-> Table of Contents