The molecule can rotate around “external” axes, fixed to viewport, or around “internal” axes, attached to the molecule. The default rotation center is the geometric center of the molecule's boundbox.

spin on   starts spinning as specified by the previous spin or set spin commands.

spin off   stops spinning

Defaults: rotate +10 degrees, spin at +10 degrees per second, external Y axis.

For all the rest, rotate and spin commands use the same general syntax
(sections 1 to 6 below give detailed explanations):

the command: force internal axis: axis specification: angle of rotation or speed of spinning:

rotate

spin

molecular
(or nothing)

x
y
z
x point
y point
z point
axisAngle {coordinates}
$name of axis
point1 point2

angle

speed

Where
point = { coordinates } or ( atom expression ) or $name of object
name of axis = name of a drawn line (used as axis) or plane (axis normal through its geometric center)
name of object = name of a drawn object (its geometric center will be used as reference point), e.g. point, line, plane, triangle or quadrilateral

1) Rotation around an external XYZ axis

rotate X, Y or Z angle

spin X, Y or Z speed

   (-X, -Y or -Z can be used, or the negative sign included in the angle/speed value)

set spin X, Y or Z speed(for compatibility with Jmol v.10 and Rasmol/Chime; requires spin on to start spinning).

2) Rotation around an external axis defined by the origin and one given point

rotate axisAngle {coordinates} angle

spin axisAngle {coordinates} speed

The axis is defined between the center of the viewport and the given point (external coordinates).

3) Rotation around an internal XYZ axis

rotate molecular X, Y or Z angle

spin molecular X, Y or Z speed

   (-X, -Y or -Z can be used, or the negative sign included in the angle/speed value)

Variant: if we want to use not the molecule’s axis, but one parallel to it passing through a given point:

rotate molecular X, Y or Z point angle

spin molecular X, Y or Z point speed

That point can be

4) Rotation around an internal axis defined by the origin and one given point

rotate molecular axisAngle {cooordinates} angle

spin molecular axisAngle {coordinates} speed

The axis is defined between the origin of coordinates and the given point (internal coordinates).

5) Rotation around an internal axis defined by a drawn line

rotate $name of axis angle

spin $name of axis speed

(the keyword molecular is implicit here) If the reference drawn object is a line, it is used as axis; if it's a plane, the normal through its center is used as axis.

6) Rotation around an internal XYZ axis defined by two given points

rotate point1 point2 angle

spin point1 point2 speed

(the keyword molecular is implicit here). The reference points given can be coordinates, atom expressions or drawn objects, as explained above.

[open this document in its own window]