Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
I tried both codes (given below). But, did not work. Should I have to include any javascript or jar files related to SMILES? Currently, I use . function compareSmiles(key, ans) { var v = " 'KEY'.find('SMILES','ANS')>0" .replace(/ANS/,ans) .replace(/KEY/,key) .replace(/

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Angel Herráez
> Should I have to include any javascript or jar > files related to SMILES? > Currently, I use src="JSmol/JSmol.min.js">. No, that's enough, as long as you are also definining properly the path to the "j2s" folder inside the "Info" variable I am not sure what may be the effect of a hidden JSm

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Robert Hanson
Ashok -- Getting going with anything on the web does have a learning curve. A few tips. I am sure you already know many of these, but others may not. 1. Look in the JSmol distribution for examples. Study them to see how they work. Especially supersimple.htm, supersimple2.htm, jsmol.htm, resize.htm

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Robert Hanson
5. I meant -- get familiar with the browser's *developer* console. ​ -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Angel Herráez
Ashok, I see 2 sources of problem in your code: 1) You cannot call compareSmiles() before the Jmol Object has finished being created 2) Where do you expect to see the output of compareSmiles() ? This, for example, works for me in the page (no need for the console): function go1() { doc

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
Dear Angel Herráez, Thank you... Angel Herráez, for your suggestion. I tried your method before, but it shows wrong result. So, I dropped using the method *Jmol.evaluate()* and *Jmol.evaluateVar()*. Actually, both SMILES strings are same, but the result shows* false*. While I run the script in co

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Otis Rothenberger
Ashok, Can you point us to the actual page that is giving you a problem? Otis -- Otis Rothenberger o...@chemagic.org http://chemagic.org > On Jan 11, 2016, at 9:08 AM, T. Ashok Kumar > wrote: > > Dear Angel Herráez, > > Thank you... Angel Herráez, for your suggestion. I tried your method be

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
Dear Otis Rothenberger, I have a collection of canonical SMILES strings retrieved from PubChem. I want to compare the collected SMILES strings with the SMILES string generated by the chemical structure editor JSDraw. I am trying to create a trial webpage to test this with SMILES matching script i

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Angel Herráez
For some reason, the double @@ is breaking the string See it with: function compareSmiles(key, ans) { var v = " 'KEY'.find('SMILES','ANS')>0" .replace(/ANS/,ans) .replace(/KEY/,key) .replace(/\\/g,""); alert(v) } ---

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
Dear Jmol Users, Finally I found the solution: function CompSmi() { var query = "'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H](CO)O)O'.find('SMILES', 'CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)O)O')"; return Jmol.evaluate(jmolApplet0, query); } function Match() { docum

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Angel Herráez
Dear Ashok, You have tested this successfully in the console smiles1 = 'CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)O)O' smiles2 = 'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C @H](CO)O)O' result = smiles2.find("SMILES", smiles1) So that's what you need in your function. So

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Otis Rothenberger
Hi again Ashok, I’m afraid I’m getting lost here. The SMILES in the latest emails are enantiomers. They should test out false. The suggested code is an identity check. If you want a more detailed check, then Jmol can do it with different code - e.g. are they identical, enantiomers, diastereome

Re: [Jmol-users] Saving files from JSmol

2016-01-11 Thread Eric Martz
Dear Bob, Here is where you can test saving images or animations from a form button in FirstGlance: http://bioinformatics.org/firstglance/fgix/ You can start it with JSmol or Jmol_S (see checkbox "use Java"). Click on the orange link below the molecule "Save Image or Animation for Powerpoin

[Jmol-users] JSME

2016-01-11 Thread Otis Rothenberger
I’m helping a colleague incorporate JSME into a chat application so that he can run on line help sessions. I though that I better take a look at the latest version of JSME. There is a slick undocumented feature in the latest version of JSME (not in the Jmol version I’m currently using). You can

[Jmol-users] jmol-14.4.1_2016.01.09.zip

2016-01-11 Thread Robert Hanson
http://chemapps.stolaf.edu/jmol/zip/jmol-14.4.1_2016.01.09.zip Jmol.___JmolVersion="14.4.1_2016.01.09" code: (JavaScript) refactoring to allow faster, cleaner load for biomodels Eric Martz should try this. Also, Eric, I would recommend taking a look at your network performance stats in general w

Re: [Jmol-users] Saving files from JSmol

2016-01-11 Thread Robert Hanson
On Mon, Jan 11, 2016 at 2:19 PM, Eric Martz wrote: > Dear Bob, > > Saving images (png) from *JSmol* works fine in all browsers except MS > Edge. > > I recently fixed that issue. Should be working. It does require jsmol.php, I believe. However right now I can't get anything going in MS Edge (from

Re: [Jmol-users] JSME

2016-01-11 Thread Robert Hanson
I'll try to remember to upgrade to that. Keep forgetting! On Mon, Jan 11, 2016 at 7:11 PM, Otis Rothenberger wrote: > I’m helping a colleague incorporate JSME into a chat application so that > he can run on line help sessions. I though that I better take a look at the > latest version of JSME. T

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Robert Hanson
Looks OK to me, Otis. But I think I wrote that up incorrectly above. The SMILES check syntax is: ANSWER.find('SMILES',KEY)>0 not KEY.find('SMILES',ANSWER)>0. The idea is "See if you can find the correct (KEY value) in this ANSWER", not the other way around: function compareSmiles(ans, key) {

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread Otis Rothenberger
Bob, I agree with you completely. My confusion is that it looks to me like Ashok was surprised that he was getting a no-match for two structures that were enantiomeric. I was wondering if he thought those two SMILES were equivalent. I checked them out and they were enantiomeric. I then got to

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
Dear Otis, Both functions compSmiles() and compareSmiles() works fine. The only problem is -- I can't able to call the function directly inside the body var x = 'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H ](CO)O)O'; var y = 'CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O

Re: [Jmol-users] How to run JSmol SMILES matching script in a webpage?

2016-01-11 Thread T. Ashok Kumar
Dear Otis, Thank you for your support... My next goal is to compare the query SMILES string with the canonical SMILES strings present in the MySQL database using Ajax. Thank you Jmol group members. -- *T. Ashok Kumar* Head, Department of Bioinformatics Noorul Islam College of Arts and Science