This menu allows a degree of control over some of the graphics options.
There are several options which relate to the current viewpoint, or more
precisely, the viewing transformation.
This option resets the viewpoint to the default viewpoint, removing all
translations and rotations, and re-centers the molecule in the display.
Unlike the reset view option above, this option only resets the rotation
components, leaving the center, scale and translations intact.
This option removes any applied translations and moves the center of
rotation back to the center of the display. This is the same as the
This option prompts for a selection string to specify the center of
rotation. It also removes any applied translations and moves the center
of rotation back to the center of the display. This is the same as the
set center command.
This option prompts for the X, Y, and Z coordinates to use as the center
of rotation. It also removes any applied translations and sets the center
of display to be at the new coordinates.
If the crystal parameters are defined (§6.7.11),
this option will set the origin of rotation and the center of the display
to be the midpoint of the unit cell. It also resets the global projection
and clipping planes to be large enough to accommodate the unit cell.
This command will undo the last rotation or translation orientation change
entered either via the mouse or by a rotation/translation text commands
(e.g. xr=10). For mouse rotations/translations, the previous
viewing orientation is considered to be the state before the button was
pushed. This means you can do a complicated series of rotations (while
holding down the mouse button), and after you release the mouse button,
the orientation may be reverted to the previous viewpoint (before the
series of rotations) with this command. Note that this is also accessible
via the Edit->undo menu option.
There are two options which affect the antialiasing of the entire scene,
which will smooth out jagged edges.
Unlike the antialias lines option, the scene antialiasing is only
performed once. However, it will also antialias polygons, and therefore
results in a much nicer overall appearance. The performance penalty for
scene antialiasing is too much for interactive graphics, which is why it's
a one-time-only command. The most common use of this command is to
generate high-quality images on screen to photograph. As such, it should
probably be used in full-screen mode, and users should define a simple
macro to access the command in order not to have to toggle the menu bar on
and off, which would re-draw the scene, and negate the antialiasing. Note
that it it not necessary to antialias files which are to be exported
via the ``Save image'' commands, as the image saving routine automatically
antialiases the scene before saving it.
option prompts for the level of antialiasing to be performed, which may
range from 1 to 7. This is not a linear scale, but is instead roughly
exponential. The level controls the number of times the image is redrawn
with a slightly different viewpoint in order to effect the antialiasing.
The levels correspond to: 0: no antialiasing; 1: 2 redraws; 2: 3 redraws;
3: 4 redraws; 4: 8 redraws; 5: 15 redraws; 6: 24 redraws; and 7: 66
redraws. The antialias level is used by both the Antialias scene command
of the graphics menu, and the automatic antialiasing applied by the save
These sub-menus control various aspects of the graphics display.
This submenu controls the stereo parameters for spock. Users can select
either side-by-side or hardware stereo on SGI systems. There are also
options to prompt for the twist (the stereo rotation angle) and the
separation (the distance views in side-by-side mode). The separation is
entered in fractional screen coordinates, where 1.0 is the entire width of
the viewing area. Users may wish to set their preferred stereo viewing
angle, and then copy the relevant portion of the history file to their
.spockrc startup file.
This submenu controls the binding of mouse button 2. By default, pressing
this button and moving the mouse controls the scale and the Z-rotation.
It may also be used to control several other properties. Since the
scale/rotation combination is often needed even while using the other
modes, pressing control, shift or alt before the mouse button temporarily
reverts the mouse control back to those parameters.
These options set and print the current viewing transformation matrices.
See Appendix E for details on how to specify matrices in
- Enter rotation matrix: This entry allows users to
explicitly set the viewing rotation matrix. This matrix should be
a 4x4 matrix, with the upper-left 3x3 components a pure rotation.
Spock accumulates the viewing translations separately, so if the
translation components are not all 0.0, the results are undefined.
Finally, the last row should be . The entered matrix
will replace the current viewing rotation matrix.
- Print rotation matrix: This will print out the current
4x4 rotation matrix. The purpose of this is for exporting a
particular view to other programs.
- Print transformation matrix: This prints out the full
viewing transformation matrix used by spock. Note that there is a
correction for the aspect ratio in this matrix, and so the scaling
components are not all equivalent.
These menu items allow users to view and set various parameters which have
to do with coloring.
Note: If you don't like the default color definitions spock supplies, and
you edit the color map, you can save your preferences with the Save
preferences command of the File menu. This adds the colormap to your
personal .spockrc file. The default Spockrc setup file (§
3) defines the variables $white, $red, $green, $blue,
$yellow, $cyan, $magenta, $orange, $purple, and $sky to refer
to colors 1-10, respectively. If you've edited the colormap, you may need
to define your own names for colors in your .spockrc files. If the
definitions for colors 1-10 are changed, the variables should also be
changed to names appropriate for the new colors. The literal definition
of the color variable names is simply a number, so if you change color 1
(white) to be mauve, don't be surprised when $white results in
mauve! If you change any of colors 1-10, you should re-define the
variables to point to color numbers that are appropriate, for instance,
set $white=11. See §5.2.4 for information
about setting environment variables. See §7 for details on
history files, including the .spockrc file.
This pops up a window showing the top view of the scene in the main
window. There are four sliders on the sides of this view, which control
the front and rear main clipping planes, and the front and rear auxiliary
clipping planes. Moving the sliders will move the appropriate clipping
plane and draw a line across the image indicating where the plane
intersects the view. The four sliders and the indicating lines are color
coded to help keep them straight. The outermost sliders control the main
clipping planes, and the innermost sliders control the aux clipping
planes. All objects are clipped by the main clipping planes, but only the
items specified in the Aux Clipping menu are affected by the aux clipping
planes. This allows you to (for instance) show a cut-away surface, while
still showing all of the bonds in a structure. The aux clipping planes
will also clip the top view, but the main clipping planes won't. Be aware
that there is a performance penalty for using the aux clipping planes, so
that if you don't need them you should make sure the sliders are all the
way to the top or bottom.
- Color tool: This option brings up a color editing tool
which will display 10 colors at a time and allow users to change
their definitions. Colors are not updated in the display until
and unless ``Apply'' is selected in the color tool. At this time,
the display is redrawn with the new color definitions, and any
changed color definitions are written to the history file. The
default color definition pattern uses colors 1-10 as the primary
colors and simple combinations of them. Colors 11-20 are the same
as colors 1-10, but 10 percent darker. Colors 21-30 are darker
still, and so on. This scheme makes it easy to set colors from
the command line, as if you want a darker version of a color
you've already got, simply increase it's color number by a
multiple of 10. For instance, if color 8 is too bright, color 38
is 30% darker, but the it has the same ratio of RGB components.
- Color offset: This option prompts for the constant
value to add to the default color for atoms and bonds, and is used
for the ac=d2 and bc=d2 atom and bond coloring
commands (§5.2.1). The color offset is added to
the default color (as defined by the internal table or as
re-defined by the set element command), and the resulting
number (modulo 100) is used as the second default color. This
provides (for instance) an easy way to distinguish two
- Set background color: This option allows you to set
the background color to any member of the color palette (colors
0-100). This option is the same as the text command set
bgc=N, where . (Color 0 is black).
- Show default colors: This simply prints a list of the
current default color numbers as defined by the define
element command (§5.2.4) for common atoms
(CA, C, O, N, S, P, and H). This option provided by popular
Note that normally the position of the clipping planes (and their
indicator lines) aren't updated until the slider ``thumb'' is released.
If you wish the clipping planes to be updated as you drag the slider,
press shift, alt, or control before clicking on the thumb, and hold it
down as you drag. This forces the display to be updated at each position,
but this can be slow with complicated graphics.
The clip tool's top view can also be useful when to help position a subset
that you're manipulating independent of the rest of the molecule (see §
Finally, it's worth mentioning that the dial box (§cross_ref_motif.) and the
fake dial box (§6.11.5) provide a way of altering the slab
thickness (the slab dial).
The Aux Clipping menu also has an entry which allows you to set the box
depth. Spock's geometry is all contained in a cube whose depth is
generally determined from the coordinates of whatever atoms or surfaces
are currently loaded. If, for any reason, you wish to change the size of
this cube, you may enter a value here. The value entered should be large
enough to contain all the geometry you wish to display. Selecting this
option also resets all clipping planes to their default values. Be aware
that the scaling factor does not influence this box, so if you've zoomed
out (and consequently have a small scaling factor and image) and set a
really tiny box, say 1.0 Ångstrom, you may be able to see much more
than 1 Ångstrom. Also note that choosing ``Reset View'' from the
graphics menu will re-calculate the box size from the loaded atoms or
surfaces, and thereby override any entered value for the box size.
The ``Clip Type'' menu of the Clipping Tool switches the clipping tool
back and forth between controlling the clipping planes, which is the
default behavior, and controlling the interpolation plane, which shows the
2D contours §6.4.6. Selecting ``Interpolation Plane''
from this menu will hide all of the clipping plane sliders, and show a
single slider to control the interpolation plane. Moving the slider up
and down will change the apparent screen Z coordinate of the interpolation
plane. Of course, 2D contours must be selected in the display menu, there
must be an active potential map, and at least one 2D contours must be
defined before moving this slider will appear to have any effect. To
return to controlling the clipping planes, simply select ``Clipping
Planes'' from the Clip Type menu.
The appearance of most objects in spock is largely determined by the
material properties assigned to that object type. This menu entry allows
users to change the material properties associated with an object, and
thus alter the appearance. A detailed description of the
lighting/material properties is beyond the scope of this manual; consult
the OpenGL Programming Guide . However, the material
properties are briefly described below.
The materials tool menu has a list of objects; selecting any object
displays the material editor for that object. Most of the objects are
normal spock objects, bonds, atoms, or surfaces. There are, however, two
special objects available through the materials menu: the ``global
material'', and the ``back-face Material''. The global material is an
easy way to set material properties for all other materials (except
for the back-face material) at once. The back-face material controls the
appearance of the back faces of polygons, for instance the inside of
surfaces. Normally, the back face is shown in a different material and
color than the front face, to indicate that you're seeing the ``wrong''
side of the polygon. All objects share the same back-face material, which
by default is a dull grey color. Users can elect to use the same color
scheme for both the front and back face of objects via the ``Tie Faces''
submenu of the graphics menu (§6.11.5).
The material properties:
The light tool box allows users to toggle on and off each of the lights
spock uses. There are currently two light sources in spock. The first
light (Light 0) is the headlight, which is assumed to be infinitely
distant and points into the screen. The second light's position and
direction may vary as described below.
- Fog Start, Fog End: The fog start and end parameters
control the depth-cueing of objects. The apparent color of an
object is linearly interpolated between the true color and the Fog
Color (see below). Each object is assigned a fractional depth
based on it's apparent distance from the viewer between the front
and rear clipping planes (§6.11.4). The front clipping
plane is at depth 0.0; the rear at 1.0. Obviously, an object
midway between the clipping planes will have a fractional depth of
0.5. The interpolation takes place between the Fog start and Fog
End parameters, which are expressed in fractional depth
coordinates. Objects closer than the fog start parameter are not
depth-cued, and have their true color. Objects whose depths are
between fog start and fog end are blended with the fog color in
increasing amounts, until objects whose depth is at or beyond the
fog end are ``fully depth-cued'' and are displayed with the fog
color itself. Obviously, these parameters interact with the
position of the clipping planes. For best effects, the clipping
planes should be set as close as possible to the molecule with out
clipping it (see §6.11.4). Finally, these parameters
are applied to the scene immediately, unlike most of the material
properties, which aren't changed until and unless the ``Apply''
button is pressed in the dialog. Setting the fog start and fog
end parameters to the same value disables depth-cueing for the
- Fog Color: This is the color used in
the fog calculations. The value of the parameter ranges from
1-100, corresponding to a spock color. Color 100 (black) is the
default, which is usually what you want, but if you've changed the
background color (with the bgc=n command §
5.2.1). You might want to use the background
color. The fog color is not the always the background color,
because with lighter backgrounds, fading to the background color
doesn't really give the illusion of depth. Like the fog start and
end, this parameter is applied immediately.
- Shininess: This parameter is the specular
highlighting exponent, and is ignored unless the specular
components are >0. Higher values of this property produce a
brighter, more focused highlight.
- Opacity: This parameter is only applicable for
Surfaces and Contours, and controls the degree of transparency of
the object. Values range from 0.0 (completely transparent) to 1.0
(totally opaque). Note that this will only be effective if the
rendering mode is set to transparent in the Alter Surfaces or
Alter Contours menus. In my (subjective) opinion, transparent
surfaces look better if you turn off the fog material property by
setting the Fog start and Fog end parameters to the same value.
- Ambient: The ambient contributions to the material
affect the appearance and are independent of the orientation and
position of any light sources.
- Emission: Emissive light properties make the object
appear to ``glow'' with the specified color.
- Specular: The specular property is loosely equivalent
to the shininess of the surface. To make a surface appear shiny,
set the RGB components to 1.0 (or some other color). The size of
the specular highlights is controlled by the Shininess
- Diffuse: The major contributors to the color of an
object are the diffuse components. For most objects it's the
diffuse component that's set by the coloring commands. The
diffuse parameters controls are only visible for backface
material, where they may be used to alter the color of the back
face of objects.
Users may also set the light parameters, as described in detail in the
OpenGL Programming Guide . Even though a detailed
explanation of the lighting parameters is beyond the scope of this manual,
the brief explanation of the material properties for the Material Editor
(§6.11.4) also applies to the light properties.
The second light's (Light 1's) position may be placed under mouse control
using this Graphics Mouse Binding menu option. Initially,
the second light's position is also assumed to be infinitely distant, so
only it's direction is important. The light position is assumed to ride
on a sphere centered at the origin of rotation, and moving the mouse left
and right or up and down changes the position of the light accordingly. A
yellow sphere (the ``sun'') moves around to indicate the light position.
The sun is also visible if the Light 1 editor is displayed.
Users may use the Distance control of the Light 1 editor to alter the
distance to the second light source. As stated above, initially the
second light source is treated as an infinite light source which
simplifies (and thus speeds) the lighting calculations. However, setting
the distance control to a value of other than +1 or -1 changes the
interpretation of the light position. The distance value is the distance
from the center of rotation expressed as a fraction of the distance to the
front or rear clipping plane, and so the light's coordinates are
calculated to lie at the specified distance from the origin of rotation
along the current direction vector. Setting the distance to 0.0 will
place the light source at the center of rotation, and negative distances
will backlight the scene. Using the clipping tool's (§6.11.4)
top view may aid in positioning the light in 3D coordinates. Using a
local light model like this may have a better appearance, but there is an
associated performance penalty.
This submenu controls the representation of the back face of polygons.
Normally, the back face of all polygons is rendered with the currently
defined backface material as controlled by the material editor (§
6.11.4), usually an amorphous gray color. This is what
you'll usually see if you clip into a 3D contour or surface, for example,
so that the inside is exposed. Occasionally, users may wish for the
inside surface of an object to be rendered in the same color as the
outside surface. Toggling on the appropriate option here will accomplish
this. Note that selecting the ``Thin Ribbon'' worm drawing style
automatically sets this option for worms, but it can be turned back off,
resulting in thin ribbon worms that have different colors on the two
sides. Also note that only the color property is shared between front and
back faces when this option is selected. If you've defined some special
material properties for the front face of an object, (such as specularity)
it will not be applied to the back face, unless that property is set for
the backface material as well via the Material Editor (§
This option puts up a dialog box with buttons which act as fake dials.
Each button is labeled with its function. These buttons are sensitive to
the mouse position within the button. Pressing on the right side of the
button increases the parameter, and pressing on the left side decreases
the parameter (or applies a positive or negative rotation, respectively).
Button presses far from the middle of the button (in the horizontal
dimension) have a greater effect than button pushes closer to the middle.
Unlike most buttons, the fake dials are activated on the button push
rather than the button release. The fake dial buttons also have an
auto-repeat feature, where if you hold the button down, the command is
repeated. If you move the mouse while holding the button down, the
parameter will increase or decrease according the the current mouse
position. Note that there are separate dials for controling the world
rotations and translations, and for controling subset
rotations/translations. In order for subset rotations/translations to
work, you must have created a subset with the subset menu (or the
subdef= command), and attached motion to that subset with the
Subset->Attach motion menu (§6.8).
Besides world and subset rotations, there are dials for altering the
stereo twist and separation (§6.11.3, §
6.11.3), and for altering the slab thickness.
This menu allow users to set what parameter each dial controls. It is
intended to allow users familiar with the dial layout of some other
program to configure spock to use the same layout. The use of the dial
box is described in §4.4. To use these options, first
select a dial, and then select the parameter you wish for that dial to
control from the pop-up menu. The current dial bindings will be printed
when you select a dial. Note that changes here will also affect the fake
dial box. After you've set the dial layout you want, you may wish to copy
the add the appropriate commands from the current .spockhist file to
your .spockrc file.
Note that there are more than eight possibilities for dial functions, but
only 8 dials in the standard dial box. The only the first 8 dial options
are configurable via this menu, and these 8 functions are mapped onto the
Tue Sep 14 16:44:48 CDT 1999