Skip to content


In SAMSON, you can colorize visual models, meshes, labels, and structural nodes (residues, atoms, etc.) using various color schemes. Color schemes may be used to e.g. assign a constant color to a node, colorize atoms by residue, chain, etc, or based on some node property (e.g., temperature factor, side chain charge, etc.). You can apply different color schemes to different nodes.

A color scheme is applied to a node via a material which contains not only a color scheme but also other appearance options such as metallic, roughness, transmission, etc. When a color scheme or, more generally, a material is applied to a node, all the node's descendants are affected.

You can try the following interactive tutorial in SAMSON (Help > Tutorials): "Visualization: visual models and colorization".

What you will learn from this tutorial:

What is not covered in this tutorial:

For how to move apply various visualizations, please, refer to the Visualizing section.

Color schemes#

SAMSON provides the following color schemes:

  • Constant: applies a constant color.
  • Constant illustrative: applies a constant color (illustrative). It helps to depict molecules in a style similar to David S. Goodsell's artwork.
  • CPK: the classic Corey-Pauling-Koltun color scheme. This is the default color scheme for structural nodes.
  • Per attribute: the color is determined based on a structural node attribute. The following per-attribute color scheme are available:

  • Chain - colorizes per chain ID.

  • Chain (illustrative) - colorizes per chain ID in a style similar to David S. Goodsell's artwork.
  • Formal charge - colorizes based on formal charges of atoms.
  • Occupancy - colorizes based on atom occupancies.
  • Partial charge - colorizes based on partial charges of atoms.
  • Temperature factor - colorizes based on temperature factor of atoms.
  • Residue index - colorizes based on the residue id.
  • Residue type - colorizes based on the residue type.
  • Secondary structure type - colorizes based on the residues' secondary structure.
  • Side chain charge - colorizes residues based on their standard side chain charge.
  • Side chain polarity - colorizes residues based on their standard side chain polarity.
  • Custom... - choose a per attribute color scheme and a color palette.

The per attribute color schemes colorize using their default color palette, which you can change using the Inspector or by colorizing using Custom....

You can see some of the default per-attribute color schemes on the image below.

Some of the default per-attribute color schemes

Applying color schemes#

Color schemes can be applied to selected nodes in several ways:

In the example below, we apply different color schemes to the Ribbons visual model using the above-mentioned ways.

Applying different color scheme to a visual model

Open a molecule, e.g. download a protein from RCSB PDB using Home > File > Fetch. Select a structural model in the Document view and apply a constant color scheme via its context toolbar as shown in the image below or via the Visualization > Color.

Applying color schemes

A dialog will appear in which you can choose the color.

Choosing the color for a constant color scheme

As a result, all the chosen nodes will be colorized with the same color.

Constant color scheme


You can always undo operations by clicking Ctrl/Cmd + Z (see history).

You can see which nodes have materials in the Document view - it is indicated with the material icon as shown in the image below:

The material icon in the Document view indicates which node has a material

Now, select a structural model and apply a per attribute color scheme, e.g. the "Residue hydrophobicity" color scheme in case you have a protein selected. For that, go to the Visualization > Color > Per attribute > Residue hydrophobicity as shown in the image below or use the context toolbar.

Set color based on an attribute

As a result, all residues will be colorized according to their hydrophobicity.

Colorization according to the residue hydrophobicity

To reset the colorization to the default one, select the node and in the context toolbar select Color > Reset color as shown in the image below or go to Visualization > Color > Reset color.

If you want to reset the colorization, then select the node and, either in the toolbar menu or in the Visualization menu, click on Color > Reset color, or simply clear it via the Inspector.

Reset the colorization by removing material using the toolbar

Color palettes#

Each per attribute color scheme has its own default color palette. You can modify it using the Inspector, or you can colorize using Color > Custom.... The later one opens a dialog window in which you can choose which color scheme to apply and what color palette to use.

Colorizing with a custom color palette

A color palette defines how the colors change depending on the value to which the color scheme is associated. In SAMSON, the following color palette types are available:

See the tables of default HCL color palettes available in SAMSON with their color bars.

The HCL color space is better suited for human perception - you can directly control the color (hue), the "colorness" (chroma) and the luminance (brightness). SAMSON provides by default most of the HCL color palettes available in R and Python. See for more information on the advantages of the HCL color space.

If you want to see how your system looks like with color palettes while switching between them, then, at the bottom of the color palette window check the "Auto update" option or click the Update button. Please note that it might be slow for big systems.

You can also create your own color palettes in the HCL color space by copying the parameters from the existing one, checking the "Custom palette" option, and modifying it. You can save your color palette as a new one for later use - it will be stored in your local SAMSON configurations. You can also revert left and right arms of color palettes in the color palette or color scheme dialogs.

Creating a color palette

Changing materials in the Inspector#

Prerequisites: Please refer to the Inspecting section to learn how to inspect nodes in SAMSON.

You can view and modify materials applied to nodes in the Inspector.

Materials in the Inspector

You can add a material from the Inspector as follows:

Add material in the Inspector

You can modify the reset the color scheme and choose another one:

Reset color scheme in the Inspector

For a constant color scheme you can modify its color, and for a per-attribute color scheme you can modify its color palette by clicking on the color bar:

Change color palette in the Inspector

For per-attribute color schemes, you can also modify their range by altering the min and max values. This might be useful when you would like to have a specific range for colorization based on, for example, the temperature factor.

You can apply an appearance preset for a material in the Inspector:

Apply an appearance preset to a material in the Inspector