Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aromatize the molecules after drawing #5110

Open
salvogalati opened this issue Jul 16, 2024 · 0 comments
Open

Aromatize the molecules after drawing #5110

salvogalati opened this issue Jul 16, 2024 · 0 comments

Comments

@salvogalati
Copy link

Hi I'm trying to use the Ketcher API via scripts integrated into the HTML structure of the page. I'm having trouble generating queries since aromatized queries need to be used for correct matching. I tried using some methods from the various discussions open here (since there is no documentation on the API) but none of them work.

This is the function I use:

setTimeout(function() {
ketcher = window.ketcher;
ketcher.setSettings('{"dearomatize-on-load": true}');
ketcher.editor.setOptions({ "autoAromatize": true });
ketcher.setMolecule("C1C=CC=C(Br)C=1");
}, 5000);

I expect that although it provides a Kekulè structure it will be flavored as if I used the appropriate button already present in the editor.

This however does not happen and the structure remains in the form of Kekulè.

I would like to know if what I am doing is wrong or if perhaps there are other functions that can satisfy my need.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: chrome,
  • Version 126.0.6478.127

Ketcher version: v2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants