Charge and isotope set to zero are ignored at SMARTS
- Dominant language
- C++
- Stars
- 406
- Forks
- 134
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 24
Description
**Steps to Reproduce**
Convert structure with charge and isotope set to zero into SMARTS format
**Expected behavior**
Charge and isotope values should be included into SMARTS:
```
[#6]-[#6;0;+0]
```
**Actual behavior**
Charge and isotope values are ignored at SMARTS:
```
[#6]-[#6]
```
**Attachments**

**Technical details**
Method:
v2/indigo/convert
Payload options:
```
{
"smart-layout": true,
"ignore-stereochemistry-errors": true,
"mass-skip-error-on-pseudoatoms": false,
"gross-formula-add-rsites": true,
"aromatize-skip-superatoms": true,
"dearomatize-on-load": false,
"ignore-no-chiral-flag": false,
"gross-formula-add-isotopes": true
}
```
Payload structure:
```
{
"root": {
"nodes": [
{
"$ref": "mol0"
}
]
},
"mol0": {
"type": "molecule",
"atoms": [
{
"label": "C",
"location": [
8.316987298107781,
-9.450000000000001,
0
]
},
{
"label": "C",
"location": [
9.183012701892219,
-8.950000000000001,
0
],
"charge": 0,
"isotope": 0
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
}
]
}
}
```
**Indigo/Bingo version**
Version 1.17.0-rc.2.0-g7501bfd6c-x86_64-linux-gnu-11.2.1
**Additional context**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the issue through the v2/indigo/convert method with the payload structure and options shown. Trace the SMARTS conversion path and add a regression test for explicit zero charge and isotope values; done means the output includes [#6;0;+0] as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100