This menu provides quick access to spock's macro facility. Macros are
user-defined procedures that may be used to simplify a complex or
repetitive task. Macros are stored in the file ./.spmacros which is
erased each time spock is run. The file is not deleted on exit from spock
so that it can be inspected and macros taken from it and added to the user
.spockrc file or other files if desired. Macros are similar to
history or command files §7 with several important
additions. Macros will prompt for missing values, pop-up menu items, etc.
Here's a simple example macro definition as recorded in an interactive
session (this example assumes users are familiar with history/command
MENU> Delete Atoms
MENU> Mol 1: (ALA 1 C - ALA 1 WAT)
This defines a macro Delete_Mol which will delete molecule 1 if
molecule 1 happens to consists of atoms named ALA 1 C-ALA 1 WAT.
As this is clearly not a general case it might be nice to generalize this
macro. Simply deleting the Mol 1: ... line will do the trick. When
spock executes the macro it expects to find a MENU> line at that point.
Since it does not, spock will temporarily switch back to interactive mode
and display a pop-up menu with whatever molecules are defined when the
macro is run. This quite different from a command file, which would
simply signal an error and try to continue.
Macros may be defined from history or command files. The default macros
are defined in the system configuration file $SPOCK/Spockrc (§
3.8). Macros may also be defined on-the-fly by choosing
``Record Macro'' from the macro menu. Spock will prompt for a name for
the macro. All actions after this point are added to the macro until
``End Macro'' is selected from the macro menu. The command-line interface
to macro creation and execution is described in §
5.2.7. The rest of the macro menu simply consists
of macro names. Selecting a macro name will, of course, execute that
The following macros are defined by default in $SPOCK/Spockrc:
Spock is supplied with an ``effects'' macro package which may be useful in
making movies. This package automates such tasks as fade-ins and
fade-outs, etc. To use these macros, you must load the history file
- Save image: This macro pops up the save image dialog.
It's intended to be useful when you wish to save an image from
- Antialias_scene: This macro runs
``Graphics Antialias scene.'' It may be useful in
full-screen mode when you wish to photograph the screen.
- Beautify: This macro alters many of spock's parameters
in order to create the best possible image, at the expense of
rendering time. Spock's defaults are chosen to give a reasonable
compromise between image quality and a rendering speed suitable
for interactive work. This macro sets the atom resoultion, the
bond and worm cross sections, the surface transparency mode, etc.,
to values which produce nice images but may require more time to
render. You may wish to activate this option immediately before
saving an image.
- Unbeautify: This macro restores the default values
which were altered in a beautify operation, and returns to
settings appropriate for interactive work. You may wish to use
this option after saving an image that you've run the ``Beautify''
- Full_Screen_On/Full_Screen_off: Toggle on or off full-
- Stereo_On/Stereo_Off: Toggle on or off hardware
stereo. You may wish to alter these macros for side-by-side
- Color_surface_subsets: Colors each surface subset with
a different color.
- Color_surface_by_potential: Calculates a molecular
surface, calculates the electrostatic potential and then displays
the interpolated potential on the surface.
- Emap_picked_atom: Display emap1 (if defined) centered
around the last picked atom. Contour level, color, and other
parameters for this emap are as set in the ``Alter->Density
Maps->Density contour 1'' menu.
- Center_on_last_picked_point: Identical to
``Graphics->Center on last picked point''.
- Quit spock: Prompts for quitting spock.
Other macro packages may be included in future releases. Users are
invited to submit macro pacakges for inclusion in the spock distribution.
Tue Sep 14 16:44:48 CDT 1999