The Mouse form indicates and controls the behavior of the mouse when the mouse moves and clicks within the graphics window. Mouse clicks and drags can affect VMD in one of two ways. It can change the view of the scene, either by rotating, translating, or scaling. It can also pick objects in the scene, causing some further action to be taken. These behaviors are all reflected in the state of the Mouse form.
Below, we describe the four main parts of the Mouse form.
The three buttons in the upper left corner of the Mouse form perform actions which affect the entire scene. The Reset View button cancels the effect of rotations, scalings, and translations performed by the user and returns the scene to its original orientation. The Stop Rotation button halts rotation induced by clicking and dragging the mouse across the scene. Finally, the Save Config button prompts the user to enter a filename in the vmd console window where the current state of VMD is saved. For example, assume the filename "mystate.vmd" has been entered. Subsequent VMD can be returned to this state by either starting VMD with the command "vmd -e mystate.vmd", or by starting VMD normally and typing "source mystate.vmd" in the vmd console.
The two pulldown menus in the bottom left corner of the Mouse form are part of the controls for the mouse mode. The top menu, entitled "View Mode", selects whether the mouse will rotate, translate, or scale the scene when the user clicks and drags with the left mouse button. Below the "View Mode" menu is the "Object Mode" menu. This pulldown menu does not change the state of the mouse. Instead, it controls which of five submenus are displayed to the right of the mouse mode menus on the Mouse form. These submenus will be described in further detail below.
The large region in the upper right corner of the Mouse form displays information about the last atom picked by the mouse. This information is also echoed to the vmd console. The data in the Pick information will remain on the Mouse form until a new atom is picked by the mouse. Information about the following fields is identified:
The five object menus all appear in the bottom right corner of the Mouse form. Only the menu selected by the Object Mode pulldown menu is displayed. These menus control how the mouse affects objects in the scene (as opposed to how the mouse changes the view of these objects). Note that any time you choose a new object mode, the View Mode changes to "Rotate".
Labels can be temporarily hidden from view by pressing the "Show/Hide" light button to the right of the corresponding label type. Pressing the "Show/Hide" button again brings the label back into view. Labels can be removed by pressing the "Delete" button on the far right of the Pick menu.
The button marked "Center" changes how VMD rotates and scales the scene. To get a feel for how this works, select "Center" from the Mouse form, then click on an atom in the scene. If you now rotate the scene by clicking and dragging with the left mouse button, the scene should rotate about the picked atom. If you change the view mode to "Scale" using the "View Mode" pulldown menu, the scene will expand while keeping the picked atom in view. The picked atom will remain the center atom until a new atom is selected as "Center", the "Reset View" button is pressed, or a new molecule is loaded.
Atoms are moved by clicking and dragging with the left mouse button. If the shift key is held while the mouse is moved, the affected atoms are rotated about the selected atom. Rotating atoms with the left button rotates about the x or y axis of the screen; rotating with the middle or right button rotates about an axis perpendicular to the screen.
Note that there is currently no way to undo Move operations, so the atom coordinates should first be saved using the Edit form.