Difference between revisions of "Jmol JavaScript Object/JSV"

From Jmol
Jump to navigation Jump to search
(getting specialized subsections out of the main Jmol-JSO page)
(getting specialized subsections out of the main Jmol-JSO page)
Line 1: Line 1:
 
= Integration of JSpecView into Jmol-JSO =
 
= Integration of JSpecView into Jmol-JSO =
  
Extensive work in 2012 integrated [http://jspecview.sourceforge.net JSpecView] into Jmol 13. The full Jmol application includes a new "tools" menu item that opens a frame for JSpecView. For the applet, Jmol and JSpecView are two distinct applets that talk to each other using the Jmol <code>sync</code> command. '''Jmol-JSO''' brokers this transaction and allows coordinated applet start-up so that one applet does not send a command to the other before both are ready.  
+
Extensive work in 2012 integrated [http://jspecview.sourceforge.net JSpecView] into Jmol 13.  
 +
* The '''Jmol application''' now includes a new <code>tools</code> menu item that opens a frame for JSpecView.
 +
* The '''Jmol applet''' can communicate to and from a JSpecView applet in the same page, using the Jmol <code>sync</code> command. '''Jmol-JSO''' brokers this transaction and allows coordinated applet start-up so that one applet does not send a command to the other before both are ready.  
  
Associated with this integration, we have designed a [http://chemapps.stolaf.edu/jmol/docs/misc/Jmol-JSpecView-specs.pdf specification] for an extension of the JCAMP-DX format that allows one JDX file to contain Jmol-readable models and peak information, allowing the user to click on, for example, a carbon atom in Jmol and have the C-13 NMR spectrum automatically display and highlight the associated peak in JSpecView.  
+
This makes it possible to tie 3D models to IR, NMR, UV/VIS, GC, and GC/MS spectra, using the JCAMP-DX Version 6 standard.
  
For a demonstration of the Jmol/JSpecView connection, see the [http://chemapps.stolaf.edu/jmol/jspecview JSpecView subdirectory] at chemapps.stolaf.edu or the demo pages at [http://wwwchem.uwimona.edu.jm/spectra/JSpecView/ the University of the West Indies].
+
Associated with this integration, we have designed a [http://chemapps.stolaf.edu/jmol/docs/misc/Jmol-JSpecView-specs.pdf specification] for an extension of the JCAMP-DX format that allows one JDX file to contain both Jmol-readable 3D models and peak information, allowing the user to click on, for example, a carbon atom in Jmol and have the C-13 NMR spectrum automatically display and highlight the associated peak in JSpecView.
 +
 
 +
For a demonstration of the Jmol <-> JSpecView connection, see the [http://chemapps.stolaf.edu/jmol/jspecview JSpecView subdirectory] at chemapps.stolaf.edu or the demo pages at [http://wwwchem.uwimona.edu.jm/spectra/JSpecView/ the University of the West Indies].
  
 
== Creating and inserting the JSpecView applet ==  
 
== Creating and inserting the JSpecView applet ==  

Revision as of 21:05, 25 February 2013

Integration of JSpecView into Jmol-JSO

Extensive work in 2012 integrated JSpecView into Jmol 13.

  • The Jmol application now includes a new tools menu item that opens a frame for JSpecView.
  • The Jmol applet can communicate to and from a JSpecView applet in the same page, using the Jmol sync command. Jmol-JSO brokers this transaction and allows coordinated applet start-up so that one applet does not send a command to the other before both are ready.

This makes it possible to tie 3D models to IR, NMR, UV/VIS, GC, and GC/MS spectra, using the JCAMP-DX Version 6 standard.

Associated with this integration, we have designed a specification for an extension of the JCAMP-DX format that allows one JDX file to contain both Jmol-readable 3D models and peak information, allowing the user to click on, for example, a carbon atom in Jmol and have the C-13 NMR spectrum automatically display and highlight the associated peak in JSpecView.

For a demonstration of the Jmol <-> JSpecView connection, see the JSpecView subdirectory at chemapps.stolaf.edu or the demo pages at the University of the West Indies.

Creating and inserting the JSpecView applet

To create a JSpecView applet, use Jmol.getJSVApplet().

Syntax:

Jmol.getJSVApplet = function(id, Info)

JSpecView-specific methods

All these functions must be applied to the unique Jmol object (this name is literal, cannot be changed) --see syntax and examples below.

Syntax:

Jmol.jsvAddHightlight = function(jsvApplet, x1, x2, r, g, b, a) 
Jmol.jsvExport = function(jsvApplet, exportType, n) 
Jmol.jsvGetCoordinate = function(jsvApplet) 
Jmol.jsvGetPropertyAsJavaObject = function(jsvApplet, key) 
Jmol.jsvGetPropertyAsJSON = function(jsvApplet, key) 
Jmol.jsvGetSolnColour = function(jsvApplet) 
Jmol.jsvIsPro = function(jsvApplet) 
Jmol.jsvIsSigned = function(jsvApplet) 
Jmol.jsvLoadInline = function(jsvApplet, data, params)
Jmol.jsvRemoveAllHighlights = function(jsvApplet) 
Jmol.jsvRemoveHighlight = function(jsvApplet, x1, x2)
Jmol.jsvReversePlot = function(jsvApplet) 
Jmol.jsvRunScript = function(jsvApplet, script)
Jmol.jsvRunScriptNow = function(jsvApplet, script) 
Jmol.jsvSetFilePath = function(jsvApplet, tmpFilePath) 
Jmol.jsvSetSpectrumNumber = function(jsvApplet, n) 
Jmol.jsvSetVisible = function(jsvApplet, TF)
Jmol.jsvSyncScript = function(jsvApplet, peakScript)
Jmol.jsvToggleCoordinate = function(jsvApplet)
Jmol.jsvToggleGrid = function(jsvApplet) 
Jmol.jsvToggleIntegration = function(jsvApplet)
Jmol.jsvWriteStatus = function(jsvApplet, msg)

Contributors

AngelHerraez