ChimeraX docs icon

Command: graphics

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-spec
Set 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 driververbose  true | false ]
Report system graphics (OpenGL) information to the Log in terse (default) or verbose fashion.
graphics qualityquality ] [ atomTriangles  Na | default ] [ bondTriangles  Nb | default ] [ totalAtomTriangles  maxa ] [ totalBondTriangles  maxb ] [ ribbonDivisions  divisions | default ] [ ribbonSides  sides ] [ 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.

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 values can be specified with the individual options:

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, 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 rate [ true | false ] [ maxFrameRate  N ] [ waitForVsync  true | false ]

Setting 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.

graphics restart
Reinitiate graphics drawing after an error.
graphics selectioncolor  color-spec ] [ width  linewidth ]
Set selection outline color (initial default lime
) 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.
graphics silhouettes [ true | false ] [ color  color-spec ] [ width  linewidth ] [ depthJump  depth ]
Setting graphics silhouettes true or false specifies whether to show silhouettes, outlines that emphasize borders and discontinuities. Additional options: Given without options, graphics silhouettes reports the current settings in the Log.
graphics triangles  model-spec
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.

UCSF Resource for Biocomputing, Visualization, and Informatics / April 2020