Otis,
I got it -- very interesting -- two obscure bugs, both relating to cationic
aromatic nitrogen. Wow. Good find! Fixed for both Jmol 12.1.35 and 12.0.32.
Uploading http://chemapps.stolaf.edu/jmol/docs/examples-12/Jmol-12.zip
Jmol was generating an incorrect SMILES string for NAD+ both in the sense
that the nicotinamide ring should have been shown as aromatic and also that
the double bond / \ markings should not be there. This was due to the fact
that the aromatic ring contained a cationic nitrogen atom. We now have:
$ load $NAD
$ show smiles
NC1=O.c21=c[n+1]3=cc=c2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@](O)6=O.O6[P@
](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@
@H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98
which checks out now:
$ print {*}.find(smiles, script("show smiles"))
({0:71})
Bob
On Sat, Feb 12, 2011 at 9:49 PM, Otis Rothenberger <osrot...@chemagic.com>wrote:
> Bob,
>
> Some additional information to add some checks to this issue.
>
> I pass the SMILES into Jmol Script from JavaScript, thus the // for / in
> the DB. I thought I better check the console entry of SMILES on an example
> that works. I was surprised by the results, but the NAD+ problem appears to
> be a problem with the SMILES. Here's the test example:
>
> With prostacyclin I2 in the Jmol window, I tried all variations of the
> following, including changing "var z = {*}.find("SMILES",y);" to "var z =
> x.find("SMILES",y);" With both finds, I think I tried every combination of
> \\ and/or \. They all work! Do you have some type of auto correction for \
> in the system?
>
> var x = "CCCCC[C@H](O)/C=C/[C@@H]1[C@@H]2[C@H]3O/C/4=C\CCCC(O)=O.C\42.[C@H
> ](O)1C3";
> var y = "CCCCC[C@H](O)/C=C/[C@@H]1[C@@H]2[C@H]3O/C/4=C\CCCC(O)=O.C\42.[C@H
> ](O)1C3";
> var z = {*}.find("SMILES",y);
> print @z
>
> Anyway, the NAD+ problem remains. "var z = x.find("SMILES",y)" works,
> including apparent \\ vs \ irrelevancy. The var "z = {*}.find("SMILES",y)"
> with NAD+ in the window does not work.
>
>
> Otis
>
> --
> Otis Rothenberger
> Department of Chemistry
> Illinois State University Normal, IL 61790-4160
> http://chemagic.org
>
> ------------------------------
> *From*: "Otis Rothenberger" <osrot...@chemagic.com>
> *Sent*: Saturday, February 12, 2011 3:54 PM
> *To*: jmol-users@lists.sourceforge.net
> *Subject*: [Jmol-users] SMILES Problem
>
>
> Bob,
>
> For a model of NAD+, I have the following FIND problem.
>
> SMILES strings are the same in both examples below.
>
> THIS WORKS
> var x = "NC/1=O.C/2\1=C/[N+1]/3=C/C=C\2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@
> ]([O-1])6=O.O6[P@](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@@H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98";var
> cks = x.find('SMILES',x);print @cks
>
> THIS DOES NOT WORK
> var x = "NC/1=O.C/2\1=C/[N+1]/3=C/C=C\2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@
> ]([O-1])6=O.O6[P@](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@@H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98";var
> cks = {*}.find('SMILES',x);print @cks
>
> In the second case, "x" is pulled from a database via a query string query
> to the DB.
>
> If I examine "x" directly from the DB created JSON structure via:
>
> alert(oChem.models[0].smiJ)
>
> I get
>
> NC/1=O.C/2\1=C/[N+1]/3=C/C=C\2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@
> ]([O-1])6=O.O6[P@](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@
> @H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98
>
> which looks OK.
>
> If I examine {*).find("SMILES") directly from the console, I get:
>
> NC/1=O.C/2\1=C/[N+1]/3=C/C=C\2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@
> ]([O-1])6=O.O6[P@](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@
> @H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98
>
> which also looks OK.
>
> The actual DB text is escaped as follows:
>
> NC/1=O.C/2\\1=C/[N+1]/3=C/C=C\\2.[C@H]43[C@H](O)[C@H](O)[C@H]5CO[P@
> ]([O-1])6=O.O6[P@](O)7=O.O7C[C@@H]8[C@@H](O)[C@@H](O)[C@
> @H]9[n]%10c%11=c%12c(N)=[n]c=[n]%11.[n]%12=c%10.O54.O98
>
> This is the single case in a 1630 record database that does not work. Do
> you see anything in the above that might explain this? I'm stumped.
>
> Otis
>
> --
> Otis Rothenberger
> Department of Chemistry
> Illinois State University Normal, IL 61790-4160
> http://chemagic.org
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
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
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users