Closed fgrunewald closed 6 months ago
Many thanks! First your questions, I'll have a look at the code as well.
how to deal with wildcards ? For now they are just ignored because we don't know the valency and bond order. That means []1[][*]1 is not aromatic anymore.
Wildcard should always be able to form a double bond without inducing a charge, so they should be part of the delocalized subgraph. I'm not a hundred percent sure why [*]1[*][*]1
should be aromatic though, since it only has 3 atoms.
how to deal with charges in the initial valence assignment ? I think it should be missing = valence - bonds + charges
I need to brood on this. Can this be summarized in such a general way, or do we need to do actualy octet-rule?
how to assign aromaticity for fused rings. Currently naphthalene is not aromatic, which might be fine???
This is a problem IMO, naphthalene does show DIME.
@pckroon small update: so naphthalene is correctly assigned (now). I had an earlier error. All systems that show DIME are identified as aromatic as far as test-cases go. Only those like Thiophene are not.
Could you add 2 more testcases? One with a triangle, and one that cannot be kekulized and trips the error. That should bring the coverage back up
This is the initial draft of the new aromaticity algorithm following the ideas outlined here and here.
The key difference is that we are not trying to assign chemical aromaticity but rather kekulize the molecule (i.e. fixing hcount). In a nutshell, the algorithm proceeds as follows:
5b. If it is not cyclic then we simply assign a bond order of 2 to the edges that constitute the perfect matching.
Some differences in behaviour to the previous version:
The molecule from this blog-post mentioned in #19 is also fixed.
Overall I'd say this algorithm is more robust as it raises an Error for hard fails like
c1cncc1
but is also linenet towards chemically intuative smiles likecccc
.The major problems are:
[*]1[*][*]1
is not aromatic anymore.missing = valance - bonds + charges