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 <pb...@saintmarys.edu> 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 <osrot...@icloud.com> 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 <hans...@stolaf.edu> wrote:
>>> 
>>> huh?
>>> 
>>>> On Mon, Mar 7, 2016 at 7:17 PM, Otis Rothenberger <osrot...@icloud.com> 
>>>> 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 <osrot...@icloud.com> 
>>>> > 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 + "&nbsp;&nbsp;&nbsp;&nbsp;(from 
>>>> > NCI/CADD)");
>>>> >       calc = 
>>>> > InChI.fromMolfile(Jmol.evaluateVar(jmolApplet0,"write('MOL')")).trim();
>>>> >       $("#inchi1div").html(calc + "&nbsp;&nbsp;&nbsp;&nbsp;(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 <hans...@stolaf.edu> 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.
>> 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
------------------------------------------------------------------------------
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

Reply via email to