Skip to content

Moving objects

In SAMSON, you can move objects using:

Only the following nodes can be moved:

  • structural nodes that have atoms
  • certain types of labels
  • lights
  • meshes

Other types of nodes either do not have positions in the viewport (e.g. conformations, files, etc.), or they are automatically moved based on nodes on which they depend (e.g. visual models that depend on atoms or on other structural nodes).

You can try the following interactive tutorial in SAMSON (Help > Tutorials): "Move objects in the Viewport".

What you will learn from this tutorial:

What is not covered in this tutorial:

For how to move objects with the help of Python Scripting, please, refer to the Python Scripting Guide.

Examples of the usage of move editors:

Let's first see some examples of what you can do with Move editors in SAMSON.

Example 1: using move editors Example 2: using move editors with snapping Example 3: changing the pivot Example 4: rotating a fragment

Let's now see how to use Move editors in SAMSON.

Move editors#

The move editors in SAMSON provide you with precise control over positions and orientations of molecules.

To move - rotate and translate - a selection you can use one of the several move editors provided with SAMSON by default:

You can find these editors in the left-side menu of the viewport.

In SAMSON, to move an object (e.g., an atom, a molecule, a mesh, a label, etc) first you need to select it (1).

  1. Please refer to the Selecting section to learn how to select objects.

The displacer editor#

Shortcut: D

The displacer editor controller

This displacer move editor allows you to displace nodes in the plane of the screen (the camera plane). You can either displace currently selected nodes by pressing on them and dragging or press on another node and drag it. In the latter case, the selection is based on the current Selection filter. This editor is particularly useful when performing interactive simulations.

You can move object with or without snapping. You can modify the snapping preference in the editor's quick access menu in the top-left corner of the Viewport, or in the Preferences (Interace > Preferences > Editors > Snapping).

Displacer editor: snapping

The local move editor#

Shortcut: M

The local move editor controller

The local move editor allows you to translate and rotate the selected objects along its principal axes:

  • Use the central translation widget (the cross with arrows) to move objects in the plane of the camera.

The central translation widget (highlighted in yellow) of the local move editor

  • Use the side translation widgets (straight arrows and planes) to move objects along the principal axes of the selected objects.

The axis translation widget (highlighted in yellow) of the local move editor

The plane translation widget (highlighted in yellow) of the local move editor

  • Use the side rotation widgets (curved arrows) to rotate objects around the principal axes of the selected objects.

The rotation widget (highlighted in yellow) of the local move editor

  • Use the trackball (the sphere) widget to rotate objects freely.

The trackball of the local move editor with a rotation widget highlighted in yellow

The colors of the translation and rotation widgets indicate the principal axes:

  • light blue light blue: first principal axis (local X axis)
  • mid blue mid blue: second principal axis (local Y axis)
  • dark blue dark blue: third principal axis (local Z axis)

You can move object with or without snapping. You can modify the snapping preference in the editor's quick access menu in the top-left corner of the Viewport, or in the Preferences (Interace > Preferences > Editors > Snapping).

Viewport menu: snapping

You can provide the precise translation and rotation parameters as follows:

  • right-click on the move editor's widgets
  • press Ctrl/Cmd and left-click on the move editor's widgets

You can also align objects along global axes by right-clicking on the move editor's widgets.

The context menu of the local move editor's widgets

The global move editor#

Shortcut: K

The global move editor controller

The global move editor allows you to translate and rotate the selected objects along global X, Y, Z axes:

  • Use the central translation widget (the cross with arrows) to move objects in the plane of the camera.

The central translation widget (highlighted in yellow) of the global move editor

  • Use the side translation widgets (straight arrows and planes) to move objects along the axes of the global reference frame (X, Y, and Z).

The axis translation widget (highlighted in yellow) of the global move editor

The plane translation widget (highlighted in yellow) of the global move editor

  • Use the side rotation widgets (curved arrows) to rotation objects along the axes of the global reference frame (X, Y, and Z).

The rotation widget (highlighted in yellow) of the global move editor

  • Use the trackball widget (the sphere) to rotate objects freely.

The trackball of the global move editor with a rotation widget highlighted in yellow

The colors of the translation and rotation widgets indicate the global axes:

  • red red: X axis
  • green green: Y axis
  • blue blue: Z axis

You can move object with or without snapping. You can modify the snapping preference in the editor's quick access menu in the top-left corner of the Viewport, or in the Preferences (Interace > Preferences > Editors > Snapping).

Viewport menu: snapping

You can provide the precise translation and rotation parameters as follows:

  • right-click on the move editor's widgets
  • press Ctrl/Cmd and left-click on the move editor's widgets

You can also align objects along global axes by right-clicking on the move editor's widgets.

The context menu of the global move editor's widgets

Moving objects using move editors#

In this section, you will learn how to use move editors on an example of the local move editor (shortcut: M). The local move editor allows for translating and rotating based on the principal axes of the selection and using the trackball.

Prerequisites: Please refer to the Selecting section to learn how to select objects in SAMSON.

Load a molecule from a file or from assets (1). Select a part of the molecule - use the rectangle selection editor (2) to select a group of atoms.

  1. See the Building with available assets section.
  2. Shortcut: R

Selection

To move the selected atoms in the camera plane:

  1. Press with the left mouse button on the central translation widget (the cross with arrows).
  2. While pressing, move the mouse to translate in the desired direction. The editor should display the positional shift. If you would like to cancel, just click Esc, and the position will be restored.
  3. Release the mouse to apply the displacement.

Translating atoms in the camera plane using the local move editor

Note

The move operations are undoable, so you can always undo them by clicking Edit > Undo, , : Ctrl+Z, : Cmd+Z.

You can enable translational snapping in the top-left corner of the viewport to snap the translation to this value. Set the translational snapping to e.g. 0.5Å, and translate the selection.

Translating atoms with snapping in the camera plane using the local move editor

To rotate around an axis:

  1. Press with the left mouse button on a side rotation widget (a curved arrow).
  2. While pressing, move the mouse to rotate the selection in the desired direction. The editor should display the positional shift. If you would like to cancel, just click Esc, and the position will be restored.
  3. Release the mouse to apply the displacement.

Rotating around an axis

You can enable rotational snapping in the top-left corner of the viewport to snap the rotation to this value. Set the rotational snapping to e.g. 10°, and rotate the selection.

Rotating around an axis with snapping

To rotate using the trackball (on a sphere):

  1. Press with the left mouse button on the trackball (the sphere).
  2. While pressing, move the mouse to rotate in the desired direction. The editor should display the positional shift. If you would like to cancel, just click Esc, and the position will be restored.
  3. Release the mouse to apply the displacement.

Rotating on a sphere