Coloring Renderers¶
The color of a Renderer is changed in the Color panel, which handles only the
Coloring part of the settings. This page tries the main Coloring types in turn,
using lysozyme (simple + ballstick + ribbon) and 1G59 (trace) from the
previous page (Adding, removing and configuring Renderers).
Screenshots planned
Screenshots showing the workflow will be added to this page.
1. Using the Color panel¶
Open the Explorer > Color panel in the left side panel (→ Side panels).
- Select the target Renderer at the top (selecting a Renderer in the scene tree also updates this)
- Select the Coloring type; the settings for that type appear below
For the list of types and their settings, see Coloring.
2. CPK — color by element¶
CPK assigns a color to each element, and is the standard choice for simple and ballstick.
- Select
lysozyme/ballstick1as the target - Select CPK as the Coloring type
- Change the color of C (carbon) to gray (for example,
#808080)
Only the carbon parts of the ballstick turn gray. For how to specify colors (color names, color codes, etc.), see Color syntax.
3. B-factor — gradient by value¶
B-factor changes the color continuously according to values such as the temperature factor.
- Select
lysozyme/simple1as the target (if you hid it, restore it with the eye icon) - Select B-factor as the Coloring type
The structure is painted with a gradient from low to high temperature factors. The colors at the lower and upper limits and the value range (Auto / Manual) can also be set.
4. Rainbow — rainbow from end to end¶
Rainbow changes the hue along the residue sequence.
- Select
1G59/trace1as the target - Select Rainbow as the Coloring type
- Switch the mode from whole molecule to per chain
In 1G59 the protein and the tRNA are separate chains, so each is painted with its own rainbow (the protein from the N-terminus to the C-terminus, the RNA from the 5' end to the 3' end).
5. Paint — color by pairs of selection and color¶
Paint offers the most freedom. Pairs of a "selection expression and a color" are listed as rows of a table, and the rows are evaluated from the top, with the color of the first matching row used for painting.
- Select
lysozyme/ribbon1as the target - Select Paint > Default as the Coloring type. A table appears containing the
standard secondary-structure coloring (four rows: sheet / helix / nucleic /
*) - Rewrite the table as the following three rows (in this order from the top)
| Selection expression | Example color |
|---|---|
helix |
light blue |
sheet |
green |
* |
whitish |
helix and sheet are predefined selections that represent secondary structure
(→ Selection expression syntax). The * (everything) row is at
the bottom, so only the coil regions, which are neither helix nor sheet, get this color.
Add a paint¶
Change the color of only the C-terminal helix (residues 119 to 129).
- Add a row at the top of the table
- Specify
A.119:129.*as the selection expression and red as the color
The C-terminal region turns red. Because this row is above the helix row, red
takes precedence in this range. Layering paints while keeping the row order in mind
is how Paint is used. Rows that are no longer needed can be deleted.
Presets are also available
In addition to the Default used above, the Paint submenu lists color schemes prepared as styles (Woody / Red, etc.). Applying a preset first and then rewriting its rows is also a quick approach.
Next steps¶
- Saving the camera and the scene — keep the viewpoint and working state
- Coloring / Color syntax
Verified against: CueMol3 2.3.13.523