User:Eric Martz/How JSmol works: Difference between revisions
Eric Martz (talk | contribs) |
Eric Martz (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
==Invoking JSmol== | ==Invoking JSmol== | ||
The | The web page invokes JSmol, specifying a position on the page and a size. Generally, there is a JavaScript ''Info'' variable (Info = {...}) that specifies whether JSmol or Jmol is to be invoked, the size in pixels, and optionally the initial molecule to be displayed, and the display style (JSmol script commands), and other options. This Info variable is then referenced in the actual invocation of JSMol. | ||
The actual invocation generates the necessary HTML by a JavaScript call to Jmol.getApplet() or Jmol.getAppletHtml(). | The actual invocation generates the necessary HTML by a JavaScript call to Jmol.getApplet() or Jmol.getAppletHtml(). | ||
Examples can be seen in the files supersimple.htm, simple.htm, simple_old.htm, etc. These and other demonstration files will be found in the jsmol directory in the downloaded package from [http://jmol.sourceforge.net/download/ jmol.sourceforge.net/download]. You can drag these files and drop them into | Examples can be seen in the files '''supersimple.htm, simple.htm''', simple_old.htm, etc. These and other demonstration files will be found in the <u>jsmol</u> directory in the downloaded package from [http://jmol.sourceforge.net/download/ jmol.sourceforge.net/download]. You can drag these local files from the downloaded file set, and drop them into the '''Firefox or Safari''' web browsers (or Internet Explorer, but it runs JSmol very slowly), to see the web pages they generate. (Local files that invoke JSmol do not work when dropped into Chrome or Edge.) | ||
==Displaying Molecules== | ==Displaying Molecules== | ||
Line 19: | Line 19: | ||
Such molecular structure data files are called [[atomic coordinate files]]. JSmol is able to read more than 50 formats of such files. The most common are XYZ format for small organic compounds (usually <100 atoms), and [[PDB file|PDB or mmCIF formats]] for macromolecules. | Such molecular structure data files are called [[atomic coordinate files]]. JSmol is able to read more than 50 formats of such files. The most common are XYZ format for small organic compounds (usually <100 atoms), and [[PDB file|PDB or mmCIF formats]] for macromolecules. | ||
Small molecule structures are available from [https://chemapps.stolaf.edu/jmol/docs/#load several large databases]. The international repository of macromolecular structures is the [[Protein Data Bank]]. The most reliable macromolecular structures are determined experimentally by [[X-ray crystallography]], [[Nuclear magnetic resonance]], or cryo-electron microscopy. Macromolecular models determined from [[Theoretical models|theory]] are much less reliable, and are excluded from the [[Protein Data Bank]]. | |||
==Chemical Bonds== | ==Chemical Bonds== | ||
Line 31: | Line 33: | ||
Green links in Proteopedia use JavaScript to send scripts of commands to JSmol to change the rendering and coloring of the molecular scene, as well as the center of rotation, the degree of zooming, and many other options. In other web pages (e.g. Proteopedia's [[Scene Authoring Tools]], [[FirstGlance in Jmol]], or the simple.htm example mentioned above), buttons and forms use JavaScript to send command scripts to JSmol. | Green links in Proteopedia use JavaScript to send scripts of commands to JSmol to change the rendering and coloring of the molecular scene, as well as the center of rotation, the degree of zooming, and many other options. In other web pages (e.g. Proteopedia's [[Scene Authoring Tools]], [[FirstGlance in Jmol]], or the simple.htm example mentioned above), buttons and forms use JavaScript to send command scripts to JSmol. | ||
==See Also== | |||
*[http://firstglance.jmol.org/fgij/whatis.htm What Is FirstGlance in Jmol?] Includes a brief description of how it works at the end. |