In this section, we will show how to use SAMSON's vusialization tools and rendering options.
In SAMSON you can hide from displaying in the viewport any group of atoms, chains, residues, molecules, and whole layers. When you hide a parent node its children nodes will be hidden as well, e.g. if you hide a residue then atoms in this residue will be hidden.
You can hide nodes from displaying in the viewport by selecting these nodes either in the viewport itself or in the document view. Also, you can hide/show nodes using Python Scripting.
Let's open a molecule, e.g. 1YRF provided in the Samples folder.
You can hide a node just by unchecking the box of this node in the document view. In the image below we hide the LEU 1 residue. You can show this node by checking the box.
To hide or show a set of nodes, select them in the document view or in the viewport, then right-click and in the context menu go to the Visibility section where you can change the visibility of the selection and of all nodes. In the image below we hide a a set of residues.
To save a picture you can capture the SAMSON's viewport by pressing F10. You can modify the capture preferences in the Preference panel (Interface menu > Preferences...), in the Interface / Captures section (see Captures preferences for more information).
In SAMSON, molecules (structural models) have a default visual representation, where atoms are represented as balls and bonds as sticks.
Let's open a molecule, e.g. 1YRF provided in the Samples folder.
In the Preferences panel, go to the Rendering / Structural models section:
Change the default atom radius and bond radius. If the Automatically test check box is checked, this immediately affects the default rendering of the structural model. For example, let's set the atom radius to 1A:
The background color of the viewport may be changed in the Rendering / Background section of the Preferences panel:
Four options are available:
Let's try to set a custom gradient background by choosing Custom and modifying the Custom top color and the Custom bottom color.
You can switch betwenn different backgrounds easily in the Visualization menu and in the bottom of the Viewport.
You can always return to the default SAMSON background color.
In SAMSON, lighting can be modified in the Rendering / Lightning section of the Preferences panel:
This section makes it possible to control the parameters of the two point lights that illuminate the document, as well as global parameters. Each light has the following parameters:
The first light is typically the main light, which is thus typically brighter than the second light (a “back light”).
Finally, three more parameters are global:
Try changing all parameters and see the impact on rendering (switch on the Automatically test check box in the bottom).
Let's modify the lights and global parameters to produce the following “flat” rendering. For that we set the light intensity for both first and second light to zero, the ambient light to 0.8, and the Fresnel power to zero.
In SAMSON, you can colorize structural nodes with a color scheme to modify the colors of atoms and bonds. Three types of color schemes are available:
When a color scheme is applied to a node, all the node’s descendants are affected. You can apply different color schemes to different nodes.
Let's open a molecule, e.g. 1YRF provided in the Samples folder. Select 1YRF in the document view, and first apply a constant color scheme: right-click and the Set color / Constant....
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.
Let's now colorize according to the temperature factor. Select 1YRF in the document view, and in the context menu select Set color / Per attribute / Temperature factor.
As a result, all atoms will be colorized according to their temperature factor.
To reset the color scheme, select the node and in the context menu select Set color / Reset to go back to the default color scheme.
In SAMSON, Visual models provide alternate visual representations of structural models, or even arbitrary shapes, that may be displayed in the viewport.
Important: when a new visual model is added to the document, it is applied to the current selection. If nothing is selected, it is applied to the whole document.
Let's open a molecule, e.g. 1YRF provided in the Samples folder, and apply a visual model to it. Deselect all or select 1YRF, and add a Secondary structure visual model to the document. Then hide the structural model:
Visual models may be added from the Visualization menu (Visualization > Visual model) or via Ctrl/ Cmd⌘ + Shift + V. A pop-up menu appears to choose the name of the visual model and its type. Choose the secondary structure visual model.
As a result, a new visual model will be added in the document. You can also hide the structural model by unchecking the box.
Provided they handle them, visual models can be colorized with color schemes. This is the case of the secondary structure visual model (when no color scheme is applied, a rainbow color scale is used, as in the picture above).
Select the visual model, and colorize it by the secondary structure type. You should obtain the following image:
You can apply several visual models at once. Try applying the Licorice visual model: select a molecule, click Ctrl/ Cmd⌘ + Shift + V, and select the Licorice visual model.
Several rendering effects may be applied from the Preferences panel.
Ambient occlusion improves the perception of depth in molecules, by simulating the fact that deeper regions are less accessible to light, and are thus darker.
Two types of ambient occlusion are handled in SAMSON:
The ambient occlusion settings may be changed in the Rendering / Ambient occlusion section of the Preferences panel:
The screen-space ambient occlusion can be switched on/off in one click in the Visualization menu.
Here is 1FFK without ambient occlusion:
And here is 1FFK with enabled screen-space ambient occlusion:
Anti-aliasing removes jagged edges from images, and may significantly improve rendering. The anti-aliasing settings may be changed in the Rendering / Ambient occlusion section of the Preferences panel. Fast Approximate Anti-Aliasing (FXAA) is typically very efficient, and can be activated on most recent graphics cards.
Note: Anti-aliasing requires more rendering from your GPU and therefore may slow-down the visualization for big systems.
Without anti-aliasing (multisampling factor set to 1, no FXAA), edges are very visible:
With FXAA and multisampling set to 2, edges are much smoother, and pixel boundaries are much less visible:
This effect simulates the depth-of-field effect produced by actual cameras (e.g. blurred distant objects). If enabled, when you zoom in the molecule its distant parts will be blurred. The depth-of-field settings may be changed in the Rendering / Depth-of-field section of the Preferences panel:
Turn the depth-of-field on, set the strength to 80 and zoom on a molecule.
The depth-of-field can be switched on/off in one click in the Visualization menu.
Basically, fog makes distant objects less visible. Fog attenuates distant parts by blending them progressively with the background. Turn it on to make it easier to focus on the foreground.
The near and far distances are based on the camera location and determine where the fog is enabled. Before the "near distance" there is no fog, after the "far distance" every node is invisible. The "strenght" parameter ingluences the speed at which the fog is appearing.
The fog settings may be changed in the Rendering / Fog section of the Preferences panel:
The fog can be switched on/off in one click in the Visualization menu.
Here is 1YRF again with both depth-of-field and fog:
Shadows are particularly helpful to improve the perception of relative positions.
Note: In case of an old graphics card you may want to either disable this option, or choose the lower preset.
The shadows settings may be changed in the Rendering / Shadows section of the Preferences panel:
The shadows can be switched on/off in one click in the Visualization menu.
Without shadows, it may be difficult to perceive the relative positions, e.g., of 1YRF to the graphene sheet behind it:
With shadows, however, this becomes much easier:
Silhouettes make it easier to separate regions with different depths. The silhouettes settings may be changed in the Rendering / Silhouettes section of the Preferences panel.
The silhouettes can be switched on/off in one click in the Visualization menu.
Let's create the secondary structure visual model for 1YRF molecule and enable silhouettes with the thickness set to 1
Let's make the following image of the molecule with PDB code 3J27 (part of the Dengue virus):
You can reproduce this image via the following steps:
Let's make the following image of the molecule with PDB code 1EQZ (the nucleosome core particle):
You can reproduce this image via the following steps:
Let's reproduce an image of the molecule with PDB code 3JC8 (the type IVa pilus machine in a piliated state).
Here we colorized 3JC8 by groups of chains. Please, download 3JC8.sam file in which for simplicity we combined chains in groups.
You can reproduce this image via the following steps:
Let's make the following image of the molecule with PDB code 4QWE (DNA polymerase in complex with DNA).
You can reproduce this image via the following steps:
atom.symbol S or atom.symbol Ca
(short version: a.s S or a.s Ca
) and click Enter. Now you should see 11 nodes selected, press Ctrl/ Cmd⌘ + Shift + V and add Van der Waals visual model. Select in the document view the newly created Van der Waals visual model and in the Inspector (click Ctrl/ Cmd⌘ + I if you do not see the Inspector) set the scale to 0.75.Let's make the following image of the molecule with PDB code 1DGF (the human erythrocyte catalase).
You can reproduce this image via the following steps:
n.t structuralGroup
(short version: n.t sg
) and click Enter, then right-click on any selected node, and choose Invert selection in the context menu, right-click again on any selected node and in the context menu choose Visibility > Hide selection. Let's now hide all water atoms: open the Find window, input a.water
and click Enter, then right-click on any selected node and in the context menu choose Visibility > Hide selection.