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 menu > Tutorials): "Visualization: visual models and colorization".
What you will learn from this tutorial
From this tutorial, you will learn:
What is not covered in this tutorial
For how to move apply various visualizations, please, refer to the Visualizing section.
SAMSON provides the following color schemes:
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.
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.
Open a molecule, e.g. download a protein from RCSB PDB using Home menu > 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 menu > Material.
A dialog will appear in which you can choose the color.
As a result, all the chosen nodes will be colorized with the same color.
Note: 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
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 menu > Material > Per attribute > Residue hydrophobicity as shown in the image below or use the context toolbar.
As a result, all residues will be colorized according to their hydrophobicity.
To reset the colorization to the default one, select the node and in the context toolbar select Material > None as shown in the image below or go to Visualization menu > Material > None.
If you want to reset the colorization, then select the node and, either in the toolbar menu or in the Visualization menu, click on Material > None, or simply clear it via the Inspector.
Each per attribute color scheme has its own default color palette. You can modify it using the Inspector, or you can colorize using Material > Custom.... The later one opens a dialog window in which you can choose which color scheme to apply and what color palette to use.
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 https://hclwizard.org/why-hcl/ 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.
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.
You can add a material from the inspector as follows:
You can modify the reset the color scheme and choose another one:
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:
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: