Ionic bonds in DGLGraphs

In constructing DGLGraphs from molecules by DGL-LifeSci, it seems that ionic bonds are ignored, e.g., the DGLGraph of the molecule with the smiles notation ‘[I-].[K+]’ is defined as a graph with two isolated vertices. Therefore, in some message passing techniques which are based on edge features (such as in the directed message passing, e.g., here), ionic bonds are ignored. But, it seems that by considering such bonds, the property prediction of the molecules might be done more accurately.

Why is such a bond not considered as an edge in the definition of DGLGraphs?
Since ionic bonds are important in the property prediction of a molecule, what is the best approach to consider such bonds in the definition of DGLGraphs or their related message passings?

DGL-LifeSci constructs molecular graphs based on RDKit here, which seems to be ignoring ionic bonds as below.

from rdkit import Chem

smi = '[I-].[K+]'
mol = Chem.MolFromSmiles(smi)
list(mol.GetBonds())
# []

You may manually add additional edges for the ionic bonds. To distinguish ionic bonds from covalent bonds, you may treat them as two edge types or use different edge features.

1 Like

Thanks alot for your answer.