Molecular modeling applications place a great emphasis on the performance of the workstations graphics subsystem, and Chimera is no exception. Rather than implement a high-performance graphics library from scratch, we chose OpenGL [5], a cross-platform graphics library originally developed by SGI. Chimera supports a number of different methods for displaying molecular structures. Molecular structures are effectively graphs with nodes (atomic positions) and edges (bonds between atoms). Unlike many typical graphs, molecular structures typically occupy 3 dimensions. The default representation is a wireframe model, using OpenGL's line primitive. Chimera can also draw the structure using tubes to represent the bonds, and spheres to represent the atoms. More sophisticated representations include molecular surfaces and volumes. Tubes, spheres, and surfaces are decomposed to triangles. Volumes can be visualized as isocontour surfaces or as true 3D volumes. OpenGL handles line and triangle primitives very efficiently. Recent extensions to OpenGL have added an interface for representing volumes using 3D textures.
The Chimera graphical system is uncoupled from the molecular object management system. Graphical objects are stored in display lists (retained graphical primitives), and the display lists are only rebuilt when the underlying molecular data changes. For example, if the model is rotated but the atom colors are not changed, no molecular data changes (only the viewing transform) and so the display list does not need to be rebuilt. This allows to near-maximal performance from 3D graphics cards, which typically store display lists in card RAM compact form, ready to be written to the graphics pipeline with minimal processing.