For the latest news about VMD, please see the VMD home page.

For a complete description on how to install, use, or modify VMD, please see the VMD Installation Guide, the VMD User's Guide, or the VMD Programmer's Guide.

Please send bug reports, comments, or suggestions to vmd@ks.uiuc.edu.


This page contains quick help on the following topics:


Other Help and Information:


VMD Text Command Summary

VMD understands commands which start with the following words; click on a command for a more complete synopsis. Items marked as (optional) may not be available in the current version of VMD.
  • animate: Play/Pause/Rewind a molecular trajectory.
  • axes: Position a set of XYZ axes on the screen.
  • color: Change the color assigned to molecules, or edit the colormap.
  • display: Change various aspects of the graphical display window.
  • exit: Quit VMD.
  • help or ?: Display this help file with an HTML viewer.
  • label: Turn on/off labels for particular atoms, bonds, angles, or dihedral angles.
  • light: Control the light sources used to illuminate graphical objects.
  • logfile: Log commands to a text file or the VMD console.
  • menu: Control or query the on-screen GUI menu forms.
  • mol: Load, modify, or delete a molecule in VMD.
  • molecule: Same as mol.
  • mouse: Change the current state (mode) of the mouse.
  • play: Start executing text commands from a specified file.
  • quit: Same as exit.
  • remote: Set up VMD to connect to or start a remote simulation program (optional).
  • render: Output the currently displayed image (scene) to a file.
  • rock: Rotate the current scene continually at a specified rate.
  • rot: Rotate the current scene around a given axis by a certain angle.
  • rotate: Same as rot.
  • rotation: Same as rot.
  • scale: Scale the current scene up or down.
  • stage: Position a checkerboard stage on the screen.
  • trans: Translate the objects in the current scene.
  • translate: Same as trans.
  • user: Add user-customized commands to the graphics display pop-up menu.
  • wait: Specify a number of seconds to wait before reading another command.

VMD Text Command Descriptions

