Skip to content

Notes on the current status of embeddable Javascript protein structure viewers

Currently, I work on the development of the PPI3D web server which is intended for the search and analysis of the structural data on protein-protein interactions. One of the features of this web server is the visualization of the protein structures in an embedded viewer. In the earliest version of my software, the structures were shown using Jmol. However, Jmol is a Java applet, and usage of Java applets is not encouraged now because of security issues. Therefore, the simple solution of switching from Jmol to JSmol was applied. JSmol is the same Jmol compiled to Javascript, thus it is very similar to Jmol but does not require any additional software. Unfortunately, it has some limitations, therefore I have decided to check the capabilities of other Javascript-based protein structure visualization tools.

The PPI3D web server should allow analyzing all protein-protein interaction data available in the PDB. In order to use the same visualization method for all structures, the desired software should meet the following criteria:

  • processing of not only PDB-formatted structure files, but also the mmCIF files, as not all PDB entries have structures in PDB format;
  • ability to open gzipped files, that are downloaded from the PDB and saved in the server;
  • at least minimal scripting possibilities in order to show the interface properties using predefined scripts.

3 protein viewers have been analyzed:

  • JSmol;
  • PV;
  • NGL Viewer.

As I said, JSmol is the same Jmol compiled to Javascript. The installation of this viewer is complicated: you should download Jmol zip from some deep place hidden from Google Search, find JSmol zip inside it, and then use the whole directory, as JSmol somehow depends on multiple files in it. Embedding might look also complicated, especially if you did not do it before, but it is described well in the documentation. The overall documentation is extensive and description of multiple features can be found there. JSmol opens PDB and mmCIF files, and gzipped files can be opened as well (there were some problems regarding this in one of the previous versions, but now they seem to be fixed). The visualization is scriptable using Rasmol-like syntax. Moreover, a console can be opened for users to input their own commands.

The main disadvantage of JSmol is that the structures take very long to load. It even makes the entire website irresponsible for some time. In addition, JSmol does not use WebGL, therefore any actions with the structure are quite slow. Therefore, the possibilities to use alternative viewers were analyzed.

PV is currently used by SWISS-MODEL and also in the RCSB Protein Data Bank website. It uses WebGL for rendering. The installation of this viewer is simple: several methods are provided in the documentation, and only one file is necessary for embedding it into a website. The features and API of PV are described in detail. The viewer is scriptable using Javascript, which might be an issue for non-computational protein researchers. The major problem with PV is that it opens only PDB-formatted files, therefore it is not suitable for the PPI3D website.

NGL Viewer was released recently as a web server. It is a feature-rich and user-friendly software for visualization of macromolecular structures. NGL may even serve as a web app to replace desktop protein structure viewers (such as Pymol or Chimera) in case of simple analysis. It has also embedding functionality which is similar to that of PV: only one file is necessary, and embedding is described well in the documentation. The NGL Viewer can open PDB and mmCIF files, gzipped files are also supported. Unfortunately, the documentation of this software is really sparse. I could not develop any custom features in the embedded NGL Viewer after reading it. As a result, this viewer can be only used as a web server, the current status of documentation does not allow using it as embedded viewer in custom applications for protein research as the API is simply not documented.

Finally, after the investigation of three Javascript-based protein structure viewers, I decided to keep the JSmol in the PPI3D web server. The main disadvantage of this software is longer loading of the structures, however, the possibilities to use both PDB and mmCIF files and simple implementation of the custom visualization features compensates for it.

Additional note: after finishing the development using JSmol and writing this short article, I found another newly published structure viewer, 3Dmol.js. Seems like this software can handle mmCIF files (but not gzipped ones) and is better documented than NGL Viewer, therefore the possibility to use it as embedded structure viewer should be also considered.

One Comment

  1. Kirilas wrote:

    Actually, JSMol states that it has WebGL support, though incomplete. Yet, using it in pure HTML5 mode may be viewed as both advantage (runs on browsers without WebGL support) and disadvantage (slow).

    Trečiadienis, rugpjūčio 5, 2015 at 15:09 | Permalink
Dienos akcijos | Dovanos | Nuolaidos
Uždaryti
Eiti prie įrankių juostos