The graphics command sets graphical rendering parameters, with additional options detailed below:
Given without options, graphics reports the current background color in the Log. See also: set, preset, Graphics icons, making images
• graphics bgColor color-specSet background color. Any transparency in the color is ignored; however, images can be saved with a (completely) transparent background using the save command option transparentBackground true. Background color can also be changed with set bgColor.• graphics driver [ verbose true | false ]
Report system graphics (OpenGL) information to the Log in terse (default) or verbose fashion.• graphics quality [ quality ] [ atomTriangles Na | default ] [ bondTriangles Nb | default ] [ totalAtomTriangles maxa ] [ totalBondTriangles maxb ] [ bondSides sides | default ] [ pseudobondSides pbsides ] [ ribbonSides ribsides ] [ ribbonDivisions divisions | default ] [ colorDepth 8 | 16 ]
Control triangulation fineness and bits per color. Higher numbers of atom and bond triangles increase the smoothness of atomic displays, whereas higher numbers of ribbon divisions and sides increase the smoothness of ribbons (cartoons). The tradeoff for smoother displays is potentially slower rendering of very large structures.• graphics rate [ true | false ] [ maxFrameRate N ] [ waitForVsync true | false ]By default, triangulation fineness is adjusted automatically depending on how many atoms and bonds are displayed, within the ranges of 10-2000 triangles per atom and 24-160 per bond, up to maximum totals for atoms and bonds set with totalAtomTriangles and totalBondTriangles, respectively (initial default five million each, 5000000). The vr command temporarily lowers these limits on total triangles for faster rendering. Ribbon divisions per residue along the path of the ribbon are automatically set per structure within the range 2-20, using 20 for structures with <20,000 residues. (Ribbon sides are not adjusted automatically.)
Automatic adjustment can be tuned in either direction by changing the quality value, a scale factor applied to the individual parameters (initial default 1). For example, a quality setting of 2 gives twice as many atom triangles as quality 1, providing the total number does not exceed the limit. The quality can also be controlled with the command set subdivision.
Fixed integer values can be specified with the individual options:
- atomTriangles Na – triangles per atom (minimum 4; specifying 0 or default returns to automatic adjustment)
- bondTriangles Nb – triangles per bond (minimum 12; specifying 0 or default returns to automatic adjustment)
- bondSides sides – number of sides used to approximate a smooth cylinder for stick bonds; equivalent to specifying bondTriangles, except that sides = ¼Nb (minimum 3; specifying 0 or default returns to automatic adjustment)
- pseudobondSides pbsides – number of sides used to approximate a smooth cylinder for pseudobonds (initial default 10, minimum 3; not automatically adjusted)
- ribbonSides ribsides – number of sides used to approximate an oval or round cartoon cross-section (initial default 12, minimum 4; not automatically adjusted)
- ribbonDivisions divisions – divisions per residue lengthwise along the cartoon (initial default 20, minimum 2; specifying 0 or default returns to automatic adjustment)
Specifying a quality value returns to the automatic adjustment of atom triangles, bond triangles, and ribbon divisions. Fixed values can be specified subsequently, or even in the same command.
Given without options, graphics quality reports the current settings for quality, atom triangles, bond triangles, pseudobond sides, and ribbon divisions in the Log. Total numbers of triangles per model can be reported with graphics triangles. The number of ribbon sides and divisions can also be set or reported with cartoon style. For molecular surface subdivisions, see the gridSpacing option of surface.
The colorDepth option sets the number of bits used per color component (red, green, blue, and alpha) in offscreen framebuffers, with initial default 8. Switching to 16 bits causes all rendering to occur in an offscreen framebuffer and then get copied to the display, and may slow the frame rate by a factor of two or more. The 16-bit setting may improve the appearance of volume solid rendering if the color mode is also set to 16 bits, e.g., volume colorMode auto16.
• graphics restartSetting graphics rate true or false indicates whether to report the average frame rate each second in the status line (initial default false). Given without options, graphics rate reports the current maximum frame rate in the Log.
The maxFrameRate option sets the target frame rate in ChimeraX to Nf frames per second (initial default 60). The actual redraw rate may be lower than the target, depending on the rendering speed of the computer and the complexity of the scene.
The waitForVsync option indicates whether to synchronize drawing to the display vertical refresh rate, typically 60 Hz (initial default usually true, but depends on the graphics driver settings). Without synchronization, the frame rate can exceed the vertical refresh rate and the display can exhibit image tearing.
Reinitiate graphics drawing after an error.• graphics selection [ color color-spec ] [ width linewidth ]
Set selection outline color (initial default lime• graphics silhouettes [ true | false ] [ color color-spec ] [ width linewidth ] [ depthJump depth ]) and width in pixels (initial default is the system display scaling factor, typically 1, but 2 on high-DPI displays such as Apple Retina). Given without options, graphics selection reports the current settings in the Log.
Setting graphics silhouettes true or false specifies whether to show silhouettes, outlines that emphasize borders and discontinuities. Additional options:• graphics triangles model-specGiven without options, graphics silhouettes reports the current settings in the Log.
- color (initial default black
)
- width in pixels (initial default is the system display scaling factor, typically 1, but 2 on high-DPI displays such as Apple Retina)
- depthJump – change in depth needed to trigger drawing silhouettes, expressed as a fraction of the distance between the near and far clipping planes (initial default 0.03; changed to 0.01 by the flat lighting preset, restored to 0.03 by the other lighting presets)
Report in the Log the total number of triangles used to draw the specified model(s), with breakdowns per model and per representation type within a model. Triangulation fineness can be controlled with graphics quality.