Next: Vectors and Matricies
Up: Text User Interface
Previous: Tcl
Most of VMD
was originally written without the Tcl interface. The text interpreter used (which is still available as a compile time option) treated the commands in a slightly different form than Tcl does. Because we did not rewrite the old commands when Tcl ws added, there is a slight difference in usage between the old style interface (the ``core'' commands) and the new Tcl functions. For the most part, these are subtle and not important. For more information see the section on "writing scripts" (???)
Table 11.1: Summary of core text commands in VMD
.
All text commands in VMD
are composed of one or more words or phrases separated
by white space, and terminated by a newline. Since the parser now uses Tcl, a ``phrase'' is text surrounded by double quotes or by a matching set of open and close braces. (Please read the Tcl manual to better understand what constitutes the end of a statement.) The first word of each
command indicates the general purpose for the command, and the following
words specify the exact type of command to execute. Table 11.1
summarizes the text commands in VMD
by listing the first words, and
describing the general purpose for commands starting with those words.
Since VMD
can be compiled with optionally included components and
features, commands labelled optional may not be available in
your version of VMD
.
The commands described in the following sections
are listed by name, and followed by a list of the available
arguments. If an argument is optional, it is enclosed in []s.
If only one of a list of arguments is needed, the list is enclosed in
<>s and the items are seperated by |. Words in italics
indicate a string or value to be specified by the user.
These commands control the animation of a molecular trajectory and is used to read and write animation frames to/from a file.
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.
The axes (orthogonal vectors pointing along the x, t, and z directions) can be placed in any of 5 locations on the screen, or turned off.
Does any place list where to change the axes colors???
- location < off | origin | lowerleft | lowerright | upperleft | upperright >: Position axes.
Change the color assigned to molecules, or edit the color scale. All color values are in the range 0 ... 1. Please see the section on colors for a full description of the various options. ???
- 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.
Turn on/off printing of debugging messages. This will have no effect if VMD
was compiled without the
debugging option (the standard distribution was not compiled with debugging).
- < on | off >: Turn debug on or off.
- level n: Set debug level to n.
Change various aspects of the graphical display window. For information about the options, see the section describing the display form. ???
- 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.
- detail < full | flat | lines | points | none >
- altdetail < full | flat | lines | points | none >
- stereo mode: Set the stereo mode to mode. ???
- nearclip < set | add > value: Add or set near clipping plane position to it value.
- farclip < set | add > value: Add or set far clipping plane position to value.
Turn on/off echoing of text commands to the console. When this is turned on, text commands read from a file or
from the VMD
prompt are echoed to the screen before they are executed. Do not confuse this with the standard unix echo command.
- < on | off >: Turn echoing on or off.
Quit VMD.
- confirm: Use a form to verify with the user before quitting.
- [now ]: Quit without asking.
(Tcl) Communicate Tcl commands between different processes based on
the Tcl-DP RPC functions (optional). This command can set the machine
up as a server (listening for commands) or client (sending commands)
or both.
Display the on-line help file with an HTML viewer. Typing `?'
will also bring up the help file. See ??? for information on how to
change the default viewer (which is Mosaic). This command uses the index of the VMD
User's Guide to determine the appropriate URL
for the help request. Since you may prefer to use a local site for help information, see ??? to find out how to get the HTML distribution of this guide and how to modify VMD
to use it.
- [command ]: Jump to help for command.
Same as log.
Turn on or off labels for the four categories: atoms, bonds, angles, or dihedral angles. Once a label is created (given the list of associated atoms) it can be turned on or off until it is deleted. The value of the label over the trajectory can be saved to a file and viewed with an external program.
- add category [ atom1 ... atomN ]: Add a
label involving the N atoms to the given category.
This cannot be right -- needs molecule id ???
- 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 temporary file, and the specified command will be run to graph the data.
%s in the command string will be replaced by the temporary filename.
There are four light sources, numbered 0 to 3, used to illuminate graphical objects. They are point sources located at infinity so the only controls are to rotate a light or turn it on or off. A dotted line from the light to the axis can be turned to help show where the light is located.
- 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.
Turn on/off
logging a VMD session to a log file. This will create a log file with
commands for all the actions taken during the session. The log file
may be played back later by using the `play' command or the Tcl `source' command. The only
actions recorded are those which change the state of the VMD
\
display, so straight Tcl commands are not saved. All of the core VMD
commands will write to the log. ??? Check the 'external' command
- filename: Turn on logging to filename.
- off: Turn off logging.
To write log information to the file `off', use the file name `./off'.
The menu forms of the GUI
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: Move a menu to the given ( x, y) location
list forms namds???
Load, modify, or delete a molecule in VMD. In the following, molecule_number is a string describing which
molecules are to be affected by the command. Is 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 filename(s) using the given format.
- 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 specified molecule.
- modstyle rep_number molecule_number rep_method: Change the current rendering method (style) for the given
representation in the specified molecule.
- modselect rep_number molecule_number
select_method: Change the current selection for the given representation
in the specified 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.
- modrep rep_number molecule_number: Using the current default settings for the atom selection, coloring, and rendering methods,
changes the given representation to the current defaults.
- 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.
Same as mol.
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.
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.
Same as exit.
Set up VMD to connect to or start a remote simulation program (optional).
- cancel: Cancel a remote simulation setup.
- run: Start a new remote simulation running, using the current
setup parameters.
- list [ all | jobs | apps | parameters ]: List properties of remote simulations.
- initialize computer [ username ]:
Make an initial connection to the provided remote computer, using the given
username or the current username if it is not specified. This will contact
the MDComm
daemon there and retrieve a list of remote applications and
running jobs.
- new application: Begin setting the parameters in order to
run a new simulation using the specified program (application).
- attach job: Attach to a remote job which has been previously
started by VMD
, and left running.
- readoptions filename: Read parameter settings from the given
file for the current remote simulation setup.
- writeoptions filename: Write out the current parameter
settings to a file, for user later by the `readoptions' command.
- setoption option [value ]:
Change the current setting for the given option the specified value. This is
used when setting the initial parameters before starting the simulation.
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.
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.
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.
Same as rot.
Same as rot.
Same as play.
Scale the current scene up or down.
- by f: Multiply scene scaling factor by f.
- to f: Set scene scaling factor to f.
Control the state of a remote simulation after it is connected (optional).
- list: Print information about remote simulations.
Simulations are numbered 0 ... N-1, where N is the current number of active
simulations.
- top sim_number: Set the top simulation.
- modify parameter value:
Change a parameter for the top simulation.
- patch < off | byatom | byload bynode
>: Display the patches from a simulation (if any), coloring them by
the specified criteria, for the top simulation.
- detach sim_number: Detach from a simulation, leaving it
running on the remote computer.
- kill sim_number: Kill a simulation.
Same as sim.
Position a checkerboard stage on the screen.
- location < off | origin | bottom | top | left | right | behind > :
- panels n: Set number of panels in stage.
Same as exit.
Initialize and control external spatial tracking devices.
- list: List running trackers.
- list avail: List available trackers.
- start tracker_number: Start a tracker.
- pause tracker_number: Pause a tracker.
- unpause tracker_number: Unpause a tracker.
- location tracker_number sensor: Print current location of sensor.
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.
Same as trans.
Add user-customized commands to the graphics display popup menu.
- add menu name: Add a new submenu name to the main popup
menu. The submenu will be initially empty, and will not appear until items
are added to it.
- add item name: Add a new menu item to the `User Command'
submenu of the main menu. If a command is specified, then when the
menu item is selected by the user that command will be executed as if it
had been typed at the console.
- add separator: Add a separator to the end of the
`User Command' submenu of the main menu.
- add subitem menu name: Add an item name to the
given subemnu, which must have been added already with an `add menu' command.
The given command will be executed when the item is selected by the user.
- add subseparator menu: Add a separator to the end of the
given submenu.
- add key key [ command ]: Assign the given
text command to the hot key key. When key is pressed while
the mouse is in the display window, the specified command will be executed.
- print < menus | keys >: Print out the current
definition of the user-defined menus, or the hot keys.
(Tcl) By default this procedure does not exist. If it is created,
(nearly) every command that affects the display state of VMD
is
passed to it as its single parameter. This can be used as an
alternative interface to the log command.
(Tcl) Returns information about this version of VMD
.
- version: Returns the version number;
- versionmsg: Full information about this version;
- authors: List of authors;
- arch: architecture type (in case you couldn't tell);
- options: options used to compile VMD
;
- www: VMD
home page;
- wwwhelp: VMD
help page.
This function is available without Tcl and the information is
displayed to the screen.
Specify a number of seconds to wait before reading another command.
Next: Vectors and Matricies
Up: Text User Interface
Previous: Tcl
Andrew Dalke
Tue May 14 16:49:45 CDT 1996