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
434 stars 68 forks source link

Fails on repetitive structures #119

Open tblaschke opened 3 years ago

tblaschke commented 3 years ago

Hi,

it seems that SMILES Drawer has some issues with some repetitive molecules. The following SMILES contains 12 benzenes, however SMILES drawer draws only 11 and adds a wrong bond between two benzenes.

c1ccc(-c2cccc(-c3cc(-c4cc(-c5ccccc5)c(-c5cc(-c6ccccc6)ccc5-c5ccccc5)cc4-c4ccccc4)c(-c4ccccc4-c4ccccc4)cc3-c3ccccc3)c2)cc1

The image that SMILES drawer is generating:

Screenshot 2021-04-27 at 22 03 25

Here is an image from CDK depict. It renders it correctly: #1