Command Mode -> Moloc Home

Molox, the X-windows OpenGL version of Moloc, can hold a single string of
commands that can be replayed at any time. Such a sequence reflects the
menu choices of an interactive session. Thus, it is tied to a particular
menu from which the users actions started when recording the command string.

Recording a sequence of commands:

'Shift ?' Selecting the menu option '?' with pressed shift key causes the
          program to record all following menu choices for later replay.
          Any currently held command sequence is printed to the text port
          and then deleted.
'Alt ?'   Selecting the menu option '?' with pressed alt key stops recording
          and presents the current command string in a string requester for
          additional editing. After quiting the string requester the string
          is printed to the text port and can be saved (by cut and paste) for
          later use.

Entering a previously saved command string:

'Alt ?'   This same menu choice can also be used to enter a command sequence
          by pasting it into the string requester, without first executing it.

Replaying a sequence of commands:

'Alt x'   The sequence of commands currently held as command string is
          replayed. No menu exit is performed!
'Alt *'   The command '*' (any command except '?' or 'x') is first executed
          and then the sequence on the command string is appended.

Examples

Typical applications for the use of command strings are encountered the
browse menu .../n/b, where the same sequence of actions may be useful for
many entries in the set to be browsed.
As an example we take the case of a set of inhibitors which are shown in
the context of their receptor and should examined for H-bonds with this
receptor. The following steps are then appropriate:

- Define a entry set containing the inhibitors (.../n/g).
- Enter the browse menu (.../n/b) and choose this set to be browsed.
- Put the receptor entry(ies) which may not be member(s) of the set, in the
  active state (./a).
- Start recording the following commands by choosing 'shift ?'.
  - e (examine energies) we are now in the examine menu.
  - * switch to display of intramolecular interactions.
  - 1 switch to display of intermolecular interactions.
  - h show H-bonds.
- Stop recording commands by choosing 'alt ?'. The string requester now
  presents the command sequence e/*/1/h/ (the / is used to separate
  commands). The commands '*' and '1' make now no more sence, because
  the display mode is already switched to intermolecular. Thus we delete
  this portion of the string and return e/h/. The program confirms by
  printing: Current command string: e/h/
- We are now left in the examine mode and can look at the displayed
  H-bonds. The menu is left as usual with 'x'. This command may not be
  recorded because then, no time for examination is provided!
- Back in the browse menu we choose 'alt n'. Then the program displays the
  next entry of the browse set, immediately performs the energy calculation,
  and again displays the H-bonds. Then the replay stops.

As a second example we want to minimize the inhibitor together with the
receptor. In this case, being in the browse menu as in the preceding
example, the following steps are needed:

- Start recording the following commands by choosing 'shift ?'.
  - o (generate duplicate and minimize) we are now in the optimizer menu.
  - s (define stationary atoms) we have entered the set menu to keep the
      receptor fixed.
  - e (add an entry to the set) and pick the receptor(s).
  - x leave set menu with fixed atoms defined. We are back in the optimizer
      menu.
  - o make the optimization.
  - x leave the optimizer to get back into the browse menu. Moloc now
      shows a selector to decide what to do with the minimized copy. We
      choose 'replace original'. This choice is not recorded but the default
      is changed to our choice.
- Stop recording commands by choosing 'alt ?'. The presented command sequence
  now reads o/s/e/x/o/x/. Again we do not want to repeat the definition of
  the stationary atoms and replace s/e/x/ by y/. This, because upon entering
  the optimizer, the program will ask the question 'KEEP existing set of
  fixed atoms?' which we want to affirm. The final command string now reads
  o/y/o/x/.
- In order to apply the whole command sequence to the next entry we choose
  again 'alt n'. Then the program switches to the next entry of the browse
  set, makes a duplicate, enters the optimizer, keeps the receptor fixed,
  optimizes, replaces the original and stops back in the browse menu without
  calling on the user at all.