reymond-group / smilesDrawer

A small, highly performant JavaScript component for parsing and drawing SMILES strings. Released under the MIT license.
https://smilesdrawer.rocks
MIT License
416 stars 66 forks source link

It's wrong for 'N=C(O)CC' #152

Open ZhitaoTian opened 1 year ago

ZhitaoTian commented 1 year ago

It's wrong for 'N=C(O)CC'

goldwind-ting commented 1 year ago

do you mean ReferenceError: highlight_atoms is not defined?

ZhitaoTian commented 1 year ago

@goldwind-ting the right structure for "N=C(O)CC" should be: image while smileDrawer produce a structrue like this: image

xavierholt commented 1 year ago

This is a style preference, not a bug (I too prefer the fuller structures). You can get the output you want by disabling compactDrawing when you create your Drawer:

drawer = new SmilesDrawer.Drawer({
    // other stuff...
    compactDrawing: false
})
ZhitaoTian commented 1 year ago

@xavierholt Thanks a lot.