Re: [Jmol-users] new InChI option

2016-03-08 Thread Philip Bays
Some time ago I made a comment here about taxol.   It was a molecule I went to 
when testing jsmol.  It always loaded a nice 3D structure.   Then, it changed 
to the 2D structure that now loads. 

 
> On Mar 8, 2016, at 9:29 PM, Robert Hanson  wrote:
> 
> Whatever the problem is, it has to do with loading a trashy 2D structure 
> instead of a good 3D structure, apparently. 
> 
> I have placed a taxol structure in jsmol/data so you can see that it does 
> work: http://chemapps.stolaf.edu/jmol/jsmol/inchi.htm 
> 
> 
> I note that in creating this from the RCSB ligand TA1, I had to invent a new 
> way to write a MOL file:
> 
> load ==TA1
> write MOL0 "taxol.mol"
> 
> The new MOL0 format avoids use of the aromatic single and aromatic double 
> bond types 6 and 7. 
> (There is a bug in inchi.js that it cannot read these bond types.)
> 
> 
> Bob
> 
> 
> ​
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

Philip Bays
Emeritus Professor of Chemistry
Saint Mary's College
Notre Dame, IN 46556
pb...@saintmarys.edu


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Robert Hanson
Whatever the problem is, it has to do with loading a trashy 2D structure
instead of a good 3D structure, apparently.

I have placed a taxol structure in jsmol/data so you can see that it does
work: http://chemapps.stolaf.edu/jmol/jsmol/inchi.htm

I note that in creating this from the RCSB ligand TA1, I had to invent a
new way to write a MOL file:

load ==TA1
write MOL0 "taxol.mol"

The new MOL0 format avoids use of the aromatic single and aromatic double
bond types 6 and 7.
(There is a bug in inchi.js that it cannot read these bond types.)


Bob


​
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Otis Rothenberger
Hi Phil,

I had convinced myself that the problem was timing related to all the async 
stuff going on, but I think Bob is correct. There's a problem is the inchi.js. 
Whatever problem the 2D taxol is creating, the main issue to me is catching 
this type of problem and exiting gracefully.

Bob, I see Noel O'Boyle had a big hand in this also. He's mister Twirlymol, and 
another great cheminformstic blogger - AKA Noel O'Blog! I'll try them both.

By the way, inchi.js is running locally for me. For some reason that surprised 
me. I really like the idea of Jmol speaking SMILES and InChI, so I hope this 
all works out.

Otis

Sent from my iPad

