![]() |
CCP4i: Graphical User Interface |
Documentation for Programmers | |
The modules.def File |
![]() ![]() ![]() |
Adding ``utilities'' to the modules.def File
Main and User modules.def Files
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/modules.def.
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.
As of CCP4i 1.5, it is possible to further group tasks within the modules into "folders". This is useful to group together subsets of tasks which are conceptually related to each other.
The modules.def file contains the following entries:
Each module is defined by a group of three entries:
Each task reference is defined by a group of four entries:
Note that the same TASK_NAME can appear a multiple number of times with different titles, different descriptions, or in different modules.
Each folder is defined by a group of five entries:
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.
A utility in this context is an application which is not a CCP4i task. Generally these are viewing programs such as Loggraph, rather than interfaces to crystallographic programs.
Some utilities can already be launched from the task list. New utilities can also be added by making a new ``task'' in the modules.def file, see the section on Editing the modules.def File. In this case the ``task'' name must be the name of the command to start the utility program prepended with run_, for example:
To add a new utility which is started using the command myutility, the taskname will be run_myutility.
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.
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:
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_TOP/help/modules/modulename.html. By default the Help button on the top right of a task window will link to this help file.