PyMOL Web Services

### Running the sample applictions

We are currently using the "Helper Application" approach to automatically launch the PyMOL HTTP server from a web browser. This approach works reliably with Internet Explorer and Firefox, but it does not work well with Safari due to (insurmountable?) security restrictions built into that browser. Therefore, if using Mac OS X, we recommend using FireFox instead of Safari.

The sample links to PWG files should cause PyMOL to launch on your desktop. The first time you click on these links, your browser will ask how it should handle this file type. You must select THE EXACT COPY OF PYMOL INCLUDED WITH THIS DELIVERABLE as the helper application for .pwg files in order to get PyMOL to launch with the Web Services interface. Otherwise, if you select another copy of PyMOL, then PyMOL may indeed launch, but the sample applications will fail to work.

For each sample application, a new tab (or new page, depending on how you have your browser set up) will open explaining how this sample application works.

Each page consists of some explanatory text and links that will cause PyMOL to respond: perhaps loading a protein, highlighting an active site, or aligning multiple proteins and orienting the view. Don't forget to click on the "view page source" link at the top of each sample application page.

The main index file with sample application links is located at

    ./modules/web/examples/index.html

If you are reading this file from within a browser, then you may return to it now in order to try the sample applications.

However, if for some reason you are reading this file from a text editor, then to run the demonstration applications, you can either open the above file directly inside a browser or start a local web server which will mimic the role of your remote enterprise web server in delivering that file to your browser.

A simple python script with an HTTP server (justhttpd.py) is included for this purpose, and it will automatically open up a web browser pointing at the server it launches.

    # from within the PyMOL folder

    cd ./modules/web/examples

    # then

    python justhttpd.py

    # or, if python is not handy, you can use PyMOL as a command-line Python interpreter:

    ../../../../pymol -qc justhttpd.py

This will start a web browser that will automatically load the index.html file.