Applied
Crystallography
ISSN 0021-8898
POVScript+
: a program for model and data visualization using
persistence of vision ray-tracing
T. D. Fenn, D. Ringe and G. A. Petsko
Copyright © International Union of Crystallography
Author(s) of this paper may load this reprint on their own web site provided that this cover page is retained. Republication of this article or its storage in electronic databases or the like is not permitted without prior permission in writing from the IUCr.
Journal of Applied Crystallography ISSN 0021-8898 Received 24 October 2002 Accepted 24 March 2003
#2003 International Union of Crystallography Printed in Great Britain ± all rights reserved
POVScript+
: a program for model and data
visualization using persistence of vision ray-tracing
T. D. Fenn,* D. Ringe and G. A. PetskoDepartment of Biochemistry and Chemistry, Rosenstiel Basic Medical Sciences Research Center, Brandeis University, Waltham, MA 02454, USA. Correspondence e-mail: [email protected]
Macromolecular visualization is hampered by the fragmented set of available programs and the lack of cooperativity among them. The amount of visual information required for robust structural analysis is relatively dif®cult to generate and rarely allows further high-quality three-dimensional graphic rendering. Here, a modi®cation ofMolScript[Kraulis (1991).J. Appl. Cryst.24, 946±950] is presented which contains the capability of the originalMolScript, the ability to carry out a majority of the options available in most other crystallographic visualization packages, as well as several new features of its own. POVScript+ (currently version 1.62) allows anisotropic displacement ellipsoid rendering (read in as a second-rank tensor from a PDB ®le), electron-density polygonization (in several formats derived from a `marching tetrahedra' approach), volumetric rendering of electron density and GRASP/MSMS
surface-map input/output. Finally,POVRayoutput is supported (viaa modi®ed
version of PovScript) to generate high-quality renderings that are easily
modi®ed for any of a number of purposes (e.g.animations or altered textures).
POVScript+provides a marked increase in the amount of structural and atomic detail possible, while still allowing a straightforward means of generating this information.
1. Introduction
A critical aspect of experimental data analysis is to develop and visualize a model that is most consistent with the observed data. This is particularly true in macromolecular crystallography, in that model
versus data comparisons are made at almost every step in the experimental procedure. Frequently, the ®nal model represents the culmination of these efforts but is presented in a fashion that leaves much of the atomic information (a majority of which is directly derived from the re®nement processes) hidden and illustrates the experimental data as a polygonized version of its true three-dimen-sional form.
Early efforts to visualize protein models and experimental data (expressed as electron density) were largely limited by the ability of the underlying computer hardware (Barry & McAlister, 1982). Atoms were typically viewed as point objects, while the experimental data were expressed as an extracted isosurface using a primitive (yet effective) contouring algorithm (Diamond, 1982). Current crystal-lographic software still largely utilizes these same methods, resulting in simpli®ed views of potentially complex models and multi-dimensional data. While software packages have evolved to over-come some of these problems, most only tackle one aspect of the visualization process [e.g. anisotropic atomic displacements, as implemented inORTEPIII (Burnett & Johnson, 1996)].
Generation of a molecular surface and its inherent properties (e.g.
a solvent-excluded surface) based on the protein model is supported by a number of current visualization programs (Nichollset al., 1991; Sanneret al., 1996). These surfaces can map key molecular properties onto the structural model, and therefore the inclusion of the respective surface alongside the model and experimental data may
provide additional information. However, the majority of current graphics software packages lack such a feature.
POVScript+is a modi®ed version ofMolScriptthat allows the user to illustrate as much of the atomic model and experimental data as required for structural analysis and presentation (Kraulis, 1991; Fenn, 2002). For example, atomic displacements (either isotropic or aniso-tropic), rather than point atoms or van der Waals radii, can be used to illustrate atom positions. Molecular maps generated from structural models, in either GRASP or MSMS format, are supported in order to illustrate signi®cant surface properties (Nichollset al., 1991; Sanneret al., 1996). Additionally, electron density maps can be contoured as a polygonized version of the parent scalar ®eld or as voxellated volu-metric media. The latter of these views does not require simpli®cation (in terms of isosurface extraction) of the electron density maps, and in combination with the atomic properties inherent in the model, allows for a more informative descriptor (in terms of visualization) of the crystallographic experiment and model.
2.POVScript+features
All of thePOVScript+features have been incorporated into the most current version of MolScript (version 2.1.2) (Kraulis, 1991). The reason for this implementation is availability of source code, the relatively small size of the program (allowing suf®cient ease for code modi®cation) and the robustness provided by the recursive, context-free grammar syntax ofMolScript[parsed through the Bison inter-preter (Free Software Foundation, 1998)]. The code modi®cations are available as a set of.diff®les for use with the patch utility against the originalMolScriptsource code (Fenn, 2002). This not only allows
for simple application against the source code, but also gives the user the ability to modify the program further or generate the binary for any of a number of computer architectures if desired.
2.1. Electron density
The most commonly implemented algorithm for isosurface extraction from a scalar ®eld in crystallographic software is that of R. Diamond (Diamond, 1982), the basic outline of which involves initiation of a `search path', which progresses through the scalar ®eld until a contour is encountered. From one of the points either before or after the contour, a `chase path' is then followed, switching between left and right turns each time a contour is encountered. This continues until a closed path is formed, and the gathered contours are then drawn. This process can be extrapolated to each of the three dimensions de®ned by the electron density (see Fig. 1a). As the algorithm only works in two dimensions at a time, any contour lying between two (three-dimensional) points that do not share a common coordinate (e.g.a diagonal) is missed, resulting in incorrect isosur-faces. Also, the algorithm is dif®cult to implement easily and does not allow higher level data structures, as there is no consistently imple-mented polygon type. Programs such asCONSCRIPTandRibbons
have avoided this problem by implementing a `marching cubes' approach, which carries out cell triangulation along the regularly ordered scalar ®eld (Lorensen & Cline, 1987; Carson, 1997; Lawrence & Bourke, 2000). However, setbacks to this algorithm include the introduction of topological inconsistencies in certain cases and the necessity to test a large number of possibilities in order to properly polygonize the cell (Bajaj et al., 1999). Therefore, the solution implemented in POVScript+ is that of a `marching tetrahedra' approach (Doi & Koide, 1991; Gueziec & Hummel, 1995; Bourke, 1997). In this case, a three-dimensional cell of data is split into six tetrahedra and interpolated in the case of a contour. While the result is consistent, it is not necessarily correct (a complication which derives from the underlying symmetry of the Bravais lattice) (Zhouet al., 1995). Solutions to this problem include cubic diagonal inter-polation (rather than linear edge interinter-polation) or application of the marching tetrahedra algorithm to body-centered cubic lattices such that all the resulting tetrahedra are not subjected to possible varia-tions in the inherent lattice symmetry (Zhou et al., 1995; Chan & Scopigno, 1998). The latter of these solutions is used in the latest version of POVScript+. Additionally, the resulting triangular mesh
tends to generate an unnecessarily large number of polygons (compare Figs. 1a and 1b). This number can be reduced by mesh simpli®cation, a technique which can be accomplished through a variety of methods (Cignoniet al., 1998). The current version of
POVScript+uses a simpli®ed Rossignac and Borrel vertex-clustering algorithm (Rossignac & Borrel, 1993) in which vertices near voxel gridpoints are averaged (Fig. 1c). This process is typically rather fast and can lead to a reduction by as much as 40±50% in the number of required polygons, but may result in topological inconsistencies and is limited by the speci®ed grid dimensions. Future development of
POVScript+ will focus on implementation of either quadric error metrics (Garland & Heckbert, 1997) or a regularized `marching tetrahedra' approach (Treeceet al., 1999) in order to reduce further the number of required polygons while preserving surface details.
While polygonization is a common method for visualizing contours in scalar ®elds, it is also possible to render the scalar values directly in a volumetric fashion. This method of rendering allows for a more `natural' (and informative) representation of a three-dimensional scalar ®eld, as all of the scalars are used in the visualization process. As an example, color can be varied across a lower and upper bound of scalar values, yielding a continuous `cloud' that encompasses the desired region of three-dimensional space. This can yield additional information about the underlying model and/or data (in the case of macromolecular crystallography) that is lost in polygonization (Fig. 2). However, such methods typically require some form of ray-casting in order properly to view a two-dimensional projection of the three-dimensional property. Fortunately, POVRay (see below) allows native support of such volumes (as was done to generate Fig. 2), and this form of viewing is supported in the current version of
POVScript+.
2.2. Atomic displacements
Medium- to high-resolution (>3.0 AÊ) crystallographic re®nement typically involves some form of temperature factor re®nement, which is an attempt to describe the dynamic or static displacements of atoms in a crystal. Although these parameters can be linked to structural and functional imperatives (Wilson & BruÈnger, 2000), they tend to be overlooked in the visualization process, primarily due to a lack of such a feature in many crystallographic packages. By default,
POVScript+renders atoms based on their atomic displacements. This is carried out according to the mathematics of thermal-motion ellipsoids (including the special case of isotropic disorder), as based on either the variance-covariance tensor orUeqfrom a coordinate ®le (Burnett & Johnson, 1996; Merritt, 1999; Truebloodet al., 1996). The information carried in this tensor can be viewed according to the principal axes of disorder, as an isoprobability ellipsoid, or a combination of these. With most three-dimensional viewing libraries/ programs (including OpenGL andPOVRay), these transformations are easily implemented (see Fig. 3 for one such example).
2.3. Molecular surfaces
Interactions of the derived protein model with solvent are typically assessed through analysis of either a solvent-accessible or molecular surface (Nicholls et al., 1991; Sanner et al., 1996; Lee & Richards, 1971; Connolly & Olson, 1983). These alone provide useful infor-mation regarding macromolecular interactions, but the surfaces also represent a template for mapping properties such as electrostatic potential, hydrophobicity and so on. This is typically done by coloring the vertices of the polygons that form the surface with a given color map. While generation of these surfaces is not supported by
POVScript+, it is possible to import surfaces generated in either Figure 1
Three scalar ®eld isosurface extraction algorithms. (a) Canonical algorithm for isosurface extraction based on the Diamond algorithm (Diamond, 1982). (b) Body-centered `marching tetrahedra' approach to polygonization. Although consistent in polygon type, the number of polygons generated is high. (c) Mesh simpli®cation using a modi®ed vertex clustering algorithm (Rossignac & Borrel, 1993). Surface generation times on an AMD 1400 MHz processor for the three ®gures were 0.056, 0.549 and 0.417 s, respectively.
Figure 3
Anisotropic thermal disorder in Ca2+-bound calmodulin (PDB ID 1EXR),
illustrating the role of atomic disorder in protein function (Wilson & BruÈnger, 2000). Ca2+ions are rendered in gold and all other atoms are rendered according to
atom type.
Figure 4
Stereo view of the calmodulin Ca2+binding site. The Ca2+(rendered in gold) clearly
shows octahedral coordination, and the atoms involved display harmonic disorder (Wilson & BruÈnger, 2000). Additionally, the electron density covering the two amino acid side chains illustrates the implementation of triangles derived from the `marching tetrahedra' algorithm as an isosurface rather than as a mesh. Surface generation time on an AMD 1400 MHz processor was 0.904 s.
Figure 2
Result of volume rendering of the scalar ®eld, starting at green (1map r.m.s.) then increasing to red (6.7map r.m.s.). In all ®gures, atoms and principal axes are shown at the 50% isoprobability level. This view allows side-chain disorder to be directly observed, supporting the multiple histidine conformers placed in this density.
Figure 5
Merged CPK representation of calmodulin. In this case, the atoms are colored according toUeqvalues [ranging from blue (Ueq4 AÊ2) to red (Ueq25 AÊ2)], again
GRASP or MSMS format, including the desired colormaps for various macromolecular properties (Nichollset al., 1991; Sanneret al., 1996). These surfaces can be modi®ed/viewed in any of a number of fashions, including illustration over speci®c regions of the model (data not shown).
2.4.POVRaysupport
Persistence of Vision Raytracing(POVRay) support inMolScript
was initially added throughPovScript(Peisach, 2002).POVScript+
uses most of the features ofPovScriptwith the addition of support for the capabilities mentioned here. While other ray-tracing engines (primarily designed for molecular graphics) exist [e.g. Raster3D
(Merritt & Murphy, 1994; Merritt & Bacon, 1997)],POVRay incor-porates a vast number of features through a free and easily modi®ed tool, thereby presenting an ideal interface for macromolecular visualization (POV-Team, 2002). Although POVRay is not inter-active, the POVScript+ OpenGL interface (mostly based on the originalMolScript) allows previews of most of the provided graphics features, and any manipulation performed in the OpenGL mode can be saved and transmitted to the POVRay engine in a seamless manner. The POVRay input ®le generated by POVScript+ is in ASCII format, thereby allowing any one of a number of further user modi®cations (see Fig. 4 for an example).
2.5. Miscellaneous features
In addition to the features described above,POVScript+includes some features lacking inMolScript2.1.2. For example, nucleic acids and 5±6-membered ring containing amino acids can be `®lled' in order to emphasize ring/base stacking (not shown, but examples are available at http://www.brandeis.edu/~fenn/povscript). Further, CPK atoms can be merged through the use of the `blob' feature in
POVRay(which generates an isosurface based on quartic equations for each CPK atom). This feature generates a pseudo-molecular surface appearance, to which anyMolScriptcoloring scheme can be applied (Fig. 5). Finally, scalar ®eld simpli®cation is also possible by marching along the grid at coarser intervals. All of these features, including those mentioned above, are described (with examples) at http://www.brandeis.edu/~fenn/povscript. Download and installation information are also available at this address.
3. Conclusions
Advances in computing power (both in terms of hardware and soft-ware) have mitigated the dif®culty involved in generation and display of complex views of protein models and crystallographic data.
POVScript+ is designed to utilize these capabilities (rather than reinventing them) in order to convey the amount of atomic infor-mation typically required of macromolecular crystallography, with the hopes of scaling such efforts to a more interactive (i.e. model building) environment. With this amount of information in hand, the crystallographic data and its effect on the re®nement process is emphasized, supplanting the information from traditional ball-and-stick models.
The authors thank Mark Wilson for helpful discussions and critical readings of the manuscript, as well as permission to use his
calmo-dulin structural data as a test example. David Cooper provided many helpful program suggestions and abetted debugging. We also thank Ezra Peisach for the R. Diamond algorithm implementation in
MolScript, as well as PovScriptupdates forMolScriptversion 2.1.2.
POVScript+has implemented code from and therefore offers thanks to: Per Kraulis (originalMolScriptauthor), Paul Bourke (`marching tetrahedra' algorithm), Dan Peisach and Eric Fontano (original
PovScript implementation) and Nicolas Calimet (GRASP input/ output code).
References
Bajaj, C. L., Pascucci, V. & Schikore, D. R. (1999).Seed Sets and Search Structures for Optimal Isocountour Extraction. Technical Report 99-35. TICAM.
Barry, C. D. & McAlister, J. P. (1982).Computational Crystallography, edited by D. Sayre, pp. 274±293. New York: Oxford University Press.
Bourke, P. (1997). http://astronomy.swin.edu.au/~pbourke/modelling/poly-tetra.
Burnett, M. N. & Johnson, C. K. (1996).ORTEP-III: Oak Ridge Thermal Ellipsoid Plot Program for Crystal Structure Illustrations, Oak Ridge National Laboratory Report ORNL-6895.
Carson, M. (1997).Methods in Enzymology: Macromolecular Crystallography, Vol. 277, edited by C. W. Carter Jr & R. M. Sweet, pp. 493±505. San Diego: Academic Press.
Chan, S. L. & Scopigno, R. (1998).Comput. Graph.22, 83±90.
Cignoni, P., Montani, C. & Scopigno, R. (1998).Comput. Graph.22, 37±54. Connolly, M. L. & Olson, A. J. (1983).Science,221, 709±713.
Diamond, R. (1982).Computational Crystallography, edited by D. Sayre, pp. 267±272. New York: Oxford University Press.
Doi, A. & Koide, A. (1991).IEICE Trans. Commun. Electron. Info. Syst. E,74, 214±224.
Fenn, T. D. (2002). http://www.brandeis.edu/~fenn/povscript.
Free Software Foundation (1998). http://www.gnu.org/software/bison/ bison.html.
Garland, M. & Heckbert, P. S. (1997).Comput. Graph.31(Annual Conference Series), 209±216.
Gueziec, A. & Hummel, R. (1995).IEEE Trans. Visual. Comput. Graph.1, 328±342.
Kraulis, P. J. (1991).J. Appl. Cryst.24, 946±950.
Lawrence, M. C. & Bourke, P. (2000).J. Appl. Cryst.33, 990±991. Lee, B. & Richards, F. M. (1971).J. Mol. Biol.55, 379±400.
Lorensen, W. E. & Cline, H. E. (1987). SIGGRAPH 1987 Conference Proceedings, edited by M. C. Stone, Vol. 21, pp. 163±169. New York: ACM Press.
Merritt, E. A. (1999).Acta Cryst.D55, 1109±1117.
Merritt, E. A. & Bacon, D. J. (1997).Methods in Enzymology: Macromolecular Crystallography, Vol. 277, edited by C. W Carter Jr & R. M. Sweet, pp. 505± 524. San Diego: Academic Press.
Merritt, E. A. & Murphy, M. E. P. (1994).Acta Cryst.D50, 869±873. Nicholls, A., Sharp, K. A. & Honig, B. (1991).Proteins Struct. Funct. Genetics,
11, 281±296.
Peisach, D. (2002). http://dipsy.biochem.med.umich.edu/~peisach/povscript. POV-Team (2002). http://www.povray.org.
Rossignac, J. R. & Borrel, P. (1993). Geometric Modeling in Computer Graphics, edited by B. Falcidieno & T. L. Kunii, pp. 455±465. Genova, Italy: Springer-Verlag. Also published as Technical Report RC 17697 (#77951), IBM, Research Division, T. J. Watson Research Center, 1992.
Sanner, M. F., Olson, A. J. & Spehner, J. C. (1996).Biopolymers,38, 305±320. Treece, G. M., Prager, R. W. & Gee, A. H. (1999).Comput. Graph.23, 583±598. Trueblood, K. N., BuÈrgi, H. B., Burzlaff, H., Dunitz, J. D., Gramaccioli, C. M., Schulz, H. H., Shmueli, U. & Abrahams, S. C. (1996).Acta Cryst.A52, 770± 781.
Wilson, M. A. & BruÈnger, A. T. (2000).J. Mol. Biol.301, 1237±1256. Zhou, Y., Chen, W. & Tang, Z. (1995).Comput. Graph.19, 355±364.