Hoooray!

Some interesting issues there.

JSME and 2D/3D -  It turns out that JSME has two modes of delivery of
SMILES -- "canonize" and "nocanonize".  These are not dynamically
switchable, as far as I can tell. I wish they were. The problem is that
"canonize" delivers aromatic symbols for rings that  are not
huekel-aromatic -- all six carbons, for example, in benzoquinone. Jmol does
this, too, but Jmol adds double bond indications as well, so ...c=cc=c....
The difference is significant -- Jmol's SMILES representations are
interpretable by the NCI Resolver; JSME's "canonize" versions are not. So
I  have to have JSME in nocanonize mode in order to convert 2D to 3D using
the NCI Resolver.

The problem was that at jsmetest.htm and jsmetest2.htm Jmol's SMARTS/SMILES
matching algorithm was not finding the (non-aromatic) JSME nocanonize
SMILES in aromatic molecular structures. So JSmol was reloading all
aromatic compounds coming from JSME.

That is fixed through the addition of a SMILES/SMARTS search option
"/noncanonical/" (added in JSmolJME.js), which tells Jmol to just look at
hydrogen count, not aromaticity, for SMARTS and SMILES matching. For
example, Jmol's SMILES string for benzoquinone is:

$ load $benzoquinone
$ show SMILES


*c12=O.c2=cc3=O.c3=c1 *
which works at NCI. For example,

$ load $c12=O.c2=cc3=O.c3=c1

(same structure)

JSME's SMILES strings are:

O=c1ccc(=O)cc1  (canonize)
C1(=O)C=CC(=O)C=C1  (nocanonize)

NCI Resolver's string is:

$ load $benzoquinone
$ show chemical SMILES


*C1(C=CC(C=C1)=O)=O*
While JSME's canonize version is closest to Jmol's, only its nocanonize
version matches NCI.  Sending JSME's version to NCI for resolution is the
problem. It returns cyclohexane-1,4-dione. No C=C double bonds!

Thus, when working with JSME for 2D->3D work, one needs to use JSME's
nocanonize option. That was what was failing in Jmol in

var jmolAtoms = Jmol.evaluateVar("{*}.find('SMILES', '" + jsmeSMILES +
"')");

as JSME's noncanonical SMILES, though working at NCI Resolver, does not
match Jmol's molecular structure. The solution is to force Jmol to ignore
the difference between aromatic and nonaromatic atoms, provided the
hydrogen count is identical. So that is now changed to

var jmolAtoms = Jmol.evaluateVar("{*}.find('SMILES', '/noncanonical/" +
jsmeSMILES + " ' )");

and, in addition, Jmol, too, can return its own "noncanonical" (read
"nonaromatic") SMILES using

$ load $benzoquinone
$ print {*}.find("SMILES", "NOAROMATIC")


*C12=O.C2=CC3=O.C3=C1*
(I considered calling this "NONCANONICAL" but decided against it, because
it might imply that Jmol has a canonical option, which it does not. Jmol
will return different SMILES strings depending upon how a structure was
drawn or where it originates. )


This now matches both NCI and JSME:

$ print "C12=O.C2=CC3=O.C3=C1".find("SMILES", "C1(=O)C=CC(=O)C=C1")
*8*

$ print "C12=O.C2=CC3=O.C3=C1".find("SMILES", "C1(C=CC(C=C1)=O)=O")
*8*

As an aside, PubCHEM's "canonical SMILES" for benzoquinone is still
different from all of these:

C1=CC(=O)C=CC1=O

JSME's canonical SMILES string, O=c1ccc(=O)cc1, does work at PubCHEM, as
evidenced by the following Jmol command returning a proper structure of
benzoquinone:

$ load :smiles:O=c1ccc(=O)cc1

(The reason we cannot use PubCHEM in general is that it only returns
compounds that have been entered into the PubCHEM database.)

Bob


On Wed, Sep 16, 2015 at 9:21 AM, Robert Hanson <hans...@stolaf.edu> wrote:

>
>
> On Wed, Sep 16, 2015 at 8:09 AM, Paul PILLOT <paulpil...@gmail.com> wrote:
>
>>
>> The only remaining glitch is in the test2.htm page that displays 2 still
>> images in the forefront, having the active molecule displayed ind the
>> background.
>> It appears on the two browsers I’ve checked. It doesn’t appear in any of
>> the other pages I’ve tried so it should only be related to a code in this
>> specific page.
>>
>>
> Not a glitch. It is a test page. ;)
>
>
> 16-09-2015 à 03:49, Angel Herráez <angel.herr...@uah.es> a écrit :
>
> simple.htm  runs ok now here, without errors and the language is correct
> (it
> also was before)
>
> On 16 Sep 2015 at 0:00, Robert Hanson wrote:
>
>
> http://sourceforge.net/projects/jmol/files/Jmol-beta/Jmol%2014.3/Jmol%2014.3.16/Jmol-14.3.16_
> 2015.09.15-binary.zip
>
> Jmol.___JmolVersion="14.3.16_2015.09.15"
>
>
>
>
>>
>> ------------------------------------------------------------------------------
>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>> Get real-time metrics from all of your servers, apps and tools
>> in one place.
>> SourceForge users - Click here to start your Free Trial of Datadog now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>> _______________________________________________
>> 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
>
>


-- 
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
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to