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

Returning incorrect smarts #1695

Closed
MariaDolotova opened this issue Aug 16, 2022 · 11 comments
Closed

Returning incorrect smarts #1695

MariaDolotova opened this issue Aug 16, 2022 · 11 comments

Comments

@MariaDolotova
Copy link

MariaDolotova commented Aug 16, 2022

Steps to Reproduce

  1. Create Ketcher class
  2. Set the following smarts [!#6&!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1 using setMolecule() method.
  3. Get smarts using getSmarts() method

Expected behavior
Expect to get [!#6&!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1

Actual behavior
Getting [!#6,!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1(comma is OR operator while we need AND operator - &)

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome version 104.0.5112.81

Ketcher version
"ketcher-core": "^1.5.0",
"ketcher-react": "^2.5.1",
"ketcher-standalone": "^1.4.0",

@MariaDolotova
Copy link
Author

Hello!
I still get an error on the follwing versions of Ketcher:
Ketcher version
"ketcher-core": "^2.9.0",
"ketcher-react": "^2.9.0",
"ketcher-standalone": "^2.9.0"

But the returned structure ahs changed: I set [!#6&!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1 but get [#6](-[#7]-[#6])(=[#8])-[#7]-[#6].
@evgeniiFrolov1 , @Nitvex , can you please take a look?

@skalkin
Copy link

skalkin commented Jan 29, 2024

@Nitvex , @evgeniiFrolov1 - just wondering if there's any update on it? Ketcher is a cool sketcher but silly issues like that prevent us from giving it to our users :(

@Zhirnoff
Copy link
Collaborator

@skalkin Hello! Thank you for using Ketcher and highlighting this problem for us. I checked this on https://lifescience.opensource.epam.com/KetcherDemoSA/index.html in version 2.15 and now SMARTS without comma is returned.
2024-01-30_15h07_16

@Zhirnoff Zhirnoff assigned Zhirnoff and unassigned evgeniiFrolov1 Jan 30, 2024
@Zhirnoff
Copy link
Collaborator

@skalkin Recently, we have put significant effort into SMARTS. If you notice any bugs, we would greatly appreciate your feedback.

@skalkin
Copy link

skalkin commented Jan 30, 2024

@Zhirnoff thanks a lot! We'll give Ketcher another try, and will surely share the feedback.
@MariaDolotova FYI

@Zhirnoff
Copy link
Collaborator

Bug is not reproduced in Prod Version 2.15.0

@MariaDolotova
Copy link
Author

MariaDolotova commented Jan 30, 2024

Hi @Zhirnoff ! thank you very much for the update. I'm now testing setting of smarts to Ketcher. But when I call setMolecule method with the following smarts: "[!#6&!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1" I get an error:
image
Obviously, we need to pass some additional parameter when creating the sketcher. Or set it after sketcher was created. Can you please point me to the documentation where I can get more information about this smarts_mode and how to set it?

@Zhirnoff
Copy link
Collaborator

@MariaDolotova I use command in DevTool Console: ketcher.setMolecule ('[!#6&!#7]1:[#6]:[#6]:[#6]:[#6]:[#6]:1')
2024-01-30_19h49_06

@Zhirnoff
Copy link
Collaborator

@MariaDolotova We are providing some information about the API from our knowledge base:
EPMLSOP-Ketcher'sAPI-300124-1810-2348.pdf

@MariaDolotova
Copy link
Author

@Zhirnoff , thank you, the problem was fixed.

@Zhirnoff
Copy link
Collaborator

@MariaDolotova You're welcome! I'm glad to hear that the problem has been resolved. If you have any further questions or issues, feel free to ask.

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

No branches or pull requests

5 participants