GreenGroup/RMG-Java — pull request #221 by nickvandewiele (2011-10-26 19:16:52+00:00)
Title: bug fix for aromatics perception of triple bond species

species like benzyne (InChI=1S/C6H4/c1-2-4-6-5-3-1/h1-4H0)
with a triple bond instead of a double bond in a cyclic conjugated
system would also be perceived as aromatic since the triple
bond contributes 2 pi electrons (like a double bond) and a
Hueckel number could thus be matched.

The algorithm would then change the atom type of these triple
bonded carbons (Ct) to Cb. And this is where it goes wrong: the
hydrogen adder will note that the created Cb atom does not bear
a hydrogen. thus, it will add one. Since the Ct carbon in e.g.
benzyne cannot bear an extra hydrogen, this will create an
error that perpetuates to other places in RMG.

Therefore, the temporary solution here is to perceive benzyne type
species as NOT aromatic so that a hydrogen atom is not added afterwards.

This is done when iterating over the bonds by checking if the bond type
is double. Only in that case, the pi electron counter is updated.