epam / Indigo

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

Convert of mol file in Daylight SMARTS format returns incorrect responce #330

Open KseniiaSemenishcheva opened 3 years ago

KseniiaSemenishcheva commented 3 years ago

Steps to Reproduce:

  1. Call indigo.convert with following options:

output_format: "chemical/x-daylight-smarts"

struct: "↵ Ketcher 2172111 22D 1 1.00000 0.00000 0↵↵ 11 10 0 0 0 999 V2000↵ 3.0750 -4.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 3.9410 -5.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 4.8071 -4.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 5.6731 -5.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 6.5391 -4.6500 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0↵ 7.4051 -5.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 8.2712 -4.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 9.1372 -5.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 10.0032 -4.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 10.8692 -5.1500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 11.7353 -4.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0↵ 1 2 1 0 0 0↵ 2 3 1 0 0 0↵ 3 4 1 0 0 0↵ 4 5 1 0 0 0↵ 5 6 1 0 0 0↵ 6 7 1 0 0 0↵ 7 8 1 0 0 0↵ 8 9 1 0 0 0↵ 9 10 1 0 0 0↵ 10 11 1 0 0 0↵M END↵"

Expected Result: Correct Daylight SMARTS string in response.

Actual Result: all atoms except the terminal ones are replaced with diradicals (singlets), terminal atoms display with (I) valence.

{ "format": "chemical/x-daylight-smarts", "struct": "[#6]-[#6]-[#6]-[#6]-[*]-[#6]-[#6]-[#6]-[#6]-[#6]-[#6] |$;;;;AH_p;;;;;;$|" }

If user then calls indigo.layout for this string response is:

{ "format": "chemical/x-mdl-molfile", "struct": "\n -INDIGO-02172108092D\n\n 11 10 0 0 0 0 0 0 0 0999 V2000\n -6.9282 0.8000 0.0000 C 0 0 0 0 0 1 0 0 0 0 0 0\n -5.5426 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -4.1569 0.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -2.7713 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -1.3856 0.8000 0.0000 AH 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1.3856 0.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 2.7713 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 4.1569 0.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 5.5426 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 6.9282 0.8000 0.0000 C 0 0 0 0 0 1 0 0 0 0 0 0\n 1 2 1 0 0 0 0\n 2 3 1 0 0 0 0\n 3 4 1 0 0 0 0\n 4 5 1 0 0 0 0\n 5 6 1 0 0 0 0\n 6 7 1 0 0 0 0\n 7 8 1 0 0 0 0\n 8 9 1 0 0 0 0\n 9 10 1 0 0 0 0\n 10 11 1 0 0 0 0\nM RAD 8 2 1 3 1 4 1 6 1 7 1 8 1 9 1 10 1\nM END\n" }

KseniiaSemenishcheva commented 3 years ago

Related issue: https://github.com/epam/ketcher/issues/41