> On Mar 8, 2016, at 7:11 PM, J. Bays  wrote:
> 
> Just a question. Taxol is pretty a complex structure. Are you able to 
> calculate and load others of equal complexity without crashing? Perhaps the 
> error occurs in the calc part. 
> 
> J. Philip Bays
> Emeritus Professor of Chemistry
> Saint Mary's College
> Norte Dame, IN
> 
> Sent from my iPad
> 
>> On Mar 8, 2016, at 6:22 PM, Otis Rothenberger  wrote:
>> 
>> Bob,
>> 
>> I'm using the approach on github. The molfile and the calculated inchi are 
>> in globals per their suggestions. For testing, I set the globals to "" 
>> before each model load. This led to erroneous matches at the taxol break - 
>> i.e. "" == "". 
>> 
>> I'm seeing all kinds of irratic behavior all related to taxol. Here's what's 
>> pretty constant:
>> 
>> 1) Things work pretty well if you don't load taxol!
>> 2) Loading taxol results in:
>> 
>> a) Taxol works.
>> b) The next model load works (usually).
>> c) Any model (usually) breaks it on a third load. Why 3rd load after the 
>> taxol bomb?
>> 
>> 3) The ChemWriter demo at github does not like Taxol either - loaded via 
>> paste Jmol taxol molfile.
>> 
>> 4) When the Jmol page breaks with Taxol (3rd load, go figure), I'm not 
>> seeing any of the error messages listed in the .mem file. It just breaks.
>> 
>> 5) If I wrap the following inchi code (I'm using github suggested code):
>> 
>> calc = InChI.fromMolfile(molfile).trim();
>> 
>> in a try/catch, I get an error when the taxol related 3rd load break happens:
>> 
>> type error: undefined is not an object (evaluating "a.stack")
>> 
>> I guess I can understand why that taxol molfile breaks the app. It's a mess. 
>> I'd just like to catch this situation before the 3rd load break starts.
>> 
>> Oh yeah, the first page load after a cache clear almost always throws an 
>> error. This does not break the page however. It just means that you don't 
>> get a page load inchi calculation.
>> 
>> Otis
>> 
>> Sent from my iPad
>> 
>>> On Mar 8, 2016, at 3:50 PM, Robert Hanson  wrote:
>>> 
>>> huh?
>>> 
 On Mon, Mar 7, 2016 at 7:17 PM, Otis Rothenberger  
 wrote:
 Bob,
 
 Rats! It’s reporting no difference, but there is a difference. This seems 
 to be OK:
 
 $("#log").html(nci==calc ? "no difference" : "check differences?”);
 
 Calc seems to be OK. The problem is what’s printed on the screen for calc.
 
 Otis
 
 --
 Otis Rothenberger
 o...@chemagic.org
 http://chemagic.org
 
 > On Mar 7, 2016, at 6:33 PM, Otis Rothenberger  
 > wrote:
 >
 > Bob,
 >
 > I think it may be a timing issue with the function below. When I comment 
 > out the initial JQuery working… html replacements, the page no longer 
 > “locks.” I don’t think it was really locking. I think those html 
 > replacements somehow ran after the subsequent code. Which…
 >
 > makes absolutely no sense to me! Nevertheless, it seems to fix the 
 > problem.
 >
 > function getInChI(app,url) {
 >   //$("#inchi2div").html("working...");
 >   //$("#inchi1div").html("working...");
 >   //$("#log").html("working...");
 >   if (!url) { return; }
 >   nci = Jmol.evaluateVar(jmolApplet0,"show('chemical 
 > stdinchi')").trim();
 >   $("#inchi2div").html(nci + "(from 
 > NCI/CADD)");
 >   calc = 
 > InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
 >   $("#inchi1div").html(calc + "(calculated 
 > in JavaScript)");
 >   $("#log").html(nci==calc ? "no difference" : "check differences?");
 > }
 >
 > Otis
 >
 > --
 > Otis Rothenberger
 > o...@chemagic.org
 > http://chemagic.org
 >
 >> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
 >>
 >> Otis, note that there is a bug there. If you ask for the models in this 
 >> order:
 >>
 >> $taxol
 >> $morphine
 >>
 >> inchi.js seems to hang and just never respond. Something to do with the 
 >> fact that $taxol is pathologically 2D and not 3D. But
 >>
 >> $taxol
 >> $methanol
 >>
 >> works, until you ask for $morphine. Then it hangs.
 >>
 >> Go figure!
 >>
 >>
 >> Bob
 >>
 >>
 >>
 >>
 >
 
 
>>>

Re: [Jmol-users] new InChI option

2016-03-08 Thread J. Bays
Just a question. Taxol is pretty a complex structure. Are you able to
calculate and load others of equal complexity without crashing? Perhaps the
error occurs in the calc part.

J. Philip Bays
Emeritus Professor of Chemistry
Saint Mary's College
Norte Dame, IN

Sent from my iPad

On Mar 8, 2016, at 6:22 PM, Otis Rothenberger  wrote:

Bob,

I'm using the approach on github. The molfile and the calculated inchi are
in globals per their suggestions. For testing, I set the globals to ""
before each model load. This led to erroneous matches at the taxol break -
i.e. "" == "".

I'm seeing all kinds of irratic behavior all related to taxol. Here's
what's pretty constant:

1) Things work pretty well if you don't load taxol!
2) Loading taxol results in:

a) Taxol works.
b) The next model load works (usually).
c) Any model (usually) breaks it on a third load. Why 3rd load after the
taxol bomb?

3) The ChemWriter demo at github does not like Taxol either - loaded via
paste Jmol taxol molfile.

4) When the Jmol page breaks with Taxol (3rd load, go figure), I'm not
seeing any of the error messages listed in the .mem file. It just breaks.