Words which complete the command are shown in the sublist. Optional arguments are enclosed by [ ]. Option lists are denoted by < a | b | c >. Dummy arguments are shown like this.
  • animate: Play/Pause/Rewind a molecular trajectory.
    • forward: Play animation forward.
    • for: Same as forward.
    • reverse: Play animation backward.
    • rev: Same as reverse.
    • pause: Pause animation.
    • prev: Go to previous frame.
    • next: Go to next frame.
    • skip n: Set stride to n+1 frames.
    • delete all: Delete all frames from memory.
    • speed n: Set animation speed to n.
    • style once: Set to play animation once.
    • style loop: Set to loop through animation continuously.
    • style rock: Set to play animation foward and back continuously.
    • goto start: Go to first frame.
    • goto end: Go to last frame.
    • goto n: Go to frame n.
    • read filename [beg nb] [end ne] [skip ns] [molecule_number]: Read data for molecule_number from filename, beginning with frame nb, ending with frame ne, with a stride of ns+1.
    • write filename [beg nb] [end ne] [skip ns] [molecule_number]: Write data from molecule_number to filename, beginning with frame nb, ending with frame ne, with a stride of ns+1.
    • delete [beg nb] [end ne] [skip ns] [molecule_number]: Delete data for molecule_number, beginning with frame nb, ending with frame ne, with a stride of ns+1.
    • readdel filename [beg nb] [end ne] [skip ns] [molecule_number]: Read data for molecule_number from filename, beginning with frame nb, ending with frame ne, with a stride of ns+1, overwriting existing data.

  • axes: Position a set of XYZ axes on the screen.
    • location < off | origin | lowerleft | lowerright | upperleft | upperright >: Position axes.

  • color: Change the color assigned to molecules, or edit the colormap. All color values are in the range 0 ... 1.
    • category name color: Set color of object specified by category and name to color.
    • scale method < RGB | RWB | BlkW >: Set type of scale to use for coloring objects by values.
      • RGB: red...green...blue
      • RWB: red...white...blue
      • BlkW: black...gray...white
    • scale midpoint x: Set midpoint of color scale to x, in the range 0 ... 1.
    • scale min x: Set minimum of color scale to x, in the range 0 ... 1.
    • scale max x: Set maximum of color scale to x, in the range 0 ... 1.
    • change < alpha | shininess | rgb | ambient | diffuse | specular > color: Reset given property of color to default value.
    • change < alpha | shininess | rgb | ambient | diffuse | specular > color othercolor: Set given property of color to match othercolor.
    • change < alpha | shininess > color value: Set given (scalar) property of color to value.
    • change < rgb | ambient | diffuse | specular > color r g b: Set given (3-valued) property of color to r g b.

  • debug: Turn on/off printing of debugging messages. This will have no effect if VMD was compiled without the debugging option.
    • < on | off >: Turn debug on or off.
    • level n: Set debug level to n.

  • display: Change various aspects of the graphical display window.
    • reshape: Reshape the display.
    • resetview: Reset the view.
    • eyesep value: Set the eye separation to value.
    • focallength value: Set the focal length to value.
    • height value: Set the screen height to value.
    • distance value: Set the screen distance to value.
    • antialias < on | off >: Turn antialiasing on or off.
    • depthcue < on | off >: Turn depth cueing on or off.
    • stereo < off | sidebyside | crystaleyes >: Change the stereo mode.
    • nearclip < set | add > value: Add to or set near clipping plane position.
    • farclip < set | add > value: Add to or set far clipping plane position.

  • exit: Quit VMD.
    • confirm: Ask user before quitting.
    • [now]: Quit without asking.

  • help or ?: Display this help file with an HTML viewer.
    • [command]: Jump to help for command.

  • label: Turn on/off labels for particular atoms, bonds, angles, or dihedral angles.
    • add category [atom1 ... atomN]: Add a label involving the N atoms to the given category.
    • list category: list all labels in the given category.
    • show category [ all | label_number ]: Turn on labels in the given category.
    • hide category [ all | label_number ]: Turn off labels in the given category.
    • delete category [ all | label_number ]: Delete labels in the given category.
    • graph category label_number [command]: Show a graph of a label from the given category. The data will be written to a file, and the specified command will be run to graph the data. %s in the command string will be replaced by the temporary filename.

  • light: Control the light sources used to illuminate graphical objects. There are four light sources, numbered 0 to 3.
    • light_number on: Turn a light on.
    • light_number off: Turn a light off.
    • light_number highlight: Display a line indicating the position of a light source.
    • light_number unhighlight: Hide the line indicating the position of a light source.
    • light_number rot < x | y | z > angle: Rotate a light (at infinity) angle degrees about a given axis.

  • logfile
      Turn on/off logging a VMD session to a log file. This will create a log file with commands for all the actions taking during the session. The log file may be played back later by using the play command.
    • console: Log commands to the VMD text console.
    • filename: Turn on logging to filename.
    • off: Turn off logging.

  • menu: Control or query the on-screen GUI menu forms.
    • menu_name on: Turn a menu on.
    • menu_name off: Turn a menu off.
    • menu_name loc: Print the location of a menu.
    • menu_name move x y: Turn a menu on.

  • mol: Load, modify, or delete a molecule in VMD. In the following, molecule_number is a string describing which molecules are affected by the command. It is of the form < m1|m2|....|mN >, where mN is one of the following: all, top, active, inactive, displayed, on, off, fixed, free, or one of the unique integer ID codes assigned to the molecules when they are loaded.
    • < new | load > structure_file_type structure_file [coordinate_file_type coordinate_file]: Load a new molecule from given file(s).
    • list [ all | top | active | displayed | none | molecule_number ]: Print information about molecules.
    • color color_method: Change the default atom coloring method setting.
    • representation rep_method: Change the default rendering method setting.
    • selection select_method: Change the default atom selection setting.
    • modcolor rep_number molecule_number color_method: Change the current coloring method for the given representation in the given molecule.
    • modstyle rep_number molecule_number rep_method: Change the current rendering method (style) for the given representation in the given molecule.
    • modselect rep_number molecule_number select_method: Change the current atom selection for the given representation in the given molecule.
    • addrep: Using the current default settings for the atom selection, coloring, and rendering methods, add a new representation to the top molecule.
    • delrep rep_number molecule_number: Deletes the given representation from the specified molecule.
    • delete < all | top | active | displayed | none | molecule_number >: Delete molecules
    • active < all | top | active | displayed | none | molecule_number >: Make molecules active.
    • inactive < all | top | active | displayed | none | molecule_number >: Make molecules inactive.
    • on < all | top | active | displayed | none | molecule_number >: Turn molecules on.
    • off < all | top | active | displayed | none | molecule_number >: Turn molecules off.
    • fix < all | top | active | displayed | none | molecule_number >: Fix molecules.
    • free < all | top | active | displayed | none | molecule_number >: Unfix molecules.
    • top molecule_number: Set the top molecule.

  • molecule: Same as mol.
  • mouse: Change the current state (mode) of the mouse.
    • mode 0: Set mouse mode to rotation.
    • mode 1: Set mouse mode to translation.
    • mode 2: Set mouse mode to scaling.
    • mode 3 N: Set mouse mode to rotate light N.
    • mode 4 N: Set mouse mode to picking mode N.

  • play: Start executing text commands from a specified file, instead of from the console. When the end of file is reached, VMD will resume reading commands from the previous source. This command may be nested, so commands being read from one file can include commands to read other files.
    • filename: Execute commands from filename.

  • quit: Same as exit.
  • render: Output the currently displayed image (scene) to a file.
    • list: List the available rendering methods.
    • method filename: Render the global scene to filename using method.
    • method filename command: Render the global scene to filename, then execute `command'. Any %s in `command' are replaced by the filename.

  • rock: Rotate the current scene continually at a specified rate.
    • off: Stops rocking.
    • < x | y | z > by step: Rock around the given axis at a rate of step degrees per redraw.
    • < x | y | z > by step n: Rock around the given axis at a rate of step degrees per redraw for n steps, reverse, and repeat.

  • rot: Rotate the current scene around a given axis by a certain angle.
    • stop: Stop all rotation, same as rock off.
    • < x | y | z > by angle: Rotate around the given axis angle degrees.
    • < x | y | z > to angle: Rotate the given axis to the absolute position angle.
    • < x | y | z > < by | to > angle step: Rotate at a rate of step degrees per redraw.

  • rotate: Same as rot.
  • rotation: Same as rot.
  • scale: Scale the current scene up or down.
    • by f: Multiply scene scaling factor by f.
    • to f: Set scene scaling factor to f.

  • simulation: Same as sim.
  • stage: Position a checkerboard stage on the screen.
    • location < off | origin | bottom | top | left | right | behind > :
    • panels n: Set number of panels in stage.

  • trans: Translate the objects in the current scene.
    • by x y z: Translate by vector (x,y,z) in screen units.
    • to x y z: Translate to the absolute position (x,y,z) in screen units.

  • translate: Same as trans.
  • user: Add user-customized hotkey commands to the graphics window and input devices
    • add key key [command]: Assign the given text command to the hotkey key. When key is then pressed while the mouse is in the display window, the specified command will be executed.
    • print keys: Print out the current definition of the hotkeys.

  • wait: Specify a number of seconds to wait before reading another command.
    • time: Wait time seconds.

