System should not load monomer to the library if empty modificationTypes value provided
- 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:
_Peptide1 with empty modificationTypes
```javascript
await ketcher.updateMonomersLibrary('\n -INDIGO-10122515372D\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 _Peptide1 11.975 -7.85 0.0 0 CLASS=AA 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 AA/_Peptide1/_Peptide1/ NATREPLACE=AA/A\nM V30 BEGIN CTAB\nM V30 COUNTS 4 3 3 0 0\nM V30 BEGIN ATOM\nM V30 1 C -0.75 0.0 0.0 0\nM V30 2 C 0.25 0.0 0.0 0\nM V30 3 H 0.75 0.866 0.0 0\nM V30 4 H 0.75 -0.866 0.0 0\nM V30 END ATOM\nM V30 BEGIN BOND\nM V30 1 2 1 2\nM V30 2 1 2 3\nM V30 3 1 2 4\nM V30 END BOND\nM V30 BEGIN SGROUP\nM V30 1 SUP 1 ATOMS=(1 3) XBONDS=(1 2) BRKXYZ=(9 -0.250000 -0.433000 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 2 SUP 2 ATOMS=(1 4) XBONDS=(1 3) BRKXYZ=(9 -0.250000 0.433000 0.000000-\nM V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-\nM V30 LGRP\nM V30 3 SUP 3 ATOMS=(2 1 2) XBONDS=(2 2 3) BRKXYZ=(9 0.250000 0.433000 0.000-\nM V30 000 0.250000 -0.433000 0.000000 0.000000 0.000000 0.000000) LABEL=_Pep-\nM V30 tide1 CLASS=AA SAP=(3 2 3 Al) SAP=(3 2 4 Br) NATREPLACE=AA/A\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**
`_Peptide1` amino acid appears in the library
**Expected behavior**
Monomer doesn't appear at the Library
System throws an error in console: `Load of "_Peptide1" monomer has failed, monomer definition contains invalid modificationTypes value. The modificationTypes couldn't be empty`
As per [requirement](https://github.com/epam/Indigo/issues/3161):
> - `modificationTypes` - string, optional. Used for aminoacids modification through the context menu.
Format: Any symbol except formatting ones, max length 200, spaces allowed
If value doesn't fit format - throw an error
**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.