Moving around
The Viewport displays visualization of structural models, visual models, some other nodes, editors and apps, and you can move around in it using a mouse, a keyboard, or the Compass in the bottom-left corner of the viewport.
The key element of visualization in SAMSON is a camera, it provides a 3D view of visualizable objects, and can be easily controlled to point to a specific location, zoom in or out, translate, rotate, etc. Basically, you may consider your screen as a camera pointing into the screen and yourself as an operator seeing through the camera.
A camera is a part of a SAMSON document, and each document has at least one camera, and you can add multiple cameras into a document to easily switch between different views. Cameras (with all their properties) are saved and loaded together with a document.
Using the camera#
A camera has three modes: rotation, translation, and zoom.
Using a mouse#
- Click on the right mouse button to rotate the view.
- Press the mouse wheel to translate the view.
- Scroll the mouse wheel to zoom in/out.
- Double-click on the middle button/mouse wheel to center the view. Ctrl/Cmd + right mouse button replaces the middle button.
Using a keyboard#
- Up, Down, Left, Right - rotate the view around horizontal or vertical axis.
- Alt and Left, Right - rotate the view in the viewport plane around its center.
- Ctrl and Up, Down, Left, Right - translates the view horizontally or vertically.
- Ctrl++ - zoom in.
- Ctrl+- - zoom out.
- Shift+Space - center the camera on the selection or on the full view if nothing is selected.
Note
The rotation behavior slightly changes depending on whether the grid is on or off:
- When the grid is on, consider it as a table on which you rotate a system.
- When the grid is off, consider that you rotate a system that is floating free.
Rotation mode#
To switch the camera into a rotation mode, press and hold the right mouse button. There are two rotation modes: close to the borders of the viewport and a trackball rotation mode (the view point is rotating around the center) in the middle part of the viewport.
Translation mode#
To switch the camera into a translation mode, press and hold the mouse wheel. Try to move your mouse and you will see that the molecule follows it.
Zoom mode#
To switch the camera into a zoom mode, scroll the mouse wheel: turn the wheel and the camera will zoom in and zoom out depending on the wheel scrolling direction.
Centering#
Double-click on the mouse wheel to center the view.
The Shift+Space shortcut changes the camera focus. Select an atom and press Shift+Space, this centers the camera on the selected part (so that the selection will be in focus). If nothing is selected, then the camera is centered on the full view of the molecular system (the whole molecular system in the active document).
Tip
If you loose your molecular system, press Shift+Space and the camera will be re-positioned.
Tip
If the camera is centered on an atom and you rotate the view, the rotation will be centered around the atom.
Compass#
The compass is a dedicated camera controller, which is situated in the bottom-left corner of the viewport and can be shown/hidden using the menu in the bottom part of the viewport by clicking on the corresponding icon. The compass allows you to easily align the camera and rotate it around different axis.
Camera functions#
You can access some of the camera's functionality through its context menu. Right-click on a camera in the Document view to apply some of its actions:
- center the camera on the selection or on the whole document
- activate the camera inertia which will allow for a movement with inertia
- activate the camera orthographic projection which is useful e.g. for viewing crystals
- set the camera as the active one
- move the camera
Try switching the camera inertia on and move or rotate the molecule.
Try switching on and off the orthographic projection mode.
Multiple cameras#
You can have multiple cameras in one document but only one camera can be active at a time. Having multiple cameras might be useful if you want to switch fast between different views (e.g., positions, projections, close-up views, and a full view) in the same document. To switch between cameras, double-click on one or right-click on one in the Document view and in its context menu click "Set as active camera".
To add a new camera, click Visualization > Camera (1). A newly added camera will have a default starting position.
- , : Ctrl+Shift+C, : Cmd+Shift+C
Clipping structures#
To activate clipping in SAMSON, hold Ctrl+Shift and click where you would like the clipping plane to be (or in the void to stop clipping). You can then use Ctrl+Shift + Mouse wheel to move the clipping plane.
The video below demonstrates the use of clipping for the PDB 3J3Q, 2.4 million atoms, colorized by chain ID, illustrative.