#875 canonicalization of disconnected SMILES

2.3.x
closed
nobody
None
1
2014-03-15
2013-04-25
Jeff Janes
No

(Discussed on openbabel-discuss mailing list, under same subject)

I'm using Open Babel 2.3.2 to canonicalize some SMILES strings.

I thought that each fragment of a disconnected SMILES would be canonicalized separately (which I believe agrees what what is explained in http://openbabel.org/dev-api/canonical_code_algorithm.shtml)

However, that is not the case in the below example, adding a fragment causes the first fragment to canonicalize differently:

echo 'OC(=O)C@@HO)O.CNCC@@HO)O' | obabel -ismi -ocan
OC(=O)C@@HO)O.CNCC@@HO)O
1 molecule converted

echo 'OC(=O)C@@HO)O' | obabel -ismi -ocan
OC@HO)C(=O)O
1 molecule converted

Discussion

  • Jeff Janes
    Jeff Janes
    2014-02-14

    The formatting on this ticket get mangled. Let me try again with correct formatting.

    echo 'OC(=O)[C@@H]([C@H](C(=O)O)O)O.CNC[C@@H](c1ccc(c(c1)O)O)O' | obabel -ismi -ocan
    OC(=O)[C@@H]([C@H](C(=O)O)O)O.CNC[C@@H](c1ccc(c(c1)O)O)O
    
    echo 'OC(=O)[C@@H]([C@H](C(=O)O)O)O' | obabel -ismi -ocan
    O[C@H]([C@H](C(=O)O)O)C(=O)O
    
     
    • status: open --> closed
     
  • Thanks for the bug and the follow-up. This is now fixed in git master, so I'm closing the bug. Thanks!