epam / epam/Indigo

Render api does not faithfully represent chemical structures in PNG

Open
#1,969 1 comment 0 reactions 0 assignees View on GitHub
Priority: High Severity: High User`s Feedback
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

**Summary**

When exporting a chemical structure from ketcher as a PNG, the image created does not match the chemical structures shown in ketcher. SRU polymer brackets are dislocated in the PNG, and hydrogens are represented as HH instead of H2

**Steps to Reproduce**

I added the following structure to ketcher:

```
Ketcher 52424 9162D 1 1.00000 0.00000 0

8 7 0 0 0 0 0 0 0 0999 V2000
16.0547 -2.4559 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
16.9208 -3.9559 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
16.0547 -3.4559 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.1887 -3.9559 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
15.1887 -4.9559 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
14.3227 -5.4559 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
16.0547 -5.4559 0.0000 * 0 0 0 0 0 0 0 0 0 0 0 0
13.4566 -4.9559 0.0000 * 0 0 0 0 0 0 0 0 0 0 0 0
1 3 1 0 0 0
2 3 2 0 0 0
3 4 1 0 0 0
4 5 1 0 0 0
5 6 1 0 0 0
5 7 1 0 0 0
6 8 1 0 0 0
M STY 1 1 SRU
M SLB 1 1 1
M SCN 1 1 HT
M SMT 1 n
M SAL 1 6 1 2 3 4 5 6
M SBL 1 2 6 7
M SDI 1 4 15.6217 -4.4559 15.6217 -5.9559
M SDI 1 4 13.8897 -5.9559 13.8897 -4.4559
M SDS EXP 1 1
M END
```

image

When I try to save the structure as a PNG, I get the following:

image

In addition, if I add a hydrogen to the ketcher canvas and save this as an image, the image shows HH instead of H2.

ketcher canvas:
image

PNG:
image

**Expected Behavior**

I would expect the image created via the indigo render api to faithfully represent the structures created in the ketcher canvas.

**Actual Behavior**

The ketcher structure and exported image do not match. In the example above, the SRU polymer bracket on the right is in the wrong position and the n is added to the left bracket instead of the right bracket. For hydrogen, the image represents this as HH instead of H2.

**Environment details:**
- Indigo Version 1.18.0.0-g73c32dec3-x86_64-linux-gnu-11.2.1
- Ketcher Version 2.20.0 (https://lifescience.opensource.epam.com/KetcherDemo/index.html?api_path=/v2)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.