got it -- a SMILES generator bug.

On Thu, Sep 2, 2010 at 2:50 PM, Otis Rothenberger <[email protected]>wrote:

>  Bob,
>
> The ring is flat, but it has two sp3 carbons (CH2's). To make sure this was
> not associated with my post model change processing, I reproduced the effect
> by building benzene from methane followed by 1,3-cyclohexadiene formation
> at:
>
> http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm
>
> I get the same results.
>
> My issue is fairly localized to one problem, and I'd be hesitant to change
> Jmol in a way that might create more problems down the road for this one
> problem. At this point, the only thing this issue is fouling is using NIH
> Resolver as a "minimization" tool. It keeps returning benzene on some
> modified benzene queries - most notably 1,3-cyclohexadiene.
>
> I'm experimenting with
>
> escape(jmolSmile.replace(/c/ig, 'C'))
>
> on this type of query only - i.e. NIH Resolver "minimize."
>
> I'm not sure that I'd even call this a work around since there is nothing
> wrong with Jmol smiles. Playing around with benzene and pyridine indicates
> that this approach is working. Even though I do not change "n" in the
> 2,3-dihydropyridine query, the Resolver reads in correctly and returns the
> correct SMILES and model.
>
> The lower case Kekule aromatic SMILES will play havoc with asymmetric
> "compares" - JME/Jmol & NIH/Jmol. But I'm not sure these asymmetric
> "compares" are an issue, just a nuisance in constructing an internal data
> base. In this latter case, one has to hand convert JME SMILES (for example)
> to lower case aromatic.
>
>
> Otis
>
> Otis Rothenbergerchemagic.com
>
>
> On 9/2/2010 3:09 PM, Robert Hanson wrote:
>
>
>
> On Thu, Sep 2, 2010 at 9:17 AM, Otis Rothenberger 
> <[email protected]>wrote:
>
>>  Bob,
>>
>> Thanks. Your explanation of what aromatic means is the key here. I see now
>> why this is happening. If I start with benzene and make 1,3-cyclohexadiene,
>> then it ends up in flat energy minimum that "minimize" does not change. I
>> always get the lower case smiles. If I use "drag" to pull it out of shape,
>> then I get upper case. If I make cyclohexene from benzene, "minimize"
>> eventually get it and twists a bit. Once it twists, I get upper case.
>>
>> One thing here is that it looks like the statement "aromatic just means
>> flat and all sp2 for Jmol" is not quite correct. Flat seems to be a
>> sufficient condition.
>>
>
> then there's a bug. You sure you have a tetrahedral center? -- not just
> "square planar but distorted square planar"?
>
>
>>
>> The context here may seem strange, but we are working on student model kit
>> exercises, and we want the Jmol model kit to allow the same kind on tactile
>> playing that a ball and stick model kit allows - e.g. take a double bond out
>> of benzene. To be sure, I do not see the problem if I make
>> 1,3-cyclohexadiene from cyclohexane. That should have been a clue that the
>> flatness was the issue!
>>
>> Re NIH, for all of the following, the Resolver returns benzene (no
>> explicit hydrogens in submitted SMILES):
>>
>> Jmol lower case benzene
>> Jmol lowercase cyclohexadiene
>> Jmol lower case cylohexene
>> Jmol lower case cyclohexane, which is, of course synonymous with "aromatic
>> SMILES" for benzene.
>>
>> Evidently, the Resolver is just ignoring "=" in this lower case context.
>>
>>
> that makes sense. What do you propose? There could be an aromatic option
> that requires explicit hydrogens:
>
> /explicitaromatic/
>
>   --- flat ring
>   --- tricoordinate carbon
>   --- all substituents in plane of ring
>
>
> /aromatic/ (default)
>
>  -- flat ring
>  -- all substituents in plane of ring
>
> I hate to think what implications it might have for heterocycles, though.
> That's what I was trying to avoid.
>
> Bob
>
>
>> Otis
>>
>> Otis Rothenbergerchemagic.com
>>
>>
>>   On 9/2/2010 1:52 AM, Robert Hanson wrote:
>>
>>
>>
>> On Wed, Sep 1, 2010 at 10:21 PM, Otis Rothenberger <[email protected]
>> > wrote:
>>
>>>  Bob,
>>>
>>> There is a general aromatic problem that I'm having with find SMILES
>>> that's easiest to explain with a specific scenario. If I load benzene
>>> and run "var x={*}.find('SMILES');echo @x," I get:
>>>
>>> c1=cc=cc=c1
>>>
>>> If I use model kit mode to make 1,3-cyclohexadiene, the same "var
>>> x={*}.find('SMILES');echo @x" produces
>>>
>>> c1=cc=ccc1
>>>
>>>
>> I'll look into that. Almost certainly a bug. It should only use lower case
>> c if the ring is totally flat and there are no sp3 centers. I'm really
>> surprised it's doing that. The code is only supposed to insert lower case
>> "c" when:
>>
>> -- the ring is flat
>> -- the ring has no sp3 centers
>>
>> Is it possible you are sending it a flat no-hydrogen ring? When I use the
>> model kit, I get:
>>
>>
>> C1=CCCC=C1
>>
>>
>>
>>
>>> I'm now stuck in lower case "c" mode on this ring no matter what I do to
>>> the ring. If I break a ring bond while the ring is no longer aromatic
>>> and reform the bond, I go back to upper case "C"
>>>
>>>
>> remember -- "aromatic" just means "flat and all sp2" for Jmol. We're not
>> going to get into multiple bonding issues. There's no "antiaromatic" here.
>> It doesn't matter if you have 6 carbons and all single bonds or 6 carbons
>> and all double bonds or 8 carbons (as in octadienyl dianion ligand). As long
>> as it's flat and there aren't any tetrahedrally directed substituents, Jmol
>> is going to use "c" instead of "C".
>>
>> Bob
>>
>>
>>
>>> There are really two issues here:
>>>
>>> 1) Jmol creates Kekule SMILES in lower case, and this does not seem to
>>> be standard. As long as compare is Jmol/Jmol, this is not a problem. And
>>> in fact, NIH Resolver which uses aromatic SMILES (c1ccccc1), recognizes
>>> the Jmol lower case Kekule SMILES for benzene.
>>>
>>
>> It's definitely incorrect. You really have all the H atoms there and it's
>> not planar?
>>
>>  2) Getting stuck in lower case mode, however, is a problem and seems to
>>> be a bug.
>>>
>>> I have a feeling that calculate/reset aromatic may offer one solution to
>>> the problem, but I'm not sure it can be used in a general sense to
>>> "unaromatise" an aromatic ring. If this is not a bug, an alternative is
>>> to use JavaScript toUpperCase() on s, c, n, and o, but that has ugly
>>> side affects.
>>>
>>>
>> See if you can find out more about what exactly the NIH server is
>> requiring, if that's the issue. There's also a
>>
>> /noaromatic/ flag in Jmol's SMILES business that turns off aromatic
>> checking. That might be useful.
>>
>> Help me define what the context is. Where are these being used?
>>
>>
>>
>>> Otis
>>>
>>> --
>>> Otis Rothenberger
>>> chemagic.com
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net Dev2Dev email is sponsored by:
>>>
>>> Show off your parallel programming skills.
>>> Enter the Intel(R) Threading Challenge 2010.
>>> http://p.sf.net/sfu/intel-thread-sfd
>>> _______________________________________________
>>> Jmol-users mailing list
>>> [email protected]
>>> 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
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 
>> 2010.http://p.sf.net/sfu/intel-thread-sfd
>>
>>
>> _______________________________________________
>> Jmol-users mailing 
>> [email protected]https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> 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
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 
> 2010.http://p.sf.net/sfu/intel-thread-sfd
>
>
> _______________________________________________
> Jmol-users mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> 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
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to