This is a step-by-step guide for setting up interactive on-line
presentations that use VMD. Please see the Web Control of VMD
page for more information.
Step 1: Installing and configuring VMD
Before you begin making interactive web pages, you will need to download and install VMD. If you are using Windows,
you must have version 1.7.1 or later.
Step 2: Configuring your browser
After installing VMD, you will need to configure your browser to use VMD. Almost any web
browser will work, but some require special options. Follow the
instructions carefully, and make sure that everything is working
before proceeding to the next step. To try out VMD with your browser,
take a look at our demo page.
Step 3: Download the demo page
To get started writing VMD-enabled web pages, download a copy of the
demo page as demo.zip or demo.tgz, and unpack it in a web-accessible
directory. If you are using the Apache webserver, the demo should
work immediately. Enter the URL that corresponds your copy of the
demo, and it should work just as before.
Step 4: Add your own molecule
You can now begin creating your own presentation. The first thing you
will probably want to do is to remove the included
one_glpf.pdb and replace it with your own molecule
(probably another PDB file.)
To make the web page load your molecule, edit the included file
control.vmd . Change the URL in line (about half-way down
the file)
newurlload pdb "http://www.ks.uiuc.edu....."
to refer to your molecule. For example, if your copy of the demo is
on the web at http://www.foo.net/demo/ , and you copied
the file mymolecule.pdb into the demo directory, you
replace that line with
newurlload pdb "http://www.foo.net/demo/mymolecule.pdb"
Remove the commands below this that set up the representations for GlpF correctly - you will want to use different representations for you own molecule.
Reload your demo page, and you should see VMD load your molecule
instead of GlpF.
Step 5: Select a list of VMD commands
You will now start creating the list of commands that you want your
web page to send to VMD. If you are not very familiar with VMD
scripting, there is an easy way to create good commands: type
logfile logfile.txt , then use VMD to display your
molecule in interesting ways. The commands the VMD executes will be
saved to the file logfile.txt . Look through this file
for the commands you want. You may try them out by typing them
directly into VMD's text console.
Step 6: Add your commands to the script
Once you have selected some useful VMD commands, you can add them to
the script control.vmd . At the end of this file are
lines like
proc filteron { } { mol modstyle 3 top "VDW" }
Add your own proc s to these:
proc mycommand { } {
my command 1
another command 5.5
}
...
Pick descriptive names (better than mycommand ) for the
proc s - you will use the names to refer to these commands
in your web page.
Step 7: Make your commands into links
For each proc that you defined in
control.vmd , make a link in main.html like
this:
<a href="http://127.0.0.1:2000/mycommand"
target="invisible">link text</a>
Reload your web page. Clicking on the links should now run the VMD
commands that you selected.
Step 8: Write the text of your web page
Replace the rest of main.html with your own text, and put
the links you have made to your VMD commands in useful places, to
create an interactive tour of your molecule. Make sure to keep a link
back to
http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/webvmd/
so that visitors to your page will be able get help configuring their
browsers to display your molecule.
Step 9: Add graphics to your web page
To finish the page, use VMD to render a picture or two of your
molecule, and add it to your web page. This will help guide visitors
through your tour, and will make it possible for people without VMD to
see what you are talking about.
For more information...
If you need help getting this to work, take a look at our
web page or send us email at vmd@ks.uiuc.edu
|