epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
291 stars 100 forks source link

Preview: Export of unresolved monomer to everything except KET and IDT should cause specific error message (but it doesn't) #2045

Open AlexeyGirin opened 3 days ago

AlexeyGirin commented 3 days ago

Steps to Reproduce

  1. Go to Macromolecules mode - Flex mode
  2. Load using paste from clipboard IDT type: /i2AmPr/ image
  3. Try to save canvas to MOL V3000 (and others unsupported - Sequence, FASTA, Mol V2000, SDF V2000, SDF V3000, SMARTS, SMILES, Extended SMILES, CML, InChl, InChI AuxInfo, InChIKey, CDXML, Base64 CDX, CDX)

Actual behavior System shows an error: Convert error! Given string could not be loaded as (query or plain) molecule or reaction, see the error messages: 'molecule json loader: Expected atoms block not found', 'RXN loader: bad header {', 'RXN loader: bad header {', 'molecule json loader: Expected atoms block not found' image

Expected behavior System shows an error: Monomer /i2AmPr/ couldn't be saved to MDL Molfile V3000 format image

As per requirements:

4. Attempt to save macromolecules with unknown monomers to file formats other than IDT and KET should result in error.
"Monomer /.../ couldn't be saved to .... format"

Versions

Issue found while testing - https://github.com/epam/ketcher/issues/4431