partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
247 stars 61 forks source link

Molecule Structure is wrong loaded from Smiles #282

Closed keeper1030 closed 2 years ago

keeper1030 commented 2 years ago

I loaded structure by using "c1cc2NC(/C(c2cc1)=N/O)=C3/c4c(NC3=O)cccc4" smiles. The correct structure is below img.

스크린샷 2022-07-05 오후 5 32 53

However, in kekule composer editor, the structure is wrong.

스크린샷 2022-07-05 오후 5 34 17

That right side is reversed. image

partridgejiang commented 2 years ago

Hi @keeper1030, thanks for the feedback. Actually, Kekule.js does not have a native SMILES reader currently. Instead, a wasm compilation of OpenBabel is utilized to read SMILES data and generate 2D/3D coordinates of atoms. So I guess the problem is caused by the OpenBabel library.

keeper1030 commented 2 years ago

Ok, I know. Thanks for reply.