partridgejiang / Kekule.js

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

Formula tool gives an error #292

Closed py-chemist closed 1 year ago

py-chemist commented 1 year ago

Hello,

I am using Chem Composer for my web service. When I draw a simple organic reaction, like A -> B and click "Convert" button everything works fine. The reaction is sent to the backend as Kekule Chemical JSON format, preprocessed and I get back a desired format for that reaction. But if I use the Formula tool to depict let's say a solvent (as an example C2H5OH) above the arrow, then I get an error in the console:

Uncaught (in promise) Object { message: "Molecule has no connection table and can not be output to MDL format", name: undefined, stack: "@http://172.20.0.3:9000/kekule/kekule.min.js?module=chemWidget,io:1:198915\n" }

When I use the Text tool to write some text above/below the arrow or Heat symbol - it's working fine. Only Formula tool gives me the trouble. So, I am wondering if this error is coming from my side or from Chem Composer.

Thank you very much.

partridgejiang commented 1 year ago

Hi @py-chemist, it's quite confusing that such an error message about MDL format data is raised when outputting to JSON. Could you please paste the your codes to save to JSON here?

py-chemist commented 1 year ago

Hello @partridgejiang,

Let me check something and I'll get back to your question. Thanks

py-chemist commented 1 year ago

@partridgejiang

I am sorry for creating this issue. The problem was on my side and I resolved it.

Thank you very much for your time!