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

Add bond custom query field #3328

Closed
AlexanderSavelyev opened this issue Sep 15, 2023 · 0 comments · Fixed by #3353
Closed

Add bond custom query field #3328

AlexanderSavelyev opened this issue Sep 15, 2023 · 0 comments · Fixed by #3353

Comments

@AlexanderSavelyev
Copy link
Contributor

AlexanderSavelyev commented Sep 15, 2023

Background
There is no way to make a SMARTS query for bonds

Solution
Add Text field to the Ketcher Bond Properties

(checkbox) "Custom query"
(input textfield)

  • By default, checkbox=False, text field is empty and disabled

  • if checkbox is true then text field is enabled, but all other controls in bond properties are disabled and should be empty

  • if checkbox pressed to false again, the properties should return to the initial states

  • after press on checkbox=true then all the current properties should be copied into the input field with ";" as a separator

    • following SMARTS to be used
    • single bond: -
    • double bond: =
    • triple bond: #
    • aromatic bond: :
    • any bond: ~
    • single up: /
    • single down: \
    • topology ring: @
    • in all other cases make empty
  • Examples

    • e.g. if Bond Type= "Single" , Topology = "Either"
      then customQuery = -

    • Bond Type= "Double" , Topology = "Ring"
      then customQuery = =;@

  • Only one validation: input field should not be empty

  • If custom query is not empty UI Ketcher should display content of the custom query on the bond. Bond should be displayed on canvas as any bond

  • after pressing apply with (customQuery not empty and checkbox=true) and press edit the bond again, press checkbox=false then the bond properties should be set to default: type=single, topology=either, center=unmarked

  • In KET format customQuery should be saved into the bond object without other properties

  • right click menu should be available without any changes. If customQuery is defined on a bond and the type is changed by right click menu (e.g. select Single bond) - the customQuery should be removed from the bond

@AlexanderSavelyev AlexanderSavelyev added this to the Refined Backlog milestone Sep 15, 2023
AKZhuk added a commit that referenced this issue Sep 21, 2023
@AKZhuk AKZhuk linked a pull request Sep 21, 2023 that will close this issue
9 tasks
AKZhuk added a commit that referenced this issue Sep 22, 2023
AKZhuk added a commit that referenced this issue Sep 22, 2023
AKZhuk added a commit that referenced this issue Sep 22, 2023
Nitvex pushed a commit that referenced this issue Sep 22, 2023
* #3328 - Add bond custom query field

* #3328 - Add bond custom query field
- Fix e2e tests

* #3328 - Add bond custom query field
- Fix pr comments
SashaGraves pushed a commit that referenced this issue Sep 28, 2023
* #3328 - Add bond custom query field

* #3328 - Add bond custom query field
- Fix e2e tests

* #3328 - Add bond custom query field
- Fix pr comments
@AKZhuk AKZhuk modified the milestones: Ketcher 2.16.0-rc.1, SMART-Enhancement Oct 18, 2023
@Nitvex Nitvex modified the milestones: SMART Enhancement, Ketcher 2.16.0-rc.1 Oct 23, 2023
@github-project-automation github-project-automation bot moved this to Done in Ketcher Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants