11.07.2015 Views

VMD User's Guide

VMD User's Guide

VMD User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

axes location lowerleftstage location off# position and turn on menusmenu main move 5 196menu display move 386 90menu graphics move 5 455menu files move 5 496menu main on# start the scene a-rockin’rock y by 112.4 Using <strong>VMD</strong> as a WWW Client (for chemical/* documents)Mosaic, Netscape, and possibly other browsers can be configured to use <strong>VMD</strong> as a helper applicationfor viewing some chemical/* documents.12.4.1 MIME typesWhen a web browser receives a document from a server it actually gets two pieces of information:the header and the body. The header contains information about the message and body. One ofthe most important pieces of data, called the MIME type specifies what the body of text describes.For instance, a GIF image is given the MIME type of image/gif, a JPEG image is image/jpg,and postscript is application/postscript. A class of types, chemical/*, has been created forchemical models so the MIME type for PDB files is chemical/pdb, for XYZ is chemical/xyz, etc.Helper ApplicationsThe web browser uses the MIME type to determine how to view the body of the message. Some ofthe documents are viewed by the browser itself, like text/html which describes HTML documents.In other cases, the browser has to start up another application. From here on, we’ll describe howMosaic and Netscape do this. First, it saves the incoming message body to a temporary file. Itthen scans the global and local mailcap files to determine which application is used to view thegiven MIME type. The application, which must take a file name on the command line, is thenexecuted. When the application exits, the temporary file is deleted.12.4.2 Setting up your .mailcapThe Unix versions of <strong>VMD</strong> have an extra -webhelper command line flag which causes <strong>VMD</strong> notto be spawned in the background, so that it has time to read temporary files downloaded by theweb browser. This command line flag is just slightly simpler to use than the chemical2vmd script,as it does not depend on having Perl installed, so may be more appropriate for some cases.In the <strong>VMD</strong> installation directory ($<strong>VMD</strong>DIR/scripts/vmd/) there is a perl script calledchemical2vmd which will create a <strong>VMD</strong> command file and execute <strong>VMD</strong>. Since <strong>VMD</strong> does notblock the calling process, Netscape and other web browsers cannot directly call <strong>VMD</strong>, as they do not177

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

Saved successfully!

Ooh no, something went wrong!