epam / epam/Indigo

System provides invalid SDF content (empty HELM alias) on monomer creation

Open
#3,302 0 comments 0 reactions 1 assignee Claimed by @even1024 View on GitHub
Priority: Medium Severity: Medium
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

**Steps to Reproduce**
1. Open Macromolecules - Flex mode (clean canvas)
2. Go to console and execute following commands: `await ketcher.editor.subscribe('libraryUpdate', console.log)`
3. Create any monomer as shown on pic below
Image

**Actual behavior**
System throws in console:
```

-INDIGO-01000000002D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 BEGIN ATOM
M V30 END ATOM
M V30 BEGIN BOND
M V30 END BOND
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 1 AA/aaaa/aaaa/ NATREPLACE=AA/A FULLNAME=aaaa
M V30 BEGIN CTAB
M V30 COUNTS 5 4 3 0 0
M V30 BEGIN ATOM
M V30 1 H -1.732 0.25 0.0 0
M V30 2 C -0.866 -0.25 0.0 0
M V30 3 C 0.0 0.25 0.0 0
M V30 4 C 0.866 -0.25 0.0 0
M V30 5 H 1.732 0.25 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 2 3
M V30 3 1 3 4
M V30 4 1 4 5
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 1) XBONDS=(1 1) BRKXYZ=(9 0.433000 -0.250000 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 5) XBONDS=(1 4) BRKXYZ=(9 -0.433000 -0.250000 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-
M V30 =LGRP
M V30 3 SUP 3 ATOMS=(3 2 3 4) XBONDS=(2 1 4) BRKXYZ=(9 -0.433000 0.250000 0.-
M V30 000000 0.433000 0.250000 0.000000 0.000000 0.000000 0.000000) LABEL=aa-
M V30 aa CLASS=AA SAP=(3 2 1 Al) SAP=(3 4 5 Br) NATREPLACE=AA/A
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END
>
monomerTemplate

>

$$$$
```

**Expected behavior**
System throws in console:
```

-INDIGO-01000000002D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 BEGIN ATOM
M V30 END ATOM
M V30 BEGIN BOND
M V30 END BOND
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 1 AA/aaaa/aaaa/ NATREPLACE=AA/A FULLNAME=aaaa
M V30 BEGIN CTAB
M V30 COUNTS 5 4 3 0 0
M V30 BEGIN ATOM
M V30 1 H -1.732 0.25 0.0 0
M V30 2 C -0.866 -0.25 0.0 0
M V30 3 C 0.0 0.25 0.0 0
M V30 4 C 0.866 -0.25 0.0 0
M V30 5 H 1.732 0.25 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 2 3
M V30 3 1 3 4
M V30 4 1 4 5
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 1) XBONDS=(1 1) BRKXYZ=(9 0.433000 -0.250000 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 5) XBONDS=(1 4) BRKXYZ=(9 -0.433000 -0.250000 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-
M V30 =LGRP
M V30 3 SUP 3 ATOMS=(3 2 3 4) XBONDS=(2 1 4) BRKXYZ=(9 -0.433000 0.250000 0.-
M V30 000000 0.433000 0.250000 0.000000 0.000000 0.000000 0.000000) LABEL=aa-
M V30 aa CLASS=AA SAP=(3 2 1 Al) SAP=(3 4 5 Br) NATREPLACE=AA/A
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END
>
monomerTemplate

$$$$
```

As per [requirement](https://github.com/epam/Indigo/issues/3161):

> The HELM symbol must be a string of uppercase and lowercase letters, numbers, hyphens (-), underscores (_), and asterisks (*) (spaces prohibited).

**Environment details:**
- Ketcher Version 3.10.0-rc.1 Build at 2025-11-03; 14:05:05
- Indigo Version 1.38.0-rc.1.0-g155cc4da8-wasm32-wasm-clang-19.0.0
- Chrome Version 142.0.7444.60 (Official Build) (64-bit)
- Win10

Related issue: https://github.com/epam/Indigo/issues/3272

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.