GreenGroup/RMG-Java — pull request #220 by nickvandewiele (2011-10-26 01:30:06+00:00)
Title: aromaticity perception improvement for cyclics containingCdd atoms

The aromaticity perception algorithm would count two pairs of pi electrons
for a Cdd carbon atom, ie a tetravalent carbon atom bound by two double
bonds. A Cdd carbon would thus add 4 pi-electrons and particular molecules
with a Cdd atom in a cycle could be perceived as aromatic.

Since it can be argued that these molecules with sp hybridized orbitals
are at least an ambiguous class of compounds in terms of aromaticity,
it is opted not to match these species as being aromatic.

this is accomplished by counting the number of double bonds attached
to each carbon. If a second double bond per atom is detected, the
pi electron counter is not updated (by adding 2). Therefore, molecules
such as InChI=1S/C5H4/c1-2-4-5-3-1/h1-4H are not aromatic.

On top of that, the aromaticity perception would also induce an error
in terms of hydrogen counting since implicit hydrogens can be added
by RMG a posteriori. A "Cdd" carbon, having no available bonds for a hydrogen
would be perceived as "Cb", connected to carbons by a single and a
double bond. The hydrogen adder would add a hydrogen, and provoke
element balance errors in the Structure class (where element balances are
checked).

This patch is very problem-specific (to Cdd atoms), and thus limited in
applicability.

More generalized improvements to the aromaticity perception algorithm
could be of use, especially with the addition of hetero-elements and re-
percussions on aromaticity in mind (cf. thiophene, furane, pyrole)

thanks to @gmagoon for helpful discussions!