Moving objects

In SAMSON, to move an object (e.g., an atom, a molecule, etc) first you need to select it. You can select an object either in the document view or in the viewport.

In SAMSON, you can move objects with the help of:

Here we will only consider how to move objects in SAMSON with the help of Selection editors. For how to move objects with the help of Python Scripting, please, check the Python Scripting guide.

Moving objects using move editors

To move - rotate and translate - a selection you can use one of the several move editors provided with SAMSON by default. You can find them in the Home menu or in the Editors menu. There are 4 move editors provided by default.

Editors-MoveEditor.png
The Move editor icon

1. The local move editor (shortcut: M).

MovingObjects-HIS-LocalMove-Controller.png
The local move editor controller

Translate or rotate the selected atoms along the principal axes of the selected atoms:

  • Use the central translation widget to move atoms in the plane of the camera.
  • Use the side translation widgets to move atoms along the principal axes of the selected atoms.
  • Use the side rotation widgets to rotate atoms around the principal axes of the selected atoms.
  • Use the trackball widget to rotate atoms freely.

Important: right-click (or press Ctrl / Cmd⌘ and left-click) on widgets to enter a precise displacement or angle. Right-click on translation widgets to align atoms along global axes.

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

  • light blue: first principal axis (local x axis)
  • mid blue: second principal axis (local y axis)
  • dark blue: third principal axis (local z axis)

2. The global move editor (shortcut: K).

MovingObjects-HIS-GlobalMove-Controller.png
The global move editor controller

Translate or rotate the selected atoms along global directions:

  • Use the central translation widget (the cross with arrows) to move atoms in the plane of the camera.
  • Use the side translation widgets (arrows and planes) to move atoms along the axes of the global reference frame (X, Y and Z).
  • Use the side rotation widgets (curved arrows) to rotation atoms along the axes of the global reference frame (X, Y and Z).
  • Use the trackball widget to rotate atoms freely.

Important: press Ctrl / Cmd⌘ and left-click on widgets to enter a precise displacement or angle.

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

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

3. The minimal move editor (shortcut: J).

MovingObjects-HIS-MinimalMove-Controller.png
The minimal move editor controller

Translate or rotate the selected atoms:

  • Use the central translation widget to move atoms in the plane of the camera.
  • Use the trackball widget to rotate atoms freely.

Important: press Ctrl / Cmd⌘ and left-click on widgets to enter a precise displacement or angle.

You can move object with or without snapping. To modify the snapping preference, double-click on the icon of the selection editors you are using and check or uncheck the snapping for atoms or nodes.

4. The simple move editor (shortcut: H).

MovingObjects-HIS-SimpleMove-Controller.png
The simple move editor controller

Use the translation widget to move atoms in the plane of the camera.

Important: press Ctrl / Cmd⌘ and left-click on the translation widget to enter a precise displacement.

When rotating and translating using these move editors, you can enable or disable the snapping in the Edit menu or in the top-right corner if the viewport.

MenuEdit-Snapping.png
Edit menu: snapping

ViewportMenu-Snapping.png
Viewport menu: snapping

Let's now see how to use the local move editor (shortcut: M). This editor allows for moving in local XY, YZ, XZ planes, translating and rotating around principal axes and on a sphere.

Let's load a molecule e.g. from assets or create it ourselves.

MovingObjects-HIS.png
Histidine amino acid

To move you first need to select atoms. Let's use Rectangle selection to choose a group of atoms.

MovingObjects-HIS-Selection.png
Selection

Let's move atoms in the camera plane. To move atoms, simply drag press on the cross controller and drag it in the desired direction, the editor should display the positional shift:

MovingObjects-HIS-LocalMove-CameraPlaneTranslation-NoSnapping.png
Translating atoms in the camera plane using the local move editor

If you enable snapping for atoms, then when you will move the selection, the selection will try to snap so that atoms woulb be aligned.

MovingObjects-HIS-LocalMove-CameraPlaneTranslation.png
Translating atoms with snapping in the camera plane using the local move editor

To rotate around an axis press on a controller and drag it in a desired direction:

MovingObjects-HIS-LocalMove-Rotation-NoSnapping.png
Rotating around an axis without snapping

MovingObjects-HIS-LocalMove-Rotation.png
Rotating around an axis with snapping

To rotate on a sphere left-click and hold on the circle and move the mouse cursor.

MovingObjects-HIS-LocalMove-RotationSphere.png
Rotating on a sphere

MoveEditor-Local-Example1.gif
Example 1: using the local move editor

MoveEditor-Local-Example2.gif
Example 2: using the local move editor