1. Setup of depp pages explained Keyword: building unit, composition Last modified: 28-aug-2006 1.1. What is a menu block and what an item Keyword: menu block, menu item, block, item A MENU BLOCK is a list of ITEMS separated by an empty space. Items within each block are displayed with the saem color. Each ITEM is the visible string you actually see and can click. When clicked, a command line is submitted to the command sentence interpreter. Complexed commands are written as macros. The arrow shape cursos indicates the program awaits new events from the interactive devices (mouse, dials and keyboard). When an ITEM is clicked the cursor is changed from an arrow to a clock pointing that MAIN is executing the submitted commands. The arrow shape of the cursor reapears after the commands have been completed. Some items have filled or empty squares in front of them. This squares mark their status. Clicking on one of them usually does not result in anything, except the change of the mode reflected by the change of the box. Actions happen by clicking other (not-square-headed) related items within the same menu block, which use these modes as parameters. "help" mode is activated by pressing "H" in the image window and indicated by the cursor change into the question mark. When items are clicked in the help mode, their documentation is written into the terminal window and no command is submitted. Another "H" returns clicking of items into the working mode indicated by the "arrow" cursor shape. 1.2. Loading menu blocks Keyword: load menu, load_depp_page.com The file "MAIN_CMDS_NEW:load_depp_page.com" and "MAIN_CMDS:load_depp_page.com" (for the older releases) load the initial menu setup. "MAIN_CMDS:" and "MAIN_CMDS_NEW:"directories include macros of menu items (".cmds" files) and the "load_...com" files, which load the additional menu blocks. Each menu item command that starts with a "?" checks weather the file with that name is present in your working directory, and when found it is processed, otherwise the default MAIN installation file is taken. If you want to create your menus, look at the "load" files as examples and see "MAIN_COM:menu.txt" for further instructions. 1.3. Menu blocks documentation and documentation mode Documentation files of menu blocks are stored in "MAIN_MENU:" directory and are accessible also via "MAIN_DOC:dialog_manual.HTML". When the "Depp pages" window is in the DOCUMENTATION mode, short description of the pressed BLOCK and ITEM is written to the standard output window. The DOCUMENT mode can be turned on or off either by pressing 'h' on the keyboard or by typing the command > MENU DOCUMENT ON/OFF. 1.4. Using menu items Keyword: menu items Some items require arguments, some don't. The arguments are in passed to an time in a form of - history list, - atomic selections, - strings typed into the starting MAIN window (inquired variables) or - somewhere else predefined MAIN variables. The general philosophy is that you first define an argument and afterwards activate the function. This way the same argument can be reused in many functions, besides the argument list can be edited so that the atom clicked by mistake can be removed with no need to cancel the function. So approval of a command is not necessary. One level of "UN_DO" for coordinate changes can return the geometry of a model to its previous state. This provides a drawback for beginners and an advantage for experienced users: as the arguments are first defined as potential arguments that will turn into applied arguments as a function is activated (an ITEM is clicked) it is for an unexperienced user not immediately clear which form and which potential argument will be taken with a certain function. So browsing the manual can be of help - in particular the documentation related to the menu items in "Dialog Mode Accessories" manual ("MAIN_DOC:dialog_manual.HTML"). 1.4.1. Menu arguments: History list Keyword: history, atom, list, argument Atoms are arguments. more precisely they become potential arguments, by clicking. When clicked, an atom is pushed on the top of the history list. The last one clicked is always the first one on the list. The last atom can be dropped from the list ("HIS_DROP"). The whole history list can be erased with "HIS_ERAS". The "HIS_DIST" allows you to measure and monitor interatomic distances when moving the atoms around. For more about history items see "MAIN_MENU:history.txt". "IMAGE HISTORY" commands manipulate the history list and history functions. See "MAIN_COM:image.txt". 1.4.2. Menu arguments: Selection keys Keyword: selection, keys, argument, active, image, passive, WORK_REFL The history list is created by clicking atoms. Atomic selections are usually created by providing history atoms to the "SELECT NICE" and "SELECT LONG" menu blocks. You can, however, at any moment choose to use the command language to define or redefine any of the keyed arguments. The most commonly used keys are "active", "passive" and ""image". Key "active" tells that something will happen with the selection of atoms (MINIMIZE, for example, will allow to move only active atoms). the key "image" contains the list of pickable atoms, ... "KEY something SELECT ... END" commands manipulate the keys. See "MAIN_COM:select.txt". There is also "WORK_REFL" key, which does not mark a list of atoms but reflections. It is a key, in contrast to "WORK_SEGM", which is a variable. 1.4.3. Menu arguments: inquired variables Keyword: inquire, variables Some arguments are inquired. You have to respond with a typed an answer, which can be either an integer or real number or a string. The resulting variables are either immediately applied ("LOAD_PDB") and also deleted after their use, or stored as GLOBAL variables to be used later in combination with other items ("MAP_ACT" and other map related menu items). Command > show vari reveals the current variable list and their values. For instructions how to set variables see "SET VARIABLE" in "MAIN_COM:set.txt". 1.4.4. Menu arguments: predefined variables Keyword: variables, WORK_SEGM, MAP_2FOFC, DEF_ALL Some variables are defined in the initial macros as global variables and then used throughout the MAIN macros environment to pass some common arguments. The variable "WORK_SEGM" contains a list of working SEGMENT NAMES. It is used to pass the list to various macros, which then use the list in their SELECT commands. "RE_IMAGE", "SYMMETRY", "REFINE" are only some of such menu items. The variable is defined in a "read.com" file and can be verified with "SHW_SEGM" updated with "UPD_SEGM" menu items. If the variable doesn't exist, or contains the wrong segment names, essentially nothing will work, unless you have created your own environment almost entirely. In a "read.com" map variables "MAP_2FOFC", "MAP_FOBS" are defined in order to differentiate among various created maps. The "DEF_ALL" variable is defined in a "MAIN_UTILS:get_top_par_19_csd.com" or similar script and it points to a macro, which assigns atom types and creates lists necessary for energy calculations.