next up previous contents index
Next: Using the Forms Up: User Interface Components Previous: User Interface Components

Using the Mouse in the Graphics Window

 

The graphics display window is labeled GL Display and contains a display of the various molecules and other graphical objects, like the axes, which make up the scene. When the mouse cursor is located inside the graphics display window, it may be used to perform the following actions:

There are also hot keys, or keyboard accelerators, available when the mouse is in the graphics display window. These hot keys are bound to some VMD text command, which is executed when the hot key is pressed. VMD has several built-in hot key commands, and the user can add new ones as well (overriding the built-in ones if desired). A description of how to set up personal hot key commands is given in section.

The Popup Menu

Pressing the right mouse button while the mouse cursor is in the graphics display window activates the VMD popup menu. This menu contains a number of commands, and also submenus with commands, which may be executed by selecting the option while keeping the third mouse button pressed and then releasing the button. The commands accessed via the popup menu simply execute a text command which is bound to the selected popup option, just as if that command had been entered at the VMD command prompt. There are options available in VMD \ to add your own submenus and commands to the main VMD popup menu, to customize this GUI control to your personal taste. See section for a complete description of how to do this, and how to make these popup menu customizations available every time you start up VMD .

In addition to the permanent popup menu items available in the menu which are described in the following sections, there is occasionally one more mouse-position-specific submenu used to control graphical objects in the current scene. When the mouse pointer is positioned over a selectable item (e.g., an atom in a molecule), and the right mouse button is used to display the popup menu, a special submenu will be added to the top of the main popup menu with specialized controls for the object under the pointer. In the case of a molecule, the submenu contains options to change how that molecule is rendered, to display information about the molecule, and to perform actions such as fix the molecule in place or hide it from view. The following sections, however, only describe the menu options always availble when the third mouse button is pressed.

The following sections describe the submenus and options available in the VMD popup menu.

Mouse Mode Submenu

   

The mouse, while positioned within the graphics display window, is used to perform a variety of functions. There are several different modes in which the mouse may be in at any time; the current mouse mode determines what the effect is when the user presses the left or middle button. Each mouse mode, except the lights mode (see below), causes the cursor to acquire a characteristic shape. The mouse mode is changed via the popup menu; pressing the right mouse button brings up this menu, which contains several submenus with various commands. The first two submenus, `Mouse Mode' and 'Picking Mode', are used to set the mouse mode. The available modes are as follows:

Pick Item Mode Submenu

   

The mouse can also be used to select things from the screen. As with many molecular graphics programs, an  atom can be picked by moving the cursor over it and clicking the left mouse button. When an atom is picked for the first time, a text label appears which shows the atom residue name and number, and the atom name. Clicking on the atom again turns the label off.

        Picking atoms with the mouse is used to turn on or off various types of labels, to query for information about an object, or to move items around on the screen. You can label an atom (which will display its name as just described), or you can label geometric values such as the distance between to atoms (a bond label), an angle between three atoms (an angle label), or the dihedral angle formed by four atoms (a dihedral label). This is done by setting the mouse into the proper picking mode, and then selecting the relevant atoms with the mouse.

You first select the proper picking mode by using the popup menu, and choosing the mode required to perform the desired action. The available actions when in pick item mode are:

When a label is added to a molecule (say, for a bond, or just to show the name of an atom), a new entry will be added to the list of current labels which is available via the Labels form, or from the Labels popup menu commands. These controls also contain options to turn the labels on or off, or to delete them entirely from memory.

  Since atom and bond picking is a very common action, these two types of labels can be added without having to set the mouse to a picking mode. To just add an atom label, click on and release the left mouse button while pointing to an atom, without moving the mouse during the click and release. To add a bond label, click on and release the middle mouse button on first one, and then the other, of the two atoms involved. Again, make sure not to move the mouse while the button is pressed down.

Display Modes Submenu

   

From the popup menu you can control certain settings for the graphics display window. This submenu is used to control what stereo mode is available, and how the 3D graphics are projected onto the 2D screen. The commands available in this menu are:

Fit Submenu

   

The fit submenu contains commands to apply a Kabsch (1976) least squares fitting algorithm to match two molecules together. The fitting can be done simply to compute and print out the RMSD value for the two molecules, or the two molecules may be physically translated and rotated. The fit options include:

Labels Submenu

   

The labels submenu is used to control the appearance of text labels which may be placed on atoms, and of bond, angle, and dihedral angle labels which may be created between atoms. Once a label is placed on an atom or set of atoms, through the use of the mouse (see section), it may be turned on or off, or deleted entirely, through use of this submenu and alsothrough use of the Labels form form as explained later in this manual. The labels submenu has the following options:

Animate Scene Submenu

   

A molecule in VMD can contain any number of coordinate sets; the resulting molecular trajectory may be played back in order to animate the molecule. This submenu contains commands to control the animation, much like the controls for a VCR or tape player. The animation can also be controlled via the Animate form. The commands available in this submenu are:

Spin/Rock Scene Submenu

   

These commands allow you to spin or rock the displayed molecules. A   spin is a constant rotation in a given direction, and a   rock is rotation that alternates between one direction and its opposite. Thus, `Spin X' rotates the system in a constant speed around the X axis and `Rock Z' rocks it aroung the Z axis. The speed of rotation and total rock angle are currently fixed. Available commands are:

Stop Rotation

   

Halts the rotational motion of the displayed molecules, i.e. sets their spin and rock values to be zero.

Reset View

   

VMD does not actually alter a molecule when it is moved or resized. Instead, it changes the transformation matrix used to convert the atomic coordinates to screen coordinates. The initial definition of this matrix is set up so the   top molecule takes up most of the screen. However, after moving things about, you may want to reset the view to bring the molecule back to the initial position. Selecting `Reset View' allows you to do just that.

Show Form Submenu

   

The GUI controls for VMD , also known as forms, consist of separate windows containing controls for the program. The forms may be individually displayed on the screen or hidden from view. This menu provides one way to display a form. To do so, select the name of the form to display from the `Show Form' submenu. If the box to the left is checked, it is already turned on and selecting it again will not affect anything. To bring the form to the front of screen, you will have to turn the form off then back on.

Hide Form Submenu

   

This menu provides another way to close a form. Select the form name to turn it off.

General Help

   

Starts an HTML viewer (like Mosaic or Netscape) and displays the on-line VMD help document. The viewer is designated by the environment variable VMDHTMLVIEWER. Starting help multiple times will start multiple viewers.

Specific Help Submenu

   

Provides an alphabetical interface to the on-line help document, for information about a specific VMD text command. Choosing a letter brings up another menu listing all the words in the index starting with that letter. When one of these words is selected, an HTML viewer (designated by the environment variable VMDHTMLVIEWER) is started, and the VMD on-line help document is loaded and advanced to display the selected text command.

Quit Submenu

  Opens a submenu asking if you really want to quit.

Hot Keys

When the mouse is in the graphics window, several more commands are accesssible via programmable hot keys. They allow you to do things like change mouse modes or advance the animation by a frame by simply pressing a key. The default key bindings are listed below, in table 3.1. The commands listed are the text commands which are executed when the hot key is pressed; these text commands are explained in section.

  
Table 3.1: Keyboard hot keys.

See section for information on how to customize the behavior of these hot keys and how to add new hot key commands.



next up previous contents index
Next: Using the Forms Up: User Interface Components Previous: User Interface Components



Andrew Dalke
Tue May 14 16:49:45 CDT 1996