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

When pasting Extended SMILES structure with stereochemistry there are two &1 centers instead of an ABS and an &1 #1102

Closed
Zhirnoff opened this issue Apr 19, 2023 · 3 comments · Fixed by #1131

Comments

@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Apr 19, 2023

Steps to Reproduce

  1. Open Ketcher
  2. Paste structure C[C@@H]1[C@H](C)C(C2O[C@](F)(C)[C@]2(C)C)CN1 |&1:1,a:2,o1:7,10,r|
  3. Look at structure
    Note: If you delete 'r' from pasting file it is pasting correct with one &1 centers and an ABS

Expected behavior
There are one &1 centers and an ABS
2023-04-19_17h29_20

Actual behavior
There are two &1 centers
2023-04-19_17h29_46

Indigo/Bingo version
Version 1.10.0-rc.6.0-g43355840b-wasm32-wasm-clang-13.0.0

#184720789

@Zhirnoff Zhirnoff added this to the Indigo-1.11.0-rc.1 milestone Apr 19, 2023
@Zhirnoff Zhirnoff added this to Product Backlog in Indigo via automation Apr 19, 2023
@Wadym Wadym assigned Wadym and unassigned even1024 Apr 24, 2023
@Wadym Wadym moved this from Product Backlog to In progress in Indigo Apr 24, 2023
@AlexanderSavelyev
Copy link
Collaborator

AlexanderSavelyev commented Apr 26, 2023

by extended smiles specification the r flag
The Absolute label, also known as the MDL "Chiral flag", is the default configuration and is not marked in the CXSMILES string. The absence of the Absolute label is denoted by "r"; this corresponds to the relative configuration in the MDL Original Stereochemical Representation

so the current behavior is correct only for the case if the center is not defined
Another question is for the "ignore-no-chiral-flag" is True then there should be ABS flag for unspecified center
so the issue should be for the option

indigo.setOption("ignore-no-chiral-flag", True)

Wadym added a commit that referenced this issue May 12, 2023
…here are two &1 centers instead of an ABS and an &1
@Wadym
Copy link
Collaborator

Wadym commented May 15, 2023

after implementing 'r' and 'ignore_no_chiral_flag' serialize_check.py test fails.
Differences in test outputs:
image

@Wadym
Copy link
Collaborator

Wadym commented May 15, 2023

