`IndigoException` when handling HELM strings containing the `psiU` monomer
- Dominant language
- C++
- Stars
- 406
- Forks
- 134
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Description
### **Summary**
Indigo cannot fully process HELM sequences containing the `psiU` monomer: side‑chain `psiU` fails during atom expansion, and non–side‑chain `psiU` fails during SMILES generation.
Side-chain case is addressed in the main part of the ticket, and non-side-chain case in Additional context section.
---
### **Steps to Reproduce**
```python
from indigo import Indigo
indigo = Indigo()
monomers_library = indigo.loadMonomerLibraryFromFile(str("path/to/monomer_library.ket"))
helm = "RNA1{R([psiU])}$$$$V2.0"
helm_doc = indigo.loadHelm(helm, monomers_library)
json_mol = indigo.loadMolecule(helm_doc.json())
mol = json_mol.expandedMonomersToAtoms()
```
---
### **Actual Behavior**
When executing the script above, the following exception is thrown:
```text
IndigoException: cis-trans: Cannot flip bond if all substituents are present
```
---
### **Expected Behavior**
The HELM monomer `psiU` should expand to atoms successfully, consistent with other HELM monomers.
---
### **Environment Details**
* **Indigo version:** `1.47.0.rc1`
* **Python version:** `3.12.11`
* **OS version:** Ubuntu 24.04.3 LTS running under WSL2 on Windows 11 Enterprise (version 25H2)
---
### **Additional Context**
When `psiU` is *not* in a side-chain (e.g., when part of the main backbone/sequence), expansion succeeds. However, calling the `smiles()` method on the resulting molecule triggers a separate exception:
```python
from indigo import Indigo
indigo = Indigo()
monomers_library = indigo.loadMonomerLibraryFromFile(str("path/to/monomer_library.ket"))
helm = "RNA1{R.[psiU]}$$$$V2.0"
helm_doc = indigo.loadHelm(helm, monomers_library)
json_mol = indigo.loadMolecule(helm_doc.json())
mol = json_mol.expandedMonomersToAtoms()
smiles = mol.smiles()
```
Output / Exception:
```text
IndigoException: SMILES saver: psiU cannot be written in SMILES/SMARTS format.
```
This exception also occurs for `RNA1{[psiU]}$$$$V2.0`
Contributor guide
No contributing guide indexed for this repository
Research direction
Run the two Python reproductions using loadHelm, expandedMonomersToAtoms, and smiles() to confirm the side-chain expansion and non-side-chain serialization failures. Trace the handling of psiU in those entry points and verify that both examples expand successfully and produce SMILES without either exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100