When a Protein Looks Like a Rainbow: Color with a Purpose

A molecular model can contain far more information than its shape alone reveals. The challenge is making a useful feature—such as chain identity, residue type, or hydrophobicity—visible without turning the structure into a confusing patchwork. A deliberate color scheme can help you spot patterns; an unsuitable one can make those patterns harder to read.

In SAMSON, colorization is not only a surface-level setting. A color scheme is part of a material, which can also include appearance properties such as roughness and metallicity. Applying a material to a node affects its descendants, so coloring a structural model can affect the atoms and residues beneath it. Keep this hierarchy in mind when selecting what to color: choosing a parent node may change more of the scene than choosing an individual visual model.

Start with the question, not the palette

Before choosing colors, decide what you want the view to communicate. Are you distinguishing chains, showing a property that varies across residues, or simply choosing a consistent presentation color? The answer determines which scheme is appropriate.

  • For a consistent appearance: use Constant to assign one color. This is useful when the property itself is not the focus.
  • For atom identity: use Per element, also called CPK. This is SAMSON’s default scheme for structural nodes and colors atoms according to element type.
  • For categories: choose an attribute-based scheme such as Chain, Residue type, or Secondary structure type.
  • For a varying property: use a scheme such as Temperature factor, Occupancy, or Partial charge, when that information is available in the structure.

This distinction matters: a palette that works well for separating a few chains may not be the clearest choice for showing a gradual change in a numerical property. SAMSON provides per-attribute schemes with default palettes, and the Custom… option lets you choose both an attribute and a palette.

Apply color to the intended node

Select the node you want to affect in the Document view. You can then choose a color through the context toolbar, open Visualization > Color, or edit the material in the Inspector. For example, to show a residue property, select the structural model and choose the relevant per-attribute scheme. The documentation demonstrates coloring residues by hydrophobicity:

Residues colored according to hydrophobicity

If you only want to recolor a particular visual model, such as ribbons, select that model rather than its parent structural node. The same scheme can produce a different result depending on which node receives the material, because descendants are affected.

Make the mapping easier to interpret

A palette defines how colors correspond to values. SAMSON offers HSV palettes, discrete palettes, and HCL palettes, including qualitative, sequential, and diverging options. HCL is designed around perceptual dimensions—hue, chroma, and luminance—so palette changes can be judged in terms of brightness and colorfulness as well as hue.

When a color scale represents a numeric attribute, check its range instead of assuming the default minimum and maximum fit your question. In the Inspector, per-attribute materials let you edit the range. This can be helpful when focusing on a particular interval, for example when examining temperature factors. Record or otherwise keep track of the range when comparing views: changing it changes how values map to colors, so two images with different ranges may not be directly comparable.

The palette controls also include a Reverse option for swapping the left and right ends of a palette, plus a Color Vision Deficiency Emulator to preview how the palette may appear to viewers with certain color vision deficiencies. You can enable Auto update to preview palette changes on the structure as you make them, or use Update; live updates may be slow for large systems.

Color Vision Deficiency Emulator in the color palette window

Keep experiments reversible

Color is often exploratory: try a scheme, inspect the pattern, then change it. You can modify an existing material in the Inspector, switch its color scheme, adjust its palette, or remove the material to return to the default colorization. You can also undo an operation with Edit > Undo. If you want to preserve a useful palette, SAMSON lets you create a custom HCL palette and save it in your local configuration.

Changing a material's color palette in the Inspector

A useful final check is to ask whether someone seeing the view could explain what the colors mean. If not, simplify the scheme, make the attribute clear, or revisit the selected node and range. For more details, see the SAMSON colorizing documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.