Added dif file for discussion
serialize_check.py.diff.txt
`- C1(C(C/C=C%91/[11CH]%92[10CH3])C@@HC@@H14N[C@H]1C(C@(C)O)PC1C2C3C45C67C(C89CC%10%11C%128C8%13C%14%15C%16C%108C(CCC8%16CCC8%14CC8CCC%10%14CC%16CC%17C%18C%19%20C%21%22C%23C%24C%13(C%12%23C96C%217C6%19C43C(CC2)CC(C%186)CC%17)C2%15C8C%102C%22%24C%20%14%16)C%11)C5C1)C.C*(C).[:2]%92[15CH]%92%93.[:1]%92.[:5]%93.C(=[C@]=CC)C(C=[C@@]=CC)=[C@]=C(C)O.C(=[C@]=C(O)C)(C)S.C(=[C@@]=C(O)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC(C(C(C(C(CN)N)C)C1C=CC=NC=1)C)N)(C)S.C12C=C3N+C.[O+]1(C=CC=C1)C.C1C=COBC=1.C1CCC=CC=CC=CC=CC=CC=CC=1.S1C(C#CC)NCC#C1.[W+5].[W-5].C(=C=C(O)C)(C)S.[Ag].[3HH].[Ar].[Xe].[Mn].[Zn].[Cu].B.[Kr].[Pd].[Rn].[Pt].[Cd].[HH].[LiH].[NaH].[KH].[RbH].[CsH].[Sc].[Y].[La].[Ce].[Tb].[Th].[Bk].[2HH].[Be].[Mg].[Ca].[Sr].[Ba].[Ti].[Zr].[Hf].[Pr].[Dy].[Pa].[Cf].[He].[Ne].[AlH3].[GaH3].[InH3].[TlH].[V].[Nb].[Ta].[Nd].[Ho].[U].[Es].[FrH].C.[SiH4].[GeH4].[SnH2].[PbH2].[Cr].[Mo].[W].[Pm].[Er].[Np].[Fm].[Ra].N.P.[AsH3].[SbH3].[BiH3].[Fe].[Tc].[Re].[Sm].[Tm].[Pu].[Md].[Ac].O.S.[SeH2].[TeH2].[PoH2].[Ni].[Ru].[Os].[Eu].[Yb].[Am].[No].[Rf].F.Cl.Br.I.[AtH].[Co].[Rh].[Ir].[Gd].[Lu].[Cm].[Lr].[Hg].[Au].[*:1]%91 |c:316,320,324,t:318,322,326,w:1,o1:7,21,o2:26,&1:27,36,38,r,^4:32,^1:33,^3:34,$;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SDF;;SDF;_R2;;_R1;_R5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;_AP1$,ha:1,2,19,22,23,24,29,31,36,37,39,hb:6,7,18,20,23,25,35,36,300,325,Sg:n:110,109,111:n:eu|

  • C1(C(C/C=C%91/[11CH]%92[10CH3])C@@HC@@H14N[C@H]1C(C@(C)O)PC1C2C3C45C67C(C89CC%10%11C%128C8%13C%14%15C%16C%108C(CCC8%16CCC8%14CC8CCC%10%14CC%16CC%17C%18C%19%20C%21%22C%23C%24C%13(C%12%23C96C%217C6%19C43C(CC2)CC(C%186)CC%17)C2%15C8C%102C%22%24C%20%14%16)C%11)C5C1)C.C*(C).[:2]%92[15CH]%92%93.[:1]%92.[:5]%93.C(=[C@]=CC)C(C=[C@@]=CC)=[C@]=C(C)O.C(=[C@]=C(O)C)(C)S.C(=[C@@]=C(O)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;_AP1$,ha:1,2,19,22,23,24,29,31,36,37,39,hb:6,7,18,20,23,25,35,36,300,325,Sg:n:110,109,111:n:eu|
  • C1(C(C/C=C%91/[11CH]%92[10CH3])C@@HC@@H14N[C@H]1C(C@(C)O)PC1C2C3C45C67C(C89CC%10%11C%128C8%13C%14%15C%16C%108C(CCC8%16CCC8%14CC8CCC%10%14CC%16CC%17C%18C%19%20C%21%22C%23C%24C%13(C%12%23C96C%217C6%19C43C(CC2)CC(C%186)CC%17)C2%15C8C%102C%22%24C%20%14%16)C%11)C5C1)C.C*(C).[:2]%92[15CH]%92%93.[:1]%92.[:5]%93.C(=[C@]=CC)C(C=[C@@]=CC)=[C@]=C(C)O.C(=[C@]=C(O)C)(C)S.C(=[C@@]=C(O)CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC(C(C(C(C(CN)N)C)c1ccc[n]c1)C)N)(C)S.c12cc3n+C.[o+]1(cccc1)C.c1cco[bH]c1.C1CCC=CC=CC=CC=CC=CC=CC=1.S1C(C#CC)NCC#C1.[W+5].[W-5].C(=C=C(O)C)(C)S.[Ag].[3HH].[Ar].[Xe].[Mn].[Zn].[Cu].B.[Kr].[Pd].[Rn].[Pt].[Cd].[HH].[LiH].[NaH].[KH].[RbH].[CsH].[Sc].[Y].[La].[Ce].[Tb].[Th].[Bk].[2HH].[Be].[Mg].[Ca].[Sr].[Ba].[Ti].[Zr].[Hf].[Pr].[Dy].[Pa].[Cf].[He].[Ne].[AlH3].[GaH3].[InH3].[TlH].[V].[Nb].[Ta].[Nd].[Ho].[U].[Es].[FrH].C.[SiH4].[GeH4].[SnH2].[PbH2].[Cr].[Mo].[W].[Pm].[Er].[Np].[Fm].[Ra].N.P.[AsH3].[SbH3].[BiH3].[Fe].[Tc].[Re].[Sm].[Tm].[Pu].[Md].[Ac].O.S.[SeH2].[TeH2].[PoH2].[Ni].[Ru].[Os].[Eu].[Yb].[Am].[No].[Rf].F.Cl.Br.I.[AtH].[Co].[Rh].[Ir].[Gd].[Lu].[Cm].[Lr].[Hg].[Au].[*:1]%91 |c:316,320,324,t:318,322,326,w:1,o1:7,21,o2:26,&1:27,36,38,r,^4:32,^1:33,^3:34,$;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SDF;;SDF;_R2;;_R1;_R5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;_AP1$,ha:1,2,19,22,23,24,29,31,36,37,39,hb:6,7,18,20,23,25,35,36,300,325,Sg:n:110,109,111:n:eu|
  • C1(C(C/C=C%91/[11CH]%92[10CH3])C@@HC@@H14N[C@H]1C(C@(C)O)PC1C2C3C45C67C(C89CC%10%11C%128C8%13C%14%15C%16C%108C(CCC8%16CCC8%14CC8CCC%10%14CC%16CC%17C%18C%19%20C%21%22C%23C%24C%13(C%12%23C96C%217C6%19C43C(CC2)CC(C%186)CC%17)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;;;;;;;;;;;;;;SDF;;SDF;_R2;;_R1;_R5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;_AP1$,ha:1,2,19,22,23,24,29,31,36,37,39,hb:6,7,18,20,23,25,35,36,300,325,Sg:n:110,109,111:n:eu|

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