User:Eric Martz/JSmol Notes: Difference between revisions

Eric Martz (talk | contribs)
Eric Martz (talk | contribs)
 
(29 intermediate revisions by the same user not shown)
Line 5: Line 5:
Of course there are huge advantages to using JSmol:
Of course there are huge advantages to using JSmol:
*Users of a JSmol website do not need to install [[Java]] (which is a [[Java#Java_is_a_security_threat|likely security risk]]).
*Users of a JSmol website do not need to install [[Java]] (which is a [[Java#Java_is_a_security_threat|likely security risk]]).
*The very popular Google Chrome browser no longer supports Java.
*The very popular Google Chrome browser no longer supports Java, nor does Edge (the new browser in Windows 10). Opera plans to remove support for Java.
*A JSmol website will likely work on iPads and smart phones. (Java is not available for these platforms, so Jmol is not an option for them.)
*A JSmol website will likely work on iPads and smart phones. (Java is not available for these platforms, so Jmol is not an option for them.)


Line 22: Line 22:
Atoms (Kilo)
Atoms (Kilo)
</td><td>
</td><td>
KD ([[Asymmetric Unit]])
kDa* ([[Asymmetric Unit]])
</td>
</td>
</tr>
</tr>
Line 31: Line 31:
1.7
1.7
</td><td>
</td><td>
28
24 (28)
</td>
</td>
</tr>
</tr>
Line 40: Line 40:
6
6
</td><td>
</td><td>
87
77 (87)
</td>
</tr>
<tr>
<td>
[[2v61]]
</td><td>
9
</td><td>
107 (120)
</td>
</td>
</tr>
</tr>
Line 48: Line 57:
</td><td>
</td><td>
12
12
</td>
<td>
142 (160)
</td>
</tr>
<tr>
<td>
[[5ibx]]
</td><td>
</td><td>
160
17
</td><td>
202 (215)
</td>
</td>
</tr>
</tr>
Line 58: Line 77:
23
23
</td><td>
</td><td>
233
220 (233)
</td>
</td>
</tr>
</tr>
Line 67: Line 86:
45
45
</td><td>
</td><td>
826
602 (826)
</td>
</td>
</tr>
</tr>
Line 77: Line 96:
</td><td>
</td><td>
900
900
</td>
</tr>
<tr>
<td>
[[3j9q]]
</td><td>
99.6
</td><td>
1,314 (1,424)
</td>
</td>
</tr>
</tr>
Line 85: Line 113:
57 (2.7K x 21 NMR models. Includes hydrogen.)
57 (2.7K x 21 NMR models. Includes hydrogen.)
</td><td>
</td><td>
416 (20K x 20 NMR models)
416 = 19.8K x 21 NMR models (416)
</td>
</td>
</tr>
</tr>
<tr><td colspan="3">
<tr><td colspan="3">
Models with &gt;10,000 atoms are in the largest ~10% of the [[PDB]]; with &gt;20,000 atoms, the largest ~5%; with &gt;50,000 atoms, the largest ~1.5% (counting all models for NMR ensembles).
Models with &gt;10,000 atoms are in the largest ~10% of the [[PDB]]; with &gt;20,000 atoms, the largest ~5%; with &gt;50,000 atoms, the largest ~1.5% (counting all models for NMR ensembles).
<br>
<nowiki>*</nowiki> kDa excluding water as reported by Jmol (print {not hoh}.mass.sum). RCSB molecular weights are sometimes much larger for obscure reasons. RCSB report is in parentheses.
</td>
</td>
</tr>
</tr>
Line 102: Line 132:
*Proteopedia loads only amino acid alpha carbon atoms (or nucleic acid phosphorus atoms) and ligand atoms, since its ribbon view (secondary structure schematic) works fine without the other atoms. A prominent message is displayed that a ''simplified model'' is being shown, and there is a button to load the complete model. For registered users who are logged in, Proteopedia has a preference setting that will use Jmol_S instead of JSmol.
*Proteopedia loads only amino acid alpha carbon atoms (or nucleic acid phosphorus atoms) and ligand atoms, since its ribbon view (secondary structure schematic) works fine without the other atoms. A prominent message is displayed that a ''simplified model'' is being shown, and there is a button to load the complete model. For registered users who are logged in, Proteopedia has a preference setting that will use Jmol_S instead of JSmol.


====Poor performance in Internet Explorer, Edge and Opera====
====Poor performance in Internet Explorer & Edge====
 
JSmol runs in the javascript of the browser (HTML5). Different web browsers operate JSmol with very different performances. '''Chrome runs JSmol best''', Safari is good, and Firefox is usually OK (see note under table below). '''Internet Explorer is unacceptably slow''' (all versions, including version 11), and [http://www.netmarketshare.com it is the most widely used browser]. In '''Opera, rotation of the molecule is slow and jerky'''.
 
*FirstGlance in Jmol detects the browser being used, and recommends a different browser when being displayed in Internet Explorer or Opera.


The findings below are based primarily on tests with [[FirstGlance in Jmol]], and possibly results may be different for other JSmol websites.
JSmol runs in the javascript of the browser. Different web browsers operate JSmol with very different performances (see [[JSmol/Rotation Speeds]]), and the performances vary as browser versions are updated. '''Internet Explorer has always been unacceptably slow''' (all versions, including version 11), but since early 2016, it is [http://www.netmarketshare.com no longer the most widely used browser].


<table style="background:#ffffa0;" border="1" cellpadding="10"><tr><td>
<center><span style="font-size:130%;">For current recommmendations, see  [[JSmol/Rotation Speeds]].</span></center>
Snapshot graphic table is temporarily unavailable in Proteopedia but '''[https://flic.kr/p/zHpKBU can be viewed here]'''.
</td></tr></table>


<!--[[Image:Jsmol-vs-browsers.png|center]]-->
FirstGlance in Jmol detects the browser being used, and recommends the optimal browser when another browser is used.
The above snapshot is taken from [[FirstGlance in Jmol]]. For more details, see the [http://bioinformatics.org/firstglance/fgij/notes.htm#browsers Notes for FirstGlance].


==Converting Websites from Jmol to JSmol==
==Converting Websites from Jmol to JSmol==
Line 138: Line 161:
  --></pre>
  --></pre>


Add these two lines. Jmol2.js replaces Jmol.js, defining the same functions you were already using in Jmol.js.
Add these two lines. Jmol2.js replaces Jmol.js, defining the same functions you were already using in Jmol.js. The order of these two lines is critical: '''JSmol.min.js must come before Jmol2.js'''.


<pre><script type="text/javascript" src="jsmol/JSmol.min.js"></script>
<pre><script type="text/javascript" src="jsmol/JSmol.min.js"></script>