When saving nucleotide component marking as CML, only bonds remain after re-opening
- Dominant language
- C++
- Stars
- 406
- Forks
- 134
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Description
**Description:**
If a structure containing nucleotide component markings (e.g., Base, Sugar, Phosphate) is saved in CML format, and then re-opened, all marking elements are lost — only bonds remain visible on the canvas. This leads to data loss and incorrect representation of the saved structure.
**Steps to Reproduce**
1. Create a nucleotide structure with component markings (e.g. Base, Sugar, Phosphate). or open file [ketcher (14).zip](https://github.com/user-attachments/files/21017194/ketcher.14.zip)
2. Save the structure in CML format.
3. Reopen the saved file in the editor.
4. Observe the result.
**Actual behavior**
Only the bonds are loaded; component names and grouping elements disappear entirely.

Payload
```
{"struct":"{\n \"root\": {\n \"nodes\": [\n {\n \"$ref\": \"mol0\"\n }\n ],\n \"connections\": [],\n \"templates\": []\n },\n \"mol0\": {\n \"type\": \"molecule\",\n \"atoms\": [\n {\n \"label\": \"N\",\n \"location\": [\n 6.044487126816703,\n -3.018689897220381,\n 0\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 6.044487126816703,\n -3.7772435752060423,\n 0\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 6.7013946119522885,\n -4.156520414198874,\n 0\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 7.35830209708787,\n -3.7772435752060423,\n 0\n ]\n },\n {\n \"label\": \"N\",\n \"location\": [\n 7.35830209708787,\n -3.018689897220381,\n 0\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 6.7013946119522885,\n -2.6394130582275492,\n 0\n ]\n },\n {\n \"label\": \"N\",\n \"location\": [\n 6.54361544693127,\n -4.898385911268851,\n 0\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 5.788854537335535,\n -4.97727549377936,\n 0\n ]\n },\n {\n \"label\": \"N\",\n \"location\": [\n 4.571040600696145,\n -5.257221056401079,\n 0\n ]\n },\n {\n \"label\": \"N\",\n \"location\": [\n 8.015209582223454,\n -4.156520414198874,\n 0\n ]\n },\n {\n \"type\": \"rg-label\",\n \"location\": [\n 4.738257693325394,\n -4.126936820757433,\n 0\n ],\n \"$refs\": [\n \"rg-1\"\n ]\n },\n {\n \"label\": \"C\",\n \"location\": [\n 5.782869294853828,\n -1.5812616537992437,\n 0\n Show more
```
Response
```
{
"format": "chemical/x-cml",
"original_format": "chemical/x-indigo-ket",
"struct": "\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 1\n \n \n 1\n \n \n 1\n \n \n 1\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n C\n \n \n \n C\n \n \n \n C\n \n \n \n \n \n T\n \n \n \n \n \n \n \n \n \n \n W\n \n \n H\n \n \n W\n \n \n \n W\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"
}
```
**Expected behavior**
All component markings should be preserved in the CML file and rendered correctly after reopening.
**Desktop:**
- OS: Windows 11
- Browser Chrome
Version 137.0.7151.104 (Official Build) (64-bit)
**Ketcher version**
[Version 3.6.0-rc.1]
**Indigo version**
[Version 1.34.0-rc.1]
This bug was found while testing: https://github.com/epam/ketcher/issues/7164
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.