System allow to pass empty values for parameters in HELM alias section
- 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:
_Phosphate1 with empty HELM alias
```javascript
await ketcher.updateMonomersLibrary('\n -INDIGO-10092513102D\n\n 0 0 0 0 0 0 0 0 0 0 0 V3000\nM V30 BEGIN CTAB\nM V30 COUNTS 1 0 0 0 0\nM V30 BEGIN ATOM\nM V30 1 _Phosphate1 11.8462 -10.075 0.0 0 CLASS=PHOSPHATE SEQID=1\nM V30 END ATOM\nM V30 BEGIN BOND\nM V30 END BOND\nM V30 END CTAB\nM V30 BEGIN TEMPLATE\nM V30 TEMPLATE 1 PHOSPHATE/_Phosphate1/_Phosphate1 NATREPLACE=PHOSPHATE/P\nM V30 BEGIN CTAB\nM V30 COUNTS 16 15 6 0 0\nM V30 BEGIN ATOM\nM V30 1 H -5.196 0.75 0.0 0\nM V30 2 C -4.33 0.25 0.0 0\nM V30 3 C -3.464 0.75 0.0 0\nM V30 4 C -2.598 0.25 0.0 0\nM V30 5 C -1.732 0.75 0.0 0\nM V30 6 C -0.866 0.25 0.0 0\nM V30 7 C 0.0 0.75 0.0 0\nM V30 8 C 0.866 0.25 0.0 0\nM V30 9 C 1.732 0.75 0.0 0\nM V30 10 C 2.598 0.25 0.0 0\nM V30 11 C 3.464 0.75 0.0 0\nM V30 12 C 4.33 0.25 0.0 0\nM V30 13 H 5.196 0.75 0.0 0\nM V30 14 H -4.33 -0.75 0.0 0\nM V30 15 H -2.598 -0.75 0.0 0\nM V30 16 H -0.866 -0.75 0.0 0\nM V30 END ATOM\nM V30 BEGIN BOND\nM V30 1 1 1 2\nM V30 2 1 2 3\nM V30 3 1 3 4\nM V30 4 1 4 5\nM V30 5 1 5 6\nM V30 6 1 6 7\nM V30 7 1 7 8\nM V30 8 1 8 9\nM V30 9 1 9 10\nM V30 10 1 10 11\nM V30 11 1 11 12\nM V30 12 1 12 13\nM V30 13 1 2 14\nM V30 14 1 4 15\nM V30 15 1 6 16\nM V30 END BOND\nM V30 BEGIN SGROUP\nM V30 1 SUP 1 ATOMS=(1 1) XBONDS=(1 1) BRKXYZ=(9 0.433000 -0.250000 0.000000-\nM V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-\nM V30 LGRP\nM V30 2 SUP 2 ATOMS=(1 13) XBONDS=(1 12) BRKXYZ=(9 -0.433000 -0.250000 0.000-\nM V30 000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLA-\nM V30 SS=LGRP\nM V30 3 SUP 3 ATOMS=(1 14) XBONDS=(1 13) BRKXYZ=(9 0.000000 0.500000 0.00000-\nM V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-\nM V30 =LGRP\nM V30 4 SUP 4 ATOMS=(1 15) XBONDS=(1 14) BRKXYZ=(9 0.000000 0.500000 0.00000-\nM V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-\nM V30 =LGRP\nM V30 5 SUP 5 ATOMS=(1 16) XBONDS=(1 15) BRKXYZ=(9 0.000000 0.500000 0.00000-\nM V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-\nM V30 =LGRP\nM V30 6 SUP 6 ATOMS=(11 2 3 4 5 6 7 8 9 10 11 12) XBONDS=(5 1 13 14 15 12) B-\nM V30 RKXYZ=(9 -0.433000 0.250000 0.000000 0.000000 -0.500000 0.000000 0.000-\nM V30 000 0.000000 0.000000) BRKXYZ=(9 0.000000 -0.500000 0.000000 0.000000 -\nM V30 -0.500000 0.000000 0.000000 0.000000 0.000000) BRKXYZ=(9 0.433000 0.25-\nM V30 0000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) L-\nM V30 ABEL=_Phosphate1 CLASS=PHOSPHATE SAP=(3 2 1 Al) SAP=(3 12 13 Br) SAP=(-\nM V30 3 2 14 Cx) SAP=(3 4 15 Dx) SAP=(3 6 16 Ex) NATREPLACE=PHOSPHATE/P\nM V30 END SGROUP\nM V30 END CTAB\nM V30 END TEMPLATE\nM END\n> \nmonomerTemplate\n\n> \n\n\n$$$$\n', { format: 'sdf' })
```
**Actual behavior**
`_Phosphate1` unsplit nucleotide appears in the library
**Expected behavior**
Monomer doesn't appear at the Library
System throws an error in console: `Load of "_Phosphate1" monomer has failed, monomer definition contains invalid HELM alias value. The HELM alias must consist only of uppercase and lowercase letters, numbers, hyphens (-), underscores (_), and asterisks (*), spaces prohibited.`
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). If that is not true, an error message appears in the console: "The HELM alias must consist only of uppercase and lowercase letters, numbers, hyphens (-), underscores (_), and asterisks (*), spaces prohibited."
> If a monomer/preset property is incorrect for whatever reason: skip that monomers, load the rest and throw an error with monomer name and details
**Environment details:**
- Ketcher Version 3.9.0-rc.1 Build at 2025-10-02; 16:35:40
- Indigo Version 1.37.0-rc.1.0-gca09660df-wasm32-wasm-clang-19.0.0
- Chrome Version 141.0.7390.55 (Official Build) (64-bit)
- Win10
Related issue: https://github.com/epam/Indigo/issues/3161
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.