#356 Allow aromatic boron in organic subset for SMILES

Needs_Review
closed
cdk-1.4.x (181)
5
2012-10-28
2011-06-20
Rajarshi Guha
No

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)

Discussion

  • Applied to cdk-1.4.x.

     
  • Grmph... wrong report. This one is not applied yet.

     
  • The unit test fails for me...

     
  • Rajarshi Guha
    Rajarshi Guha
    2011-06-23

    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:

    c1cccc(o2)c1b(O)c1c2cccc1

    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...

     
  • Rajarshi Guha
    Rajarshi Guha
    2011-06-27

    I agree that the first patch just needs to test parsing of 'b'; a subsequent test can make sure that we handle aromatic borons

     
  • Rajarshi Guha
    Rajarshi Guha
    2011-06-27

    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)

     
  • Applied.