GLmol exporter for Pymol

About

This pymol scripts lets you export a scene from Pymol to GLmol, a molecular viewer for Web browsers written in WebGL/Javascript.

With this script, you can publish your Pymol scene for Web page. Visitors can rotate, zoom the molecule on the page.

Compared to exporting 3D coordinate (VRML or Object3D), published pages contain atomic coordinate so that the file size is much smaller and visitors can even change representation.

Examples

The following scenes were created in Pymol and then exported to GLmol. You can open exported files by clicking the image. It takes 5 to 10 seconds to load the page.



This model is from PDBID 2POR, "Structure of porin refined at 1.8 A resolution" by Weiss, M.S., Schulz, G.E. published on J.Mol.Biol. 227: 493-509(1992).

Features

Currently the followings are exported.

Support for surface representation and multiple molecules is under development.
Orthoscopic projection ("set orthoscopic on" in Pymol) will be supported soon.

System requirements

GLmol runs on newer versions of Firefox, Chrome, Safari or Opera. Internet Explorer is not supported because IE doesn't implement WebGL. GLmol also runs on Sony Ericsson's Android devices which support WebGL. Support for Firefox Mobile is currently underway. Reportedly, GLmol also runs on WebGL enabled safari in iOS.

If you see only black screen and you are using

Beta version

You can try beta version below. Most core features are implemented but there are some bugs remaining.

You can download them from the following link.

How to use

  1. Download and unzip the distribution.
  2. Make a scene in Pymol.
  3. Change directory to the directory where the package has been extracted. For example,
    cd ~/pymol_exporter/
  4. Load the script.
    run exportToWeb.py
  5. Run the script.
    exportToWeb ObjectNameToExport
    ObjectNameToExport is the name of the molecule to be exported (see the right part of the Pymol window). Please note that it is not 'selection name'.
  6. Now "ObjectNameToExport.html" is created in your current directory. Open it with your browser. To put it on the net, please upload "js" folder with it.

Contacts

Comments and suggestions are welcome. Please mail to biochem_fan at users.sourceforge.jp or write in the forum.

SourceForge.JP