On Tue, Jan 21, 2014 at 1:15 AM, Otis Rothenberger <[email protected]>wrote:

> 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?
>

Trust me, you are using AJAX if this is JSmol/HTML5.


>
> 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
>
>
Possibly. At least for known compounds. Does this fail gracefully?

He could also just use these

x = script("show chemical inchi")
x = script("show chemical smiles")
x = script("show chemical cas")  // but produces a list

which are all from NCI.


> 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
>
>
Bob
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to