Menu

#1373 kekulization fails when parsing smiles

master
closed
nobody
1
2015-10-27
2015-10-27
No

Smiles:
[O-]C(=O)CCCC(=O)c1ccc2cccc3ccc(C(=O)C([O-])=O)c1c23

Exception in thread "main" org.openscience.cdk.exception.InvalidSmilesException: could not parse '[O-]C(=O)CCCC(=O)c1ccc2cccc3ccc(C(=O)C([O-])=O)c1c23', a valid kekulé structure could not be assigned
at org.openscience.cdk.smiles.SmilesParser.parseSmiles(SmilesParser.java:209)

Other libs can cope with it:
https://apps.ideaconsult.net/ambit2/depict?search=%5BO-%5DC%28%3DO%29CCCC%28%3DO%29c1ccc2cccc3ccc%28C%28%3DO%29C%28%5BO-%5D%29%3DO%29c1c23&smarts=#

Cheers,
Martin

Discussion

  • John May

    John May - 2015-10-27

    Hi Martin,

    The SMILES is invalid, if you really want to try and handle it you can turn off kekulisation but then you'll have a molecule in a state of limbo which is not good.

    When you say cope - Open Babel Removes all bonds orders and PubChem/Id Resolver change the molecular formula (added a hydrogen).

    The second may sound reasonable but notice that shuffling the SMILES adds the H in a different location. As if by magic I turn one structure in to 13!.

    Try these:

    [O-]C(=O)CCCC(=O)c1ccc2cccc3ccc(C(=O)C([O-])=O)c1c23
    c1cc(c2c3c(cccc13)ccc2C(C([O-])=O)=O)C(=O)CCCC([O-])=O
    c1ccc2c3c(c(C(=O)CCCC(=O)[O-])cc2)c(ccc13)C(=O)C(=O)[O-]
    O=C(C(c1c2c(ccc3cccc(cc1)c23)C(=O)CCCC(=O)[O-])=O)[O-]
    O=C(c1c2c(ccc3cccc(cc1)c23)C(=O)CCCC(=O)[O-])C([O-])=O
    c1c(c2c(ccc3cccc(c1)c32)C(=O)CCCC([O-])=O)C(C([O-])=O)=O
    O=C([O-])C(c1c2c3c(ccc2C(=O)CCCC(=O)[O-])cccc3cc1)=O
    C(CCC(c1ccc2c3c(ccc(C(=O)C([O-])=O)c31)ccc2)=O)C(=O)[O-]
    c12c3c(ccc1C(C(=O)[O-])=O)cccc3ccc2C(=O)CCCC([O-])=O
    c1cc2cccc3ccc(c(c32)c1C(=O)CCCC([O-])=O)C(C(=O)[O-])=O
    
     
  • Martin Gütlein

    Martin Gütlein - 2015-10-27

    Hi John,

    hmm, you are right, just noticed that its really not possible to kekulize this structure...
    Sorry for the false alarm.

    Cheers,
    Martin

     
  • John May

    John May - 2015-10-27

    No problem...

     
  • John May

    John May - 2015-10-27
    • status: open --> closed