5) If I wrap the following inchi code (I'm using github suggested code):

calc = InChI.fromMolfile(molfile).trim();

in a try/catch, I get an error when the taxol related 3rd load break
happens:

type error: undefined is not an object (evaluating "a.stack")

I guess I can understand why that taxol molfile breaks the app. It's a
mess. I'd just like to catch this situation before the 3rd load break
starts.

Oh yeah, the first page load after a cache clear almost always throws an
error. This does not break the page however. It just means that you don't
get a page load inchi calculation.

Otis

Sent from my iPad

On Mar 8, 2016, at 3:50 PM, Robert Hanson  wrote:

huh?

On Mon, Mar 7, 2016 at 7:17 PM, Otis Rothenberger 
wrote:

> Bob,
>
> Rats! It’s reporting no difference, but there is a difference. This seems
> to be OK:
>
> $("#log").html(nci==calc ? "no difference" : "check differences?”);
>
> Calc seems to be OK. The problem is what’s printed on the screen for calc.
>
> Otis
>
> --
> Otis Rothenberger
> o...@chemagic.org
> http://chemagic.org
>
> > On Mar 7, 2016, at 6:33 PM, Otis Rothenberger 
> wrote:
> >
> > Bob,
> >
> > I think it may be a timing issue with the function below. When I comment
> out the initial JQuery working… html replacements, the page no longer
> “locks.” I don’t think it was really locking. I think those html
> replacements somehow ran after the subsequent code. Which…
> >
> > makes absolutely no sense to me! Nevertheless, it seems to fix the
> problem.
> >
> > function getInChI(app,url) {
> >   //$("#inchi2div").html("working...");
> >   //$("#inchi1div").html("working...");
> >   //$("#log").html("working...");
> >   if (!url) { return; }
> >   nci = Jmol.evaluateVar(jmolApplet0,"show('chemical
> stdinchi')").trim();
> >   $("#inchi2div").html(nci + "(from
> NCI/CADD)");
> >   calc =
> InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
> >   $("#inchi1div").html(calc + "(calculated
> in JavaScript)");
> >   $("#log").html(nci==calc ? "no difference" : "check differences?");
> > }
> >
> > Otis
> >
> > --
> > Otis Rothenberger
> > o...@chemagic.org
> > http://chemagic.org
> >
> >> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
> >>
> >> Otis, note that there is a bug there. If you ask for the models in this
> order:
> >>
> >> $taxol
> >> $morphine
> >>
> >> inchi.js seems to hang and just never respond. Something to do with the
> fact that $taxol is pathologically 2D and not 3D. But
> >>
> >> $taxol
> >> $methanol
> >>
> >> works, until you ask for $morphine. Then it hangs.
> >>
> >> Go figure!
> >>
> >>
> >> Bob
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval

___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lis

Re: [Jmol-users] new InChI option

2016-03-08 Thread Otis Rothenberger
Bob,

I was an avid reader of Rich Apodaca's Depth-First blog years ago, and I 
exchanged emails with him when I was considering ChemWriter for the model kit.

I thought about contacting him about the current inchi app problem, but his 
identity is kind of masked at his Metamolecular site, and Depth-First only 
exists as an archive from the past. Markus adopted ChemWriter for Resolver, and 
I think he knows Rich. I'll write to Markus about our interest in this 
application and about contacting Rich.

It's funny. I think taxol was the classic "hey it loads taxol" experiment when 
this stuff all started, and I swear that I remember that taxol loaded as a 3d 
model!

Otis

Sent from my iPad

> On Mar 8, 2016, at 6:39 PM, Robert Hanson  wrote:
> 
> OK, so there are some bugs there. And loading trashy 2D files is definitely a 
> bad idea. Otis, can you figure out the way to report this sort of thing?
> ​
> Bob
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Robert Hanson
OK, so there are some bugs there. And loading trashy 2D files is definitely
a bad idea. Otis, can you figure out the way to report this sort of thing?
​
Bob
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Otis Rothenberger
Bob,

I'm using the approach on github. The molfile and the calculated inchi are in 
globals per their suggestions. For testing, I set the globals to "" before each 
model load. This led to erroneous matches at the taxol break - i.e. "" == "". 

I'm seeing all kinds of irratic behavior all related to taxol. Here's what's 
pretty constant:

1) Things work pretty well if you don't load taxol!
2) Loading taxol results in:

a) Taxol works.
b) The next model load works (usually).
c) Any model (usually) breaks it on a third load. Why 3rd load after the taxol 
bomb?

3) The ChemWriter demo at github does not like Taxol either - loaded via paste 
Jmol taxol molfile.

4) When the Jmol page breaks with Taxol (3rd load, go figure), I'm not seeing 
any of the error messages listed in the .mem file. It just breaks.