VMD Windows Command-Line Option Summary

The Windows version of VMD is currently unable to process any command line options due to implementation issues.

VMD Unix Command-Line Option Summary

When started, the following command-line parameters may be given to VMD. Note that if a command-line parameter does not start with a dash (-), and is not part of another option, it is assumed to be a PDB filename. Thus, the command
vmd molecule.pdb
will start VMD and load a molecule from the file molecule.pdb.
-? | -h
Print a summary a command-line options to the console.
-e filename
After initialization, execute the text commands in filename, and then resume normal operation.
-psf filename
Load the specified molecule (in PSF format) at startup. The PSF file only contains the molecular structure; a PDB or DCD file must also be specified when this option is used.
-pdb filename
Load the specified molecule (in PDB format) at startup.
-dcd filename
Load the specified trajectory file (in binary DCD format) at startup. The DCD file only contains atomic coordinates; a PDB or PSF file must also be specified when this option is used.
-disp < win | text | cave | none >
Specify the type of graphical display to use. The possible display devices include:
  • win: a standard graphics display window.
  • text: do not provide any graphics display window.
  • cave: use the CAVE virtual environment for display.
  • none: same as text.
It is possible to use VMD as a filter to convert coordinate files into rendered images, by using the -disp text and -e options.
-pos x y
Specify the position for the graphics display window. The position (x,y) is the number of pixels from the lower-left corner of the display to the lower-left corner of the graphics window.
-size x y
Specify the size for the graphics display window, in pixels.
-nt
Do not display the VMD title at startup.
-startup filename
Use filename as the VMD startup command script, instead of the default file.
-init filename
Use filename as the file containing VMD initialization data, instead of the default file.

VMD Environment Variable Summary

Several environment variables are used by VMD to determine the location of certain files and directories. These variables include:
DISPLAY (Unix-only)
The X-Windows display that VMD should use for displaying the VMD forms and menus, as well as the graphics window. If this environment variable is not overridden by VMDGDISPLAY all VMD windows will be directed to this display.
VMDDIR
The directory which contains the VMD data files (such as this help file) and architecture-specific executables. By default, this is /usr/local/lib/vmd on Unix systems, and C:\Program Files\University of Illinois\VMD on Windows systems.
VMDTMPDIR
The directory which VMD should use for temporary data files. By default, this is /tmp, or /usr/tmp on Unix systems and C:\ on Windows.
VMDBABELBIN
The complete path and filename for the program babel, which is used by VMD to convert molecular structure/coordinates files into PDB files which VMD can actually understand. If this is not set explicitly, the VMD startup script will attempt to find babel in the current path. If babel cannot be found or is not installed, VMD will not be able to read molecular file formats other than PDB, PSF, and binary DCD files. The program babel may be obtained from the site http://www.eyesopen.com/babel.html
VMDFILECHOOSER
Specifies which file chooser to use for loading and saving files from the GUI. At present, this should be either FLTK, which uses Fltk's platform- independent file chooser, or TK, which uses Tk's file chooser. The Tk file chooser is the default and uses a native Windows interface on Windows platforms. The Fltk file chooser looks the same on all platforms, supports tab completion but not drive letters, and is probably most appropriate for Unix environments. The file chooser can be overridden at any time by changing the environment variable (e.g., in Tcl, set env(VMDFILECHOOSER) FLTK).
VMDCAVEMEM (Unix-only)
This overrides the default size of the shared memory arena which is allocated by VMD when the CAVE starts up. The variable must be an integer number of megabytes. Since this is the only shared memory pool allocated, and it is done only once, you must choose a value sufficient to account for the largest scene you intend to render in VMD in that CAVE session. The default value unless otherwise specified is 80 Megabytes. Values of 200MB to 512MB are commonly needed for large molecular systems containing several hundred thousand atoms.
VMDGDISPLAY (Unix-only)
The name of an X-Windows display that VMD will use to display the graphics window. This environment variable is only used on Unix systems. Through the use of the the DISPLAY and VMDGDISPLAY envrironment variables, the VMD graphics window can be placed on a separate screen from the forms and menus. This is particularly useful when giving 3-D demonstrations using a projector. The forms and menus can be kept on a different screen from the graphics so that they do not distract the audience.
VMDHTMLVIEWER
The name of the HTML viewer (Netscape, Mosaic, whatever you prefer) that VMD should use to display HTML documents (such as this help file). By default, this is Netscape.
VMDIMAGEVIEWER
The name of the external program to use for displaying VMD snapshots (or other images), in various formats.
VMDPREFERSTEREO (Unix-only)
This environment variable allows NVidia Quadro users to override the normal X11 visual search order, skipping multisample capable visuals in favor of stereo visuals. VMD still attempts to get the more complex visuals first, but if it comes down to a choice between stereo and multisample as mutually exclusive options, this variable provides the ability to force the use of stereo if available.
VMDUSEGALPHA
This environment variable allows the use of the OpenGL GlobalAlphaSUN extension to implement alpha-blended transparency. When this environment variable is set, and the matching OpenGL extension is detected, VMD will disable polygon stipple-based screen-door transparency and will use alpha-blending instead. On platforms lacking the GlobalAlphaSUN OpenGL extension, this environment variable has no effect.
VMDSCRDIST
Distance to the VMD image plane.
VMDSCRHEIGHT
Height of the VMD image plane.
VMDSCRPOS
Position of the VMD graphics window (x,y).
VMDSCRSIZE
Size of the VMD graphics window (x,y).

Return to the top of this document ...