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

The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from/to RDF #2407

Closed
ivanmaslow opened this issue Sep 19, 2024 · 4 comments · Fixed by #2439 or #2570
Assignees
Labels
Bug Cascade reactions MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes Priority: High

Comments

@ivanmaslow
Copy link
Collaborator

ivanmaslow commented Sep 19, 2024

Expected pathway reaction ordering
Idea is to follow reactant’s order: first reactant in a reaction must be "at the top" position of a multi-tailed arrow, as upper molecule in a reaction (reactant near multi-tailed arrow) must be the first reactant in RXN format.

Image

Steps to Reproduce 1

  1. Load from RDF file with the single cascade reaction with several branches:
    !Synthia_path_5_tails.zip

Actual Result

  • The first branch of cascade reactions in RDF file is the second on Canvas:
    image

Expected Result

  • The first branch of cascade reactions in the RDF file is the first on Canvas
  1. Save to RDF and Load again

Actual Result

  • Positioning of elements is changed after Save/Load, but it should like after the first load:
    image

Expected Result

  • Positioning of elements isn't changed after Save/Load, it's displayed like after the first load

Steps to Reproduce 2

  1. Load from RDF file with several single reactions:
    rdf-rxn-v2000-reactions-1x1-2x2-3x3.zip

Actual Result

  • The first reaction in RDF file is the third on Canvas, the third reaction in RDF is the first on Canvas:
    image

Expected Result

  • Reactions should be displayed on Canvas as in RDF file 1:1, 2:2, 3:3
  1. Save to RDF

Actual Result

  • It can't be saved as separate reactions:
    image

Expected Result

Steps to Reproduce 3 - Ordering of elements

  1. Load from KET reaction:ket-cascade-reaction-3-1-2-1-1.zip
    image
  2. Click on Layout or make Save/Load to/from RDF:

Actual result:

  • Arrow is changed according to indigo default sizes, elements are aligned, cyclopropane changes the position:
    image

Expected result:

  • Arrow is changed according to indigo default sizes, elements are aligned, cyclopropane doesn't change the position:
    image

Environment details:

  • Tested on CI CD master SA environment
  • Ketcher [Version 2.25.0-rc.1] Build at 2024-09-18; 05:59:24
  • Indigo Version 1.25.0-dev.1.38-gdbf49deb-wasm32-wasm-clang-12.0.0
  • Windows 11 Enterprise
  • Chrome Version 128.0.6613.138 (Official Build) (64-bit)

Notes

@ivanmaslow ivanmaslow added Bug Priority: Medium Cascade reactions MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes labels Sep 19, 2024
@ivanmaslow ivanmaslow added this to the Indigo-1.25.0-rc.1 milestone Sep 19, 2024
@ivanmaslow ivanmaslow changed the title The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from RDF Preview: The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from RDF Sep 19, 2024
@ivanmaslow ivanmaslow changed the title Preview: The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from RDF Preview: The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from/to RDF Sep 20, 2024
@even1024 even1024 linked a pull request Sep 30, 2024 that will close this issue
7 tasks
@ivanmaslow
Copy link
Collaborator Author

Tested on CI CD env with 2309-update-layout:

  • Ketcher [Version 2.25.0-rc.2] Build at 2024-09-30; 06:32:00
  • Version 1.25.0-dev.2.6-g0e1cfa10-wasm32-wasm-clang-12.0.0
  • Desktop, Windows 11 Enterprise
  • Chrome Version 129.0.6668.71 (Official Build) (64-bit)

The second part of the defect isn't fixed:
Reactions are still not in order as in RDF, also the displaying for reactions with several products is broken:
image

@yauhen-karmyzau
Copy link
Collaborator

Cases are not fixed.

@ivanmaslow ivanmaslow changed the title Preview: The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from/to RDF The ordering of branches of cascade reactions and reactions themselves should be the same on Load/Save from/to RDF Oct 4, 2024
@ivanmaslow
Copy link
Collaborator Author

ivanmaslow commented Oct 24, 2024

Pre-tested on aws_ci environment with Ketcher master and Indigo 2407-branch-ordering branches:

  • Ketcher [Version 2.26.0-rc.1] Build at 2024-10-24; 12:25:38;
  • Indigo Version 1.25.0-rc.3.18-gcdee98d4-wasm32-wasm-clang-12.0.0
  • Desktop, Windows 11 Enterprise
  • Chrome Version 130.0.6723.70 (Official Build) (64-bit)

In the first case, the ordering of branches isn't changed after layout actions on save/load to/from RDF:
image

The second case is fixed partially, so it can be loaded with correct ordering for this specific case:
image
But it still can be reproduced for other cases - mentioned in #2452 - ordering is changed after layout or save/load to/from RDF actions:
image
image
ketcher-2452.zip

The third case is fixed:
image
image

AlexanderSavelyev pushed a commit that referenced this issue Oct 24, 2024
…hemselves should be the same on Load/Save from/to RDF (#2570)
even1024 added a commit that referenced this issue Oct 24, 2024
…hemselves should be the same on Load/Save from/to RDF (#2570)
AliaksandrDziarkach pushed a commit that referenced this issue Oct 24, 2024
…reactions themselves should be the same on Load/Save from/to RDF (#2570) (#2577)
@ivanmaslow
Copy link
Collaborator Author

The fix is successfully verified on RC SA env:

  • Ketcher [Version 2.26.0-rc.6] Build at 2024-10-25; 09:57:12
  • Indigo Version 1.25.0-rc.4.0-g8862ccb7e-wasm32-wasm-clang-19.0.0
  • Desktop, Windows 11 Enterprise
  • Chrome Version 130.0.6723.70 (Official Build) (64-bit)

As mentioned above the first case is fixed, branches doesn't change ordering after save/load to/from RDF or layout actions as mentioned above.
The second case is fixed too, another one is reported - #2584.
The third case is fixed as mentioned above.
One more issue detected that's related to ordering - #2585.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Cascade reactions MMPK Scope for Pathway reactions, View-only mode, Static images, Custom buttons and Ketcher API changes Priority: High
Projects
None yet
4 participants