> As it is shown here, the ring is recognized as an aromatic ring and so the 
> carbons as “ca”. 
> However, based on the GAFF force field, C1 and C4 must be “cc” , C2 and C3 
> must be “cd”. 

Weird that GAFF doesn't think furan is aromatic.

> Another problem is that oxygen (atom number 9) is not recognized at all. 

Well, that depends on the SMARTS you're using for oxygen typing. Without seeing 
your SMARTS patterns, I'd guess you don't have any fallback patterns.

> My question is that which function or routine in the code recognizes aromatic 
> rings from non-aromatic rings? 

There are multiple routines in aromatic perception and Kekulization. But you 
don't really need to get involved in that (nor am I going to accept any patches 
for GAFF typing that change aromaticity detection).

What you want is a set of SMARTS patterns going from more general to more 
specific. Take a look at data/UFF.prm for a very simple example. So 
*everything* matches the first pattern, but it might get supplanted by a more 
specific example:

atom [#6]     C_3         Generic sp3 C
atom [C^2]    C_2         sp2 non-aromatic C
atom [C^1]    C_1         sp hybridized C
atom [c]      C_R         aromatic C
atom [#6H1D3r5] C_R       aromatic C (cyclopentadienyl ring)

Notice that for most atom typing in UFF.prm, we use #6 for carbon - regardless 
of whether it's an aromatic or aliphatic carbon.

My guess is that the oxygen in furan doesn't have a SMARTS pattern that matches 
[#8] or [o] (the latter being an aromatic oxygen).

If you want to "correct" carbons in a furan to "cc" or "cd", then construct 
SMARTS patterns for them:
atom [oD2]              o     "sp2 O - correct for aromatic oxygen"

I *think* that moving the "atom [c]                ca    "pure aromatic atom" 
before the various conjugated patterns would work - you'd be able to replace a 
generic aromatic atom with more specific atoms. You could also have something 
like:

atom [cR5]o     cc  "correct conjugated carbon in furans"

Hope that helps,
-Geoff
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to