#1318 Aromaticity lost

cdk-1.4.x
closed
nobody
1
2014-01-09
2013-12-17
Houbi
No

For the smiles CN1C(CCC1=O)c2cccn+c2 altering the charge and setting double-bond N=O
and then using SmilesGenerator to get canonical smiles will cause the aromaticity to be lost.

Input smiles: CN1C(CCC1=O)c2cccn+c2
Expected output: CN1C(CCC1=O)c2cccn(=O)c2
Cdk output: O=C2N(C)C(C1CCCN(=O)C1)CC2

PreservingAromaticity is set to true for SmilesParser/SmilesGenerator

Discussion

  • John May

    John May - 2013-12-17

    Hi Houbi,

    Which version are you using? This isn’t the case in my version.

    Cheers,
    John

    On 17 Dec 2013, at 12:43, Houbi houbi56@users.sf.net wrote:

    [bugs:#1318] Aromaticity lost

    Status: open
    Labels: Aromaticity SmilesGenerator
    Created: Tue Dec 17, 2013 12:43 PM UTC by Houbi
    Last Updated: Tue Dec 17, 2013 12:43 PM UTC
    Owner: nobody

    For the smiles CN1C(CCC1=O)c2cccn+c2 altering the charge and setting double-bond N=O
    and then using SmilesGenerator to get canonical smiles will cause the aromaticity to be lost.

    Input smiles: CN1C(CCC1=O)c2cccn+c2
    Expected output: CN1C(CCC1=O)c2cccn(=O)c2
    Cdk output: O=C2N(C)C(C1CCCN(=O)C1)CC2

    PreservingAromaticity is set to true for SmilesParser/SmilesGenerator

    Sent from sourceforge.net because cdk-bugs@lists.sf.net is subscribed to https://sourceforge.net/p/cdk/bugs/

    To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/cdk/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


    Rapidly troubleshoot problems before they affect your business. Most IT
    organizations don't have a clear picture of how application performance
    affects their revenue. With AppDynamics, you get 100% visibility into your
    Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
    http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______
    Cdk-bugs mailing list
    Cdk-bugs@lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/cdk-bugs

     
  • Houbi

    Houbi - 2013-12-17

    1.4.19

     
  • Houbi

    Houbi - 2013-12-17

    What output do you get?

     
    • John May

      John May - 2013-12-17

      I’m using my own 1.5.x development branch which has updates to aromaticity and SMILES. You can make this work in multiple ways though, why do you want aromaticity in SMILES? The new versions will explicitly avoid writing aromatic SMILES - it is much better to store non-aromatic an perform aromaticity as needed.

      Anyways for CDK-1.4.x you can do the following:

          IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
          SmilesParser       sp      = new SmilesParser(builder);
          SmilesGenerator    sg      = new SmilesGenerator();
      
          IAtomContainer m = sp.parseSmiles("CN1C(CCC1=O)c2ccc[n+]([O-])c2");
      
          // FixBondOrdersTool not general purpose but okay for this example
          m = new FixBondOrdersTool().kekuliseAromaticRings(new Molecule(m));
      
          m.getAtom(11).setFormalCharge(0);
          m.getAtom(12).setFormalCharge(0);
          m.getBond(m.getAtom(11), m.getAtom(12))
           .setOrder(IBond.Order.DOUBLE);
      
          System.out.println(sg.createSMILES(m));
      

      This produces: O=C2N(C)C(C=1C=CC=N(=O)C=1)CC2

      You can detect aromaticity on this molecule using the DoubleBondAromarticityDetector. The problem is the CDK-1.4.x smiles generation uses a different aromaticity definition and the bonds
      order were not present. This whole API is rewriter in cdk 1.5.x to be clearer.

      Hope this help.

      Cheers,
      J

       
  • John May

    John May - 2013-12-18

    Marked for closure, fixed in > 1.5

     
  • John May

    John May - 2014-01-09
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks