This patch updates the SMILES parser to support aromatic boron ('b') in the organic subset so that no square brackets are required. Fixes bug 3160514 (https://sourceforge.net/tracker/?func=detail&aid=3160514&group_id=20024&atid=120024)
Applied to cdk-1.4.x.
Grmph... wrong report. This one is not applied yet.
The unit test fails for me...
Hmm, the issue is that the patch fixes the parsing - ie b is part of the organic subset and so should not need [ & ].
But does the CDK recognize an aromatic boron? If not, then we should not support 'b'; Daylight appears to warn when aromatic boron s present. But OpenSmiles specifies that aromatic boron is valid.
What is this wicked structure?? :)
The boron atom type is most certainly missing from the list, /me thinks...
Can't we have a different SMILES, with a known aromatic boron, like:
See DOI 10.1039/JR9600000191
Otherwise, maybe the test should not check if the compound is aromatic, but just that the parsing works. Then we can file a separate bug report for making sure the CDK perceives the boron as aromatic...
Grmph... I accidentally pushed this commit already...
But let's try to fix it anyway...
I agree that the first patch just needs to test parsing of 'b'; a subsequent test can make sure that we handle aromatic borons
The latest patch attached to this entry updates the unit test to just checked that we parsed aromatic boron (rather than check for correct aromaticity perception)
Latest patch (ignore other one)