jsme-editor / jsme-editor.github.io

73 stars 19 forks source link

run script to convert input SMILES to output SMILES outside of the GUI #11

Closed rlowe55 closed 1 year ago

rlowe55 commented 3 years ago

Hi, I am a scientific application developer at RCSB.org. We would like to be able to run a command-line script to generate the JSME output SMILES string based on a given SMILES input string. We have noticed that the input and output do not always match. For example, for HEM, the input string: Cc1c2n3c(c1CCC(=O)O)C=C4C(=C(C5=[N]4[Fe]36[N]7=C(C=C8N6C(=C5)C(=C8C)C=C)C(=C(C7=C2)C)C=C)C)CCC(=O)O results in this output string: C=Cc1c(C)c2cc6c(C=C)c(C)c5cc3c(C)c(CCC(=O)O)c4cc8c(CCC(=O)O)c(C)c7cc1n2Fe([n+]56)[n+]78

Is there a way to access the internal component that handles the transformation without having to instantiate the Graphic UI?

thanks,

jsme-editor commented 3 years ago

Hi,

thank you for your report. I tried to reproduce the output SMILES using the JSME test page (https://jsme-editor.github.io/dist/JSME_test.html) and I got this (after I pasted the input SMILES in the editor):

C=Cc1c(C)c2cc6c(C=C)c(C)c5cc3c(C)c(CCC(=O)O)c4cc8c(CCC(=O)O)c(C)c7cc1n2Fe([n+]56)[n+]78

The iron is, unlike in your report, is surrounded by brackets [Fe], as it should be. Nevertheless, the output string does not to seem to be correct. This is something we should investigate. A work around is to use the option nocanonize.

May I ask the reason for using JSME to convert SMILES? Is it to generate canonical SMILES?

Is there a way to access the internal component that handles the transformation without having to instantiate the Graphic UI?

This is presently not possible.