From: Geoffrey H. <ge...@ge...> - 2010-03-08 16:59:47
|
On Jan 25, 2010, at 1:00 PM, Craig James wrote: > So here is the challenge: Can you identify an aromatic atom where the number of electrons it donates is ambiguous, and there is no reasonable SMARTS that can separate the two cases? I'm going to claim that there are *no* situations where we don't know exactly the number of electrons each atom will donate, if we specify a precise enough SMARTS. I sent this to Craig personally earlier today, but it's probably better to revisit this on the mailing lists. Obviously, SMARTS can become arbitrarily complicated, so I agree with Craig's premise -- you need careful, precise SMARTS. The problem is that it's usually easier to code common cases in SMARTS (where they're easy to read), and corner cases in actual code (which turns out to be easier to read than a 30-40 character recursive SMARTs). Here's some interesting cases from the OB bug tracker. Cn1ccn2c1nc1c2c(=O)nc(=O)n1C O=c1n(C)c(nc(c21)nn3c2[nH]cc3)=O See attached diagram for atom numbering and -- I think -- the best possible Kekule forms. There are two problems for the current state of OB code: 1) I added a rule in kekulize.cpp to disallow double bonds to neutral nitrogens with three explicit bonds. (This is on line 350, where initial atom states are set, after electron assignment.) 2) There needs to be a better mechanism to decide a nitrogen is pyrrole-like, adding a hydrogen if needed (and ignoring double bonds to it). For example, atom #12 in the top SMILES, or atom #6 in the bottom SMILES. The first can probably be met with a SMARTS for the carbonyl-nitrogen-carbonyl pattern, which is always [nH] or n-R. But I'm stumped by atoms 6-7-9 in the second SMILES -- the hydrogen could go to either nitrogen and I don't now how to break the tie. Any ideas on these brain-twisters? I always find aromatic nitrogens very tricky -- people will code them as "n" even when they should be "[nH]" and it's difficult to decide on the # of electrons well. -Geoff --- Prof. Geoffrey Hutchison Assistant Professor, Department of Chemistry University of Pittsburgh http://hutchison.chem.pitt.edu/ Office: (412) 648-0492 |