#55 Atom typing incorrect between SMILES variants

closed
None
5
2012-10-08
2009-07-25
No

As reported in the Bioclipse BugZilla [0]:

A new molecule from the following two alternate SMILES representations look
identical on screen but show different atom types in outline.

CN(C)CCC1=CNC2=C1C=C(C=C2)CC1NC(=O)OC1
CN(C)CCC1=CNc2c1cc(cc2)CC1NC(=O)OC1

0.http://pele.farmbio.uu.se/cgi-bin/bugzilla/show_bug.cgi?id=1434

Discussion

  • Egon Willighagen

    Cannot reproduce in CDK 1.2.3:

    /**
     * @cdk.bug 2826961
     */
    @Test public void testIdenticalTypes() throws Exception {
        String smiles1 = "CN(C)CCC1=CNC2=C1C=C(C=C2)CC1NC(=O)OC1";
        String smiles2 = "CN(C)CCC1=CNc2c1cc(cc2)CC1NC(=O)OC1";
    
        IMolecule mol1 = smilesParser.parseSmiles(smiles1);
        IMolecule mol2 = smilesParser.parseSmiles(smiles2);
    
        Assert.assertEquals(mol1.getAtomCount(), mol2.getAtomCount());
        Assert.assertEquals(mol1.getBondCount(), mol2.getBondCount());
    
        IAtomType[] types1 = atomTypeMatcher.findMatchingAtomType(mol1);
        IAtomType[] types2 = atomTypeMatcher.findMatchingAtomType(mol2);
        for (int i=0; i<mol1.getAtomCount(); i++) {
            Assert.assertEquals(
                types1[i].getAtomTypeName(),
                types2[i].getAtomTypeName()
            );
        }
    }
    

    Maybe the recent N atom typing fix solved it.

     
  • Egon Willighagen

    Unit test attached, showing that this bug is not present in cdk-1.2.x.

    Needs only one review. Rajarshi, if you are happy with the patch, please signoff and apply.

     
  • Rajarshi Guha

    Rajarshi Guha - 2009-07-25

    Looks fine. Applied to cdk-1.2.x and pushed to SF

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks