Hi Geoff, On 3 Feb 2014, at 05:23, Geoffrey Hutchison <geoff.hutchi...@gmail.com> wrote: >> to be molecules with nonsense formal charges on aromatic atoms, which then >> fail to >> be Kekulized given the mismatched valence states. > > OK, I have an interesting test case from Noel's python testkekulize.py script. > (Sadly, my laptop wasn't set to build the python bindings and so this is > currently broken.) > > C1=[N+]C=Nc2[nH]cnc12 > vs. > c1[n+]cnc2[nH]cnc12 > > Now, I'm not entirely sure why there's a positive charge on that nitrogen. > Let's ignore that for a second — assume there's some chemical process that > makes it N+.. If we're including two explicit double-bonds in that > six-membered ring, plus a double bond from the imidazole ring.. that makes > three double bonds = 6 pi electrons. > > So I'd probably mark that ring as aromatic on an exam. That suggests that a > pyrridinium n+ is OK, and contributes 1 pi electron. > > For example, if I add an H, Daylight depict is quite happy with this as > aromatic: > c1[n+H]cnc2[nH]cnc12 > > And as you know, the two examples you gave are rejected completely by > Daylight SMILES. > > Thoughts?
The presence of the hydrogen on the pyridinium nitrogen is critical for aromaticity. Atoms with non-normal valences, such as radicals, are not usually considered aromatic in SMILES. The list of aromatic atom types in the OpenSMILES spec doesn't (shouldn't) contain any radicals, but does explicitly allow (mono)cationic and (mono)anionic nitrogen. I think the mistake is to "Let's ignore that for a second". Consider benzene. Then let's strip a pi electron from the ring, resulting in [CH+]1=CC=CC=C1, this isn't aromatic as we've now only 5 pi-electrons, i.e. this shouldn't be [cH+]1ccccc1. The exact same thing is happening in Noel's example. Start with 4n+2 pyridine, n1ccccc1 and lose a (pi) electron gives [N+]1=CC=CC=C1 not [n+]1ccccc1. http://www.daylight.com/daycgi/depict?5b4e2b5d313d43433d43433d4331 The same happens if the electron is lost from one of the carbons, N1=CC=C[CH+]=C1. For Noel's example above, OpenBabel now matches Daylight's (and OpenEye's) behaviour. http://www.daylight.com/daycgi/depict?43313d5b4e2b5d433d4e63325b6e485d636e633132 If OB is trying to count electrons, clearly these SMARTS patterns need to match formal charge. p.s. I'm not claiming that the revised SMARTS in aromatic.txt are correct, just that they have fewer bugs than without this patch. Best regards, Roger -- Roger Sayle, Ph.D. CEO and founder NextMove Software Limited Registered in England No. 07588305 Registered Office: Innovation Centre (Unit 23), Cambridge Science Park, Cambridge CB4 0EY ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel