epam / ketcher

Web-based molecule sketcher
https://lifescience.opensource.epam.com/ketcher/demo.html
Apache License 2.0
463 stars 164 forks source link

The structure with any Atom Generic and R, Pol or H+ can be saved but can't be opened after saving in Daylight SMARTS format. #42

Open AlexanderSavelyev opened 4 years ago

AlexanderSavelyev commented 4 years ago

Steps to reproduce

  1. Create any structure, for example, chain.
  2. Click Periodic table.
  3. Open Extended tab.
  4. Click Pol in the Special Nodes section, click the OK button and click any structure atom.
  5. Click "Save as" button. Select Daylight SMART format. Close warning message.
  6. Click Periodic table.
  7. Open Extended tab.
  8. Click any button in the Atom Generic section, for example, A, click the OK button and click another structure atom.
  9. Click "Save as" button. Select Daylight SMART format. Click OK.
  10. Clear the canvas.
  11. Open the structure saved at 5th step.

Actual result After 5th step when user tries to save the structure with Pol, the message "Indigo Exception: SMILE saver: SMARTS format availible for quary only" appears on the screen. image

When any Atom Generic and Pol, R or H+ (for example, A and Pol, M and H+ etc.) present at the structure, the structure can be saved in Daylight Smart format, but can't be opened. The error message appears at the screen "Indigo Exception: molecule auto loader: SMILES loader: empty atom?" : image

Expected result: The structure after opening from saved file should display at the same way as before saving. If the editor can't support such structure, warning message about it should appear before the saving and structure shouldn't be saved.

Note: I checked combinations of Special Nodes and Atom Generics:

Special node\Atom Generic A AH Q QH M MH X XH
can't opened can't opened can't opened can't opened can't opened can't opened can't opened can't opened
can't opened can't opened can't opened can't opened can't opened can't opened can't opened can't opened
OK OK OK OK OK OK OK OK
OK OK OK OK OK OK OK OK
can't opened can't opened can't opened can't opened can't opened can't opened can't opened can't opened
AleksandraIvleva commented 3 years ago

The issue is on Indigo side. New bug was created: https://github.com/epam/Indigo/issues/478