5) If I wrap the following inchi code (I'm using github suggested code):

calc = InChI.fromMolfile(molfile).trim();

in a try/catch, I get an error when the taxol related 3rd load break happens:

type error: undefined is not an object (evaluating "a.stack")

I guess I can understand why that taxol molfile breaks the app. It's a mess. 
I'd just like to catch this situation before the 3rd load break starts.

Oh yeah, the first page load after a cache clear almost always throws an error. 
This does not break the page however. It just means that you don't get a page 
load inchi calculation.

Otis

Sent from my iPad

> On Mar 8, 2016, at 3:50 PM, Robert Hanson  wrote:
> 
> huh?
> 
>> On Mon, Mar 7, 2016 at 7:17 PM, Otis Rothenberger  
>> wrote:
>> Bob,
>> 
>> Rats! It’s reporting no difference, but there is a difference. This seems to 
>> be OK:
>> 
>> $("#log").html(nci==calc ? "no difference" : "check differences?”);
>> 
>> Calc seems to be OK. The problem is what’s printed on the screen for calc.
>> 
>> Otis
>> 
>> --
>> Otis Rothenberger
>> o...@chemagic.org
>> http://chemagic.org
>> 
>> > On Mar 7, 2016, at 6:33 PM, Otis Rothenberger  wrote:
>> >
>> > Bob,
>> >
>> > I think it may be a timing issue with the function below. When I comment 
>> > out the initial JQuery working… html replacements, the page no longer 
>> > “locks.” I don’t think it was really locking. I think those html 
>> > replacements somehow ran after the subsequent code. Which…
>> >
>> > makes absolutely no sense to me! Nevertheless, it seems to fix the problem.
>> >
>> > function getInChI(app,url) {
>> >   //$("#inchi2div").html("working...");
>> >   //$("#inchi1div").html("working...");
>> >   //$("#log").html("working...");
>> >   if (!url) { return; }
>> >   nci = Jmol.evaluateVar(jmolApplet0,"show('chemical 
>> > stdinchi')").trim();
>> >   $("#inchi2div").html(nci + "(from 
>> > NCI/CADD)");
>> >   calc = 
>> > InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
>> >   $("#inchi1div").html(calc + "(calculated in 
>> > JavaScript)");
>> >   $("#log").html(nci==calc ? "no difference" : "check differences?");
>> > }
>> >
>> > Otis
>> >
>> > --
>> > Otis Rothenberger
>> > o...@chemagic.org
>> > http://chemagic.org
>> >
>> >> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
>> >>
>> >> Otis, note that there is a bug there. If you ask for the models in this 
>> >> order:
>> >>
>> >> $taxol
>> >> $morphine
>> >>
>> >> inchi.js seems to hang and just never respond. Something to do with the 
>> >> fact that $taxol is pathologically 2D and not 3D. But
>> >>
>> >> $taxol
>> >> $methanol
>> >>
>> >> works, until you ask for $morphine. Then it hangs.
>> >>
>> >> Go figure!
>> >>
>> >>
>> >> Bob
>> >>
>> >>
>> >>
>> >>
>> >
>> 
>> 
>> --
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://makebettercode.com/inteldaal-eval
>> ___
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
> 
> 
> 
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department 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
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Transform Data into Opportunity.
Accele

Re: [Jmol-users] new InChI option

2016-03-08 Thread Robert Hanson
huh?

On Mon, Mar 7, 2016 at 7:17 PM, Otis Rothenberger 
wrote:

> Bob,
>
> Rats! It’s reporting no difference, but there is a difference. This seems
> to be OK:
>
> $("#log").html(nci==calc ? "no difference" : "check differences?”);
>
> Calc seems to be OK. The problem is what’s printed on the screen for calc.
>
> Otis
>
> --
> Otis Rothenberger
> o...@chemagic.org
> http://chemagic.org
>
> > On Mar 7, 2016, at 6:33 PM, Otis Rothenberger 
> wrote:
> >
> > Bob,
> >
> > I think it may be a timing issue with the function below. When I comment
> out the initial JQuery working… html replacements, the page no longer
> “locks.” I don’t think it was really locking. I think those html
> replacements somehow ran after the subsequent code. Which…
> >
> > makes absolutely no sense to me! Nevertheless, it seems to fix the
> problem.
> >
> > function getInChI(app,url) {
> >   //$("#inchi2div").html("working...");
> >   //$("#inchi1div").html("working...");
> >   //$("#log").html("working...");
> >   if (!url) { return; }
> >   nci = Jmol.evaluateVar(jmolApplet0,"show('chemical
> stdinchi')").trim();
> >   $("#inchi2div").html(nci + "(from
> NCI/CADD)");
> >   calc =
> InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
> >   $("#inchi1div").html(calc + "(calculated
> in JavaScript)");
> >   $("#log").html(nci==calc ? "no difference" : "check differences?");
> > }
> >
> > Otis
> >
> > --
> > Otis Rothenberger
> > o...@chemagic.org
> > http://chemagic.org
> >
> >> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
> >>
> >> Otis, note that there is a bug there. If you ask for the models in this
> order:
> >>
> >> $taxol
> >> $morphine
> >>
> >> inchi.js seems to hang and just never respond. Something to do with the
> fact that $taxol is pathologically 2D and not 3D. But
> >>
> >> $taxol
> >> $methanol
> >>
> >> works, until you ask for $morphine. Then it hangs.
> >>
> >> Go figure!
> >>
> >>
> >> Bob
> >>
> >>
> >>
> >>
> >
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Otis Rothenberger
Bob,

I think it may be a timing issue with the function below. When I comment out 
the initial JQuery working… html replacements, the page no longer “locks.” I 
don’t think it was really locking. I think those html replacements somehow ran 
after the subsequent code. Which…

makes absolutely no sense to me! Nevertheless, it seems to fix the problem.

function getInChI(app,url) {
//$("#inchi2div").html("working...");
//$("#inchi1div").html("working...");
//$("#log").html("working...");
if (!url) { return; }
nci = Jmol.evaluateVar(jmolApplet0,"show('chemical stdinchi')").trim();
$("#inchi2div").html(nci + "(from NCI/CADD)");
calc = 
InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
$("#inchi1div").html(calc + "(calculated in 
JavaScript)");
$("#log").html(nci==calc ? "no difference" : "check differences?");
}

Otis

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

> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
> 
> Otis, note that there is a bug there. If you ask for the models in this order:
> 
> $taxol
> $morphine
> 
> inchi.js seems to hang and just never respond. Something to do with the fact 
> that $taxol is pathologically 2D and not 3D. But 
> 
> $taxol
> $methanol
> 
> works, until you ask for $morphine. Then it hangs.
> 
> Go figure!
> 
> 
> Bob
> 
> 
> 
> 


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] new InChI option

2016-03-08 Thread Otis Rothenberger
Bob,

Rats! It’s reporting no difference, but there is a difference. This seems to be 
OK:

$("#log").html(nci==calc ? "no difference" : "check differences?”);

Calc seems to be OK. The problem is what’s printed on the screen for calc.

Otis

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

> On Mar 7, 2016, at 6:33 PM, Otis Rothenberger  wrote:
> 
> Bob,
> 
> I think it may be a timing issue with the function below. When I comment out 
> the initial JQuery working… html replacements, the page no longer “locks.” I 
> don’t think it was really locking. I think those html replacements somehow 
> ran after the subsequent code. Which…
> 
> makes absolutely no sense to me! Nevertheless, it seems to fix the problem.
> 
> function getInChI(app,url) {
>   //$("#inchi2div").html("working...");
>   //$("#inchi1div").html("working...");
>   //$("#log").html("working...");
>   if (!url) { return; }
>   nci = Jmol.evaluateVar(jmolApplet0,"show('chemical stdinchi')").trim();
>   $("#inchi2div").html(nci + "(from NCI/CADD)");
>   calc = 
> InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
>   $("#inchi1div").html(calc + "(calculated in 
> JavaScript)");
>   $("#log").html(nci==calc ? "no difference" : "check differences?");
> }
> 
> Otis
> 
> --
> Otis Rothenberger
> o...@chemagic.org
> http://chemagic.org
> 
>> On Mar 7, 2016, at 4:37 PM, Robert Hanson  wrote:
>> 
>> Otis, note that there is a bug there. If you ask for the models in this 
>> order:
>> 
>> $taxol
>> $morphine
>> 
>> inchi.js seems to hang and just never respond. Something to do with the fact 
>> that $taxol is pathologically 2D and not 3D. But 
>> 
>> $taxol
>> $methanol
>> 
>> works, until you ask for $morphine. Then it hangs.
>> 
>> Go figure!
>> 
>> 
>> Bob
>> 
>> 
>> 
>> 
> 


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users