CCP4 web logo CCP4i: Graphical User Interface
Documentation for Programmers
The modules.def File

next button previous button top button

The modules.def File

Editing the modules.def File

Main and User modules.def Files

Old-style modules File

The modules.def File

The modules.def file defines which items appear in the task menu list on the left hand side of the CCP4i main window. The file has the full path name $CCP4I_top/etc/OPSYS/modules.def, where OPSYS is an operating system dependent directory (either UNIX or WINDOWS).

The CCP4i convention is to organise the functionality into tasks (where one task usually corresponds to one major program) and then to group the tasks into modules (where each module is a stage in the crystallographic refinement procedure). There is also a 'Program List' module which is just a list of the interfaced programs in alphabetical order. There is a menubutton in contrast colour near the top left of the main window which is used to select a module. The tasks in the module are listed beneath the module menubutton. By convention the tasks are listed in the order that you would expect them to be used in a refinement procedure.

The modules.def file contains the following entries:

PROJECT
The name of the project - usually CCP4
TITLE
The title of the project which will be the title given to the main window
MODULE_LIST
A list of the module names in the order they should appear in the menu of modules. If a module name doesn't appear in this list then it will not be displayed in the menu - even if it is defined elsewhere in the modules.def file.
N_MODULES
The number of modules which are defined in the file (see below).
N_TASKS
The number of task references which are defined in the file (see below).

Each module is defined by a group of three entries:

MODULE_NAME,n
A single word name for the module. This name is only used internally, and should appear in the MODULE_LIST in order that the module is displayed in the menu. The module name is used to specify the name of the help file which contains an overview of the tasks in the module: $CCP4I_HELP/modules/modulename.html. By default the Help button on the top right of a task window will link to this help file
MODULE_TITLE,n
The text which will appear in the main window module_title.
MODULE_TASK_LIST,n
A list of task titles corresponding to the tasks which are to be included in this module, in the order in which they will appear in the list of tasks as seen by the user in the main interface.

Each task reference is defined by a group of four entries:

TASK_TITLE,n
The text which appears in the button for launching the task as seen on the main window.
TASK_NAME,n
A single word which specifies the root name of the files which define the task window. These are the .def file $CCP4I_top/tasks/taskname.def and the .tcl file $CCP4I_top/tasks/taskname.tcl. If these files do not exist, the task will not be list in the task menu.
TASK_MODULE,n
The MODULE_NAME corresponding to one of the modules defined elsewhere in the file.
TASK_DESCRIPT,n
A brief description of the task which will be used for the message line help (i.e. the information which appears when the cursor is over the button for the task).

Note that the same TASK_NAME can appear a multiple number of times with different titles, different descriptions, or in different modules.

Editing the modules.def File

Due to the size and relative complexity of the modules.def file, it is recommended that it is not edited by hand but instead using the Edit Modules utility accessed from the Systems Administration menu on the right hand side of the main window. This provides options to add, remove and modify existing modules and task references.

Within CCP4i a set of procedures has been provided to directly manipulate the modules.def file. These procedures are in the $CCP4I_TOP/src/modules_utils.tcl file.

Main and User modules.def Files

In addition to the main CCP4i modules.def file, each user can have their own ``private'' modules.def. This file will have the full path $USER/.CCP4/OPSYS/modules.def. Entries in this file are appended to those read from the main modules.def and any additional modules or task references will be displayed in the main CCP4i window.

Old-style modules File

In CCP4i 1.2.7 and earlier, a flat-text modules file was used instead of a CCP4i .def file. This had the advantage of being easy to edit by hand, but was difficult for CCP4i to update itself. The old-style modules files are no longer used, however the information below is retained for historical reasons.

If you look at the first few lines of the modules file, you will see the following keywords followed by some text:

PROJECT
The name of the project - usually CCP4
TITLE
The title of the project which will be the title given to the main window
MODULE
This is followed by a single word name for a module modulename and then the text which will appear in the main window module_title.
Following the MODULE line are pairs of lines which define the tasks within the module. The first task line has a single word taskname followed by the task_title which is the text which will appear in the main interface. The second line is a brief task_description, a description of the task which will be used for the message line help (i.e. the information which appears when the cursor is over the button for the task).

The module_title and task_title will appear in the main window but the other information is used to find the files needed for the task interface.

The taskname specifies the names of the files which define the task window. These are the .def file $CCP4I_top/tasks/taskname.def and the .tcl file $CCP4I_top/tasks/taskname.tcl. If these files do not exist, the task will not be list in the task menu.

The modulename is used to specify the name of the help file which contains an overview of the tasks in the module: $CCP4I_HELP/modules/modulename.html. By default the Help button on the top right of a task window will link to this help file.