I can't find it on the Daylight website, or in the OpenSMILES spec,
but Roger has told me (the classic "appeal to authority" argument)
that "For aromatic nitrogens in SMILES the number of implicit
hydrogens is always specified. [nH] and [nH+] indicate one, "n", [n]
and [n+] indicate zero." That "n" and "[n]" are synonymous is news to
me. If true, that sorts out the hydrogen issue - it means that for
every atom we know exactly how many implicit hydrogens are attached.
Certainly Daylight's Depict (http://www.daylight.com/daycgi/depict)
does not accept c1nncc1, but is happy with c1n[nH]cc1.

I'm working through the code now; I think it works fine for explicit
Hs so I just need to figure out where to change it that the same
behaviour is maintained for implicitHs.

- Noel

On 12 December 2012 16:07, Geoffrey Hutchison <geo...@pitt.edu> wrote:
> Hi Noel,
>
>> I've run into the problem that the current kekulization code (or at least 
>> that invoked by the SMILES reader) does not take into account the location 
>> of implicit Hs, rather it works it out itself independently of anything I do.
>
> I think the problem has been not-quite-kosher SMILES. I'm thinking of things 
> like:
>
> c1nncn1  triazole
>
> So the aromatic nitrogens have an undefined number of implicit hydrogens. One 
> of them should have an explicit hydrogen, but it's not clear which one does.
>
> In the case of "good" SMILES, the Kekule code is moot and might cause more 
> harm than good. I don't know if there's a good way to flag good SMILES vs. 
> "quirky" SMILES. Certainly, I can help walk you through the kekule.cpp code. 
> There's probably a simpler implementation when the implicit and explicit 
> valence is well-defined.
>
> Hope that helps,
> -Geoff

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to