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

Contracted unknown superatom is parsed as expanded, and brackets with name are lost #2614

Closed
Zhirnoff opened this issue May 17, 2023 · 0 comments · Fixed by #2615 or #2617
Closed

Contracted unknown superatom is parsed as expanded, and brackets with name are lost #2614

Zhirnoff opened this issue May 17, 2023 · 0 comments · Fixed by #2615 or #2617

Comments

@Zhirnoff
Copy link
Collaborator

Zhirnoff commented May 17, 2023

Steps to Reproduce

  1. Open Ketcher
  2. Open DevConsole
  3. Add unknown superatoms through API:
ketcher.setMolecule(`
  Ketcher  5172314472D 1   1.00000     0.00000     0

 20 20  0  0  0  0  0  0  0  0999 V2000
   12.5971   -7.6339    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   14.3274   -7.6334    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   13.4639   -7.1338    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   14.3274   -8.6343    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   12.5971   -8.6388    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   13.4661   -9.1338    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   15.1937   -7.1338    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   11.7325   -9.1413    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   11.7311   -7.1337    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   15.1939   -9.1335    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.5721   -7.6589    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.3024   -7.6584    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.4389   -7.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    8.3024   -8.6593    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    6.5721   -8.6638    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    7.4411   -9.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.1687   -7.1588    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.7075   -9.1663    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    5.7061   -7.1587    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    9.1689   -9.1585    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  3  1  2  0     0  0
  4  2  2  0     0  0
  1  5  1  0     0  0
  2  3  1  0     0  0
  5  6  2  0     0  0
  6  4  1  0     0  0
  2  7  1  0     0  0
  5  8  1  0     0  0
  1  9  1  0     0  0
  4 10  1  0     0  0
 13 11  2  0     0  0
 14 12  2  0     0  0
 11 15  1  0     0  0
 12 13  1  0     0  0
 15 16  2  0     0  0
 16 14  1  0     0  0
 12 17  1  0     0  0
 15 18  1  0     0  0
 11 19  1  0     0  0
 14 20  1  0     0  0
M  STY  1   1 SUP
M  SLB  1   1   1
M  SAL   1 10   1   2   3   4   5   6   7   8   9  10
M  SMT   1 Some Name
M  STY  1   2 SUP
M  SLB  1   2   2
M  SAL   2 10  11  12  13  14  15  16  17  18  19  20
M  SMT   2 Some Name
M  SDS EXP  1   1
M  END
`)

Actual behavior
Contracted unknown superatom is parsed as expanded, and brackets with the name are lost.
Expanded unknown superatom is parsed correctly but cannot be contracted again.
2023-05-17_15h03_52

Expected behavior
A contracted unknown superatom is parsed as contracted and user can expand it without loses a brackets with name. And expanded one is parsed expanded and can be contract
2023-05-17_15h04_11

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 112.0.5615.138 (Official Build) (64-bit)

Ketcher version
Version 2.10.0-rc.3

#184643893

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