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 qualitysubdivision  level ] [ atomTriangles  Na ] [ bondTriangles  Nb ] [ totalAtomTriangles  maxa ] [ totalBondTriangles  maxb ] [ ribbonDivisions  divisions ] [ ribbonSides  sides ] [ colorDepth  8 | 16 ]
Control triangulation fineness and bits per color. Normally, the fineness of atom and bond triangulation is adjusted automatically depending on the display contents (e.g., the number of atoms 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). By default, vr temporarily lowers the limits on total triangles for faster rendering.

Automatic adjustment can be tuned in either direction with the subdivision parameter (initial default 1), where higher values increase the apparent smoothness of stick, ball-and-stick, and sphere display styles by increasing the number of triangles used to draw them. At a given subdivision level, the fineness of triangulation is adjusted automatically depending on the display contents (e.g., the number of atoms displayed), within the range of 10-2000 triangles per atom and 24-160 per bond. Subdivision level can also be controlled with the command set subdivision.

As an alternative to automatic adjustment, the graphics command allows using fixed numbers of triangles per atom and bond:

Subsequent use of the subdivision option returns to automatic adjustment, overriding any fixed values. Given without options, graphics quality reports the current subdivision level, triangles per atom and bond, and ribbon divisions per residue 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 / October 2019