Bob,

The following Jmol script runs cross domain:

var x = load("http://chemagic.com/models.aspx?smi2stdinchi=CCC";);var y = 
load("http://chemagic.com/models.aspx?inchi2cas="; + x);var z = 
"http://webbook.nist.gov/cgi/cbook.cgi?Spec=C"; + y + 
"&Index=0&Type=IR&Large=on&SVG=on";show url @z

First a Question: Am I (is Jmol) getting away with something that would not 
work via AJAX?

More to the point, this might be a way for Pino to get IR and MS spectra from 
NIST hooked to models in his JSmol windows. He'd have to use the following to 
grab the SMILES of his model:

var s = {*}.find('SMILES');var x = 
load("http://chemagic.com/models.aspx?smi2stdinchi="; + s);var y = 
load("http://chemagic.com/models.aspx?inchi2cas="; + x);var z = 
"http://webbook.nist.gov/cgi/cbook.cgi?Spec=C"; + y + 
"&Index=0&Type=IR&Large=on&SVG=on";show url @z

For mass spectra the IR in the query string is simply changed to Mass. The 
script is using Resolver to get the inchi. The cas is actually coming from 
NIST. Using smi2stdinchi2 rather than smi2stdinchi switches the smiles to inchi 
over to ChemSpider.

Caveats:

1) The inchi-->CAS resolution is from chemagic.
2) Jmol script running in this sequential load approach locks the page until 
the script finishes.
3) pop-ups have to be set as ok for the page.
4) The SMILES really needs to be URL escaped.

Pino, Put a model in a JSmol window and run that bottom script from the console 
to see what's going on.

Otis


--
Otis Rothenberger
o...@chemagic.com
http://chemagic.com




On Jan 20, 2014, at 7:44 PM, Robert Hanson <hans...@stolaf.edu> wrote:

> Sure, that would be fine. It is what I am working on right now, actually. But 
> this is 1H NMR. Still working on 13C prediction. No similar page for IR. 
> 
> 
> On Mon, Jan 20, 2014 at 2:47 PM, pino.stricc...@libero.it 
> <pino.stricc...@libero.it> wrote:
> Bob, I want to add to my blog the page 
> (http://chemapps.stolaf.edu/jmol/jsmol/jsv_predict.htm) where you can predict 
> CNMR spectrum from a JMSE designed molecule, quoting everything possible.
> Is it possible? Any problem or requirment?
> Is there any similar page for IR spectra ? 
> Pino
> 
> 
> 
>  
> 
> 
> 
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
> 
> 
> If nature does not answer first what we want,
> it is better to take what answer we get. 
> 
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to