OBJECTIVE: This is a short tutorial demonstrating how to save images from within spock, and how to use spock as a front-end for Molscript, Raster3D, and VRML.
Concepts introduced: Saving images (§6.1.2); The Molscript interface (§6.1.2); The Raster3D interface (§6.1.2); The VRML interface (§ 6.1.2). Start spock and load 1rnt.pdb, or your favorite protein. Turn on worms mode under the Display menu, and make sure the worm style is set to ``Secondary structure'' mode under the ``Alter worms'' menu. If you don't see a secondary structure type representation and you're using a protein other than 1rnt, you need to run a quick secondary structure calculation by choosing ``Modeling Calculate secondary structure''. Change the background color to sky blue by typing
Turn on Bonds under the Display menu, if they're not on, and then type
bc=d; bc=0,r=substrate; bc=i
This will draw the bonds for the substrate of 1rnt in the secondary bond mode (§5.2.1), which should be capped cylinders. Now choose an orientation and scale you like with the mouse. Finally, type
to color the worms according to their secondary structure type. Image files/PostScript: First we'll save few snapshots of the image we've produced. Choose ``File Save Image file''. A file selection box will pop up. At the top of this box is a menu bar with a ``Image format'' menu. You may choose your favorite image format here, or accept the default of RBG. Type in a file name, and press Ok. The image on screen is captured and saved to an external file. It's as easy as that. Note that the image is automatically antialiased, unless the antialias level has been set to 0 under the graphics menu (§ 6.11.2). For PostScript output there are a number of options on a special menu. See §6.1.2 for details on this menu.
Molscript: First we'll export this image to Molscript (§ 6.1.2. This is only useful if Molscript is installed on your system. Under the ``File Save'' menu, choose ``Molscript file''. Again, there's a menu at the top of the dialog box, called ``Molscript options''. Choose ``Preview'' from this menu. Now click ``Ok'' in the dialog box. Spock will call Molscript and a postscript previewer to show you the image that is produced. (If this doesn't work, have your system administrator verify that Molscript is in the default path, and check the value of $SP_PS_PREVIEWER in the system $SPOCK/Spockrc file.) Notice right away that although the orientation and structure of the spock session are present in the postscript version, the colors are not. This is a feature! If you wish to use spock's colors for any class of objects, choose the appropriate option from the ``Molscript Options'' menu. Let's try this for the worm colors. Choose Save Molscript again and toggle on the ``Worm colors'' option of the ``Export Colors'' menu. You can choose to export any or all spock colors in a similar manner. Further, spock bond and worm sizes if ``Export sizes'' is chosen. If you know of a faster way to produce a good-looking Molscript image, I want to know about it!
Note that if you want to make more modifications to the Molscript input file, you should turn off ``Preview'' in favor of ``File'' and supply a file name. This is a standard Molscript input file that you can tweak by hand to add any final touches.
Raster3D: We'll export the same image to Raster3D now (§ 6.1.2). On SGI hardware, this requires that ipaste and render be in your path, and that render be compiled to support sgi images. Choose ``File Save Raster3D''. Note that the Molscript options menu has been replaced with a Raster3D options menu in the file dialog. Again, set preview, and click ``Ok''. Depending on the complexity of your image, this may take a few minutes, but spock will call write a raster3d input file and call render to render it. If you have any special material properties (like transparency) that you wish raster3d to know about, you must choose the appropriate option under the ``Raster3D options'' menu.
VRML: Finally, we'll export the image to VRML, the virtual reality modeling language (§6.1.2). This is the coolest, because it allows WWW users to see your model, and manipulate it in three dimensions. Simply choose ``Save VRML'' from the file menu, provide a file name (the extension should usually be .wrl) and press Ok. Fire up a VRML browser (like Cosmo Player from SGI, included as a Netscape plug-in on O2 hardware) and look at the model you've created. The VRML 2.0 output even lets users interactively turn off parts of the model!