International
Tables for
Crystallography
Volume F
Crystallography of biological macromolecules
Edited by M. G. Rossmann and E. Arnold

International Tables for Crystallography (2006). Vol. F, ch. 25.2, p. 726

Section 25.2.7.4. Output

P. J. Kraulisr*

25.2.7.4. Output

| top | pdf |

The current implementation of the MolScript source code makes it possible to add new output formats. The intention is that all output formats should produce visually identical images given the same input. Unfortunately, this goal is hard to achieve due to various technical issues, such as the different formalisms used to describe lighting and material properties.

25.2.7.4.1. PostScript

| top | pdf |

PostScript (Adobe Systems Inc., 1985[link]) is a page description language for controlling high-quality printers. More information can be found at the Adobe Inc. web site, http://www.adobe.com/print/ .

The PostScript output mode relies on the painter's algorithm for hidden-surface removal. The most distant graphics segments are output first, continuing with the segments closer to the viewpoint, which may obliterate previously rendered segments. The implementation of this procedure is straightforward, and gives good results provided that the graphics objects are subdivided into sufficiently small segments. The PostScript mode allows more than one plot (image) to be rendered on a single page.

25.2.7.4.2. Raster3D

| top | pdf |

The Raster3D suite of programs (Merritt & Bacon, 1997[link]) produces high-quality images using a ray-tracing algorithm. MolScript can produce the input file required for the `render' program, which is the core program of the Raster3D suite. The web site for Raster3D is http://www.bmsc.washington.edu/raster3d/ .

The Raster3D mode features highlighting, transparency and shadows to produce MolScript images of very high visual quality.

25.2.7.4.3. VRML97

| top | pdf |

The VRML97 standard (Virtual Reality Modeling Language, formerly VRML 2.0) allows storage and transmission of 3D scenes in a system-independent manner over the web. Software to view VRML97 files is typically included in any modern web browser. A web site containing more information on VRML97 is http://www.web3d.org/x3d/specifications/vrml/ .

The VRML97 mode allows hyperlinking of objects. The MolScript implementation is optimized to produce output files that are as small as possible, but the file size is strongly dependent on the value of the `segments' parameter in the graphics state.

25.2.7.4.4. OpenGL

| top | pdf |

OpenGL is a standard API (Applications Programming Interface) for interactive 3D graphics. It is available on most current computer systems. For more information, see the web site http://www.opengl.org/ .

The OpenGL output mode allows a certain degree of interactivity, in contrast to the other output modes. It is possible to initiate execution of the MolScript program in OpenGL mode in one window on the screen, while keeping the script file in a separate text-editor window. The image is rotatable in 3D in the OpenGL window. The script can be edited in its window, and the modified script can be re-read and displayed directly by the MolScript program in its OpenGL window. This simplifies to some extent the iterative fine-tuning of the script.

25.2.7.4.5. Image files

| top | pdf |

Raster image files in several different formats can be created by MolScript. Currently these include SGI RGB, encapsulated PostScript (EPS), JPEG, PNG and GIF image formats. The JPEG, PNG and GIF formats require that external software libraries are available during the compilation and linking of the MolScript program. Software libraries for several of these image formats are available on the web; links are given at the official MolScript web site http://www.avatar.se/molscript/ .

The image file formats essentially capture the raster image created by the OpenGL implementation. The EPS format was a variant of the PostScript output mode in version 1 of MolScript, but for various reasons this has changed in version 2 to an encoding of the OpenGL raster image.

References

Adobe Systems Inc. (1985). PostScript language reference manual. Reading, MA: Addison-Wesley.Google Scholar
Merritt, E. A. & Bacon, D. J. (1997). Raster3D: photorealistic molecular graphics. Methods Enzymol. 277, 505–525.Google Scholar








































to end of page
to top of page