JSmol/Rotation Speeds

From Proteopedia

Jump to: navigation, search

JSmol is the default form of Jmol used in Proteopedia and FirstGlance in Jmol. JSmol is used here to mean the HTML5/Javascript (non Java) application working within a web browser (see Jmol has four forms). The "JS" in JSmol refers to JavaScript. As mentioned in JSmol Notes, JSmol is substantially slower than the Jmol Java applet. With the exception of performance speed, both forms of Jmol have identical capabilities.

Performance of JSmol depends on the underlying performance of the javascript in the browser being used. With smaller macromolecules (under about 2,000 atoms) performance is generally good in all browsers except Internet Explorer. With larger macromolecules, the choice of browser becomes more important for optimal performance.



Update May 2016 for JSmol:

In some browsers where spinning performed well, rotation of large models (7ahl, 22K atoms) with the mouse was very jerky.

  • Windows (JSmol, no Java):
    • Firefox performs best.
    • Chrome, Opera, Maxthon: Spinning is good, and rotation by mouse was deemed OK although not quite as good as in Firefox.
    • Edge: spinning and rotation by mouse are very jerky.
    • Internet Explorer remains unacceptably very slow and jerky.
  • Mac OS X (JSmol, no Java):
    • Firefox performs best.
    • Safari, Maxthon: Spinning is as good as Firefox, but rotation by mouse is jerkier.
    • Chrome: Both spinning and rotation by mouse are jerkier than in Firefox.
    • Opera: Unacceptably slow and jerky.

In December, 2015:

  • Firefox and Safari outperform all other popular browsers for smoothness and speed of rotation, and therefore are the recommended browsers for websites that use JSmol such as Proteopedia and FirstGlance in Jmol.
  • Chrome and Opera rotate molecules in JSmol about 4-fold slower than Firefox (or Safari) for cartoon rendering, and almost 2-fold slower for spacefilled rendering. That is, they generate fewer frames/second, so rotation or spinning is less smooth or more jerky.
  • Edge (the new browser in Windows 10) is almost 4-fold slower than Firefox for both cartoon and spacefilled renderings.
  • Internet Explorer 11 gives unacceptably slow rotation of molecules in JSmol, with a performance about 9-fold slower than that of Firefox.

Historical note: In 2014, Chrome outperformed Firefox. Changes in Chrome in 2015 reduced its performance for rotating molecules in JSmol. In December, 2015, a change in Chrome (first in version 47) made it unable to rotate molecules in JSmol satisfactorily. As the mouse moved, the molecule remained fixed until the mouse movement stopped, whereupon the molecule jumped to the final position in one step. Bob Hanson was able to work around the change in Chrome with a modification to JSmol, but frames/second are still poorer than they were in Chrome in 2014.
  • The Jmol Java applet is only 1.4-1.8 fold faster in Firefox, but 20-fold faster in Internet Explorer.

Data (December, 2015)

JSmol (Javascript)

Tests below were done in FirstGlance in Jmol in the default HTML5/javascript mode. In order to slow down rotation to enable manual counting of frames/second, a large molecule was used: 1g3i, a single model with 45,528 atoms (which puts it in the largest ~2% of entries in the PDB). Tests were done in a browser window approximately 1,900 x 1000 pixels on a late 2014 MacBook Pro (2.2 GHz Intel Core i7 with 1600 MHz DDR3 RAM). Windows 10 was a virtual machine (VMware) on the Mac, running at native speed on the Mac's Intel processor. With spinning on, the number of frames in 10 or 20 sec was counted and used to calculate frames/second. Browsers were the versions current in December, 2015.

Frames/Second in Cartoon, Spacefill
JSmol without Java
Operating System Firefox Safari Chrome Internet Explorer 11 Edge Opera Maxthon Torch*
Windows 10 3.9, 4.3 n/a 1.05, 2.7 0.45, 0.45 1.1, 1.25 1.0, 2.4 1.5, 2.5 1.6, 3.0
Mac OS 10.10.5 4.2, 4.1 4.0, 3.3 1.05, 2.95 n/a n/a (failed) 4.2, 3.5 n/a

"n/a": not available.
* Despite a high review, Torch seems a rather iffy browser. It is accused of hijacking and does not identify itself in navigator.userAgent.

Jmol (Java applet)

Because Java is so much faster than Javascript, the spinning was further slowed by clicking the "Zoom Larger" button in FirstGlance twice.
(Torch does operate Java in Dec. 2015.)

Frames/Second in Cartoon
JSmol without Java - Jmol Java applet
Operating System Firefox Safari Chrome Internet Explorer 11 Edge Opera Maxthon
Windows 10 3.2, 4.7 n/a No Java 0.3, ~7 no Java n/d 0.2,
Mac OS 10.10.5 3.3, 6 3.0, ~7 no Java n/a n/a (failed) No Java

"n/a": not available. "n/d": not determined.

See Also

Proteopedia Page Contributors and Editors (what is this?)

Eric Martz

Personal tools