11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

12.3 Startup Files12.3.1 Core Script FilesIn the following, the value of $<strong>VMD</strong>DIR is the vmd installation directory. During the original installationthis is the value of INSTALLLIBDIR. It can also be found by looking at the first few linesof the vmd startup script (head ‘which vmd‘) or by starting <strong>VMD</strong> and using the command setenv(<strong>VMD</strong>DIR).As mentioned elsewhere, <strong>VMD</strong> uses the Tcl interpreter. <strong>VMD</strong> read Tcl scripts at initialization,which are contained in <strong>VMD</strong> distribution. The locations of the scripts is determined by theTCL LIBRARY environment variable, which is set in the vmd startup script to $<strong>VMD</strong>DIR/scripts/tcl.In addition, <strong>VMD</strong> has its own directory of core Tcl routines.The most important of these is $<strong>VMD</strong>DIR/scripts/vmd/vmdinit.tcl. This file sets up the basicTcl initialization commands, defines some environment variables, and adds the vmd script directoryto the Tcl autoindex path. Most of the other files are referenced through the auto path.There are a few non-Tcl scripts in this directory. Currently these are perl scripts used for theurlload command and web client startup (see section 8.3.19 and section 12.4).12.3.2 User Script FilesA user-written run-time command file, .vmdrc on Unix, vmd.rc on Windows, can be used with alist of initial <strong>VMD</strong> text commands to process. This file may be changed to customize individualuser’s initial screen appearance and to set the proper display characteristics for displaying in stereo.If it does not exist, default values are used.12.3.3 .vmdrc and vmd.rc FilesAfter everything is initialized, <strong>VMD</strong> reads the startup file using the equivalent of the command play.vmdrc. This file contains text commands for <strong>VMD</strong> to execute just as if they had been entered atthe <strong>VMD</strong> text console command prompt. The file can contain any number of commands, includingblank lines and comment lines (which begin with the # character). If an error is encountered whilereading this file, the command in error is skipped and processing of the file continues.<strong>VMD</strong> searches for this file in three locations on Unix; ./.vmdrc, $HOME/.vmdrc and $<strong>VMD</strong>DIR/.vmdrc.On Windows, <strong>VMD</strong> searches in ./vmd.rc, $HOME/vmd.rc and $<strong>VMD</strong>DIR/vmd.rc. Only the first filefound will be read in and processed.See chapter 8 for a description of the <strong>VMD</strong> text commands which may be put in this file. Also,section 4.1.3 discusses how to put commands into the .vmdrc file to customize the behavior of thehot keys.Here is an example of a startup file:# add personalized keyboard shortcutsuser add key E echo onuser add key e echo offuser add key g display resetuser add key A stage location bottomuser add key m mol list# position the stage and axes176

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!