Skip to content

Allowed list atoms should be read as dummy atoms #8820

@cdvonbargen

Description

@cdvonbargen

Describe the bug
When reading an allowed list (or not allowed list) from a molblock, it appears that the underlying atom is set to a specific element -- proposal here is enforce allowed list atoms to be dummies for such query types.

To Reproduce

>>> from rdkit import Chem
>>> mb = """
...      RDKit          2D
...
...   0  0  0  0  0  0  0  0  0  0999 V3000
... M  V30 BEGIN CTAB
... M  V30 COUNTS 3 2 0 0 0
... M  V30 BEGIN ATOM
... M  V30 1 C -14.969697 7.242424 0.000000 0
... M  V30 2 [C,N] -13.670659 7.992424 0.000000 0
... M  V30 3 C -12.371621 7.242424 0.000000 0
... M  V30 END ATOM
... M  V30 BEGIN BOND
... M  V30 1 1 1 2
... M  V30 2 1 2 3
... M  V30 END BOND
... M  V30 END CTAB
... M  END
... $$$$
... """
>>> mol = Chem.MolFromMolBlock(mb)
>>> mol.Debug()
Atoms:
	0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: SP3
	1 6 C chg: 0  deg: 2 exp: 2 imp: 2 hyb: SP3 query: AtomOr
	2 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: SP3
Bonds:
	0 0->1 order: 1
	1 1->2 order: 1
>>>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions