pikachu icon indicating copy to clipboard operation
pikachu copied to clipboard

Bug : Wrong depiction with large carbon chains containing double bonds

Open Ghriann opened this issue 1 year ago • 1 comments

Hello folks, nice work on this project !

I'm encountering a bug using this input SMILES : CC/C=C\C/C=C\C/C=C\C/C=C\C/C=C\C/C=C\CCCCC(=O)S

Image

The correct molecule is, as drawn by MarvinJS :

Image

The cycle should not be there, I believe that it's because the software tries to avoid a collision between the two ends of the molecule.

Steps to reproduce

svg_from_smiles('CC/C=C\C/C=C\C/C=C\C/C=C\C/C=C\C/C=C\CCCCC(=O)S', 'output.svg')

Ghriann avatar Feb 20 '25 14:02 Ghriann

Thank you for reporting this issue! You are right; it is an issue with collision avoidance; specifically, it has to do with bonds adjacent to stereobonds not being rotatable. I will pick this up when I am back from my leave in April!

BTheDragonMaster avatar Feb 21 '25 08:02 BTheDragonMaster