You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarification on Directed vs Undirected Graph Construction in _read_data of GraphPropertyReader #6
@sfluegel05
I've noticed that some SMILES strings or molecules (e.g., CHEBI:32129) contain dative bonds, which are fundamentally directional in nature. These bonds represent a donation of a lone pair from a donor atom to an acceptor atom (e.g., metal-ligand interactions or coordinate covalent bonds).
RDKit explicitly models these bonds as directed, using types like BondType.DATIVE, BondType.DATIVEL, and BondType.DATIVER. This is also supported by RDKit documentation reference where it emphasizes the directional behavior of such bonds.
Currently, in our fix for graph construction logic adds all bonds as bidirectional edges (i.e., both src → tgt and tgt → src), treating the molecular graph as undirected. However, this may not be chemically accurate for dative bonds, where directionality carries important meaning. Treating these as one-way edges (i.e., donor → acceptor only) could lead to more faithful graph representations.
Shall we treat dative bonds as directed edges only during edge_index construction to preserve chemical semantics?
This might improve the performance (or may be not) in comparison to directed graphs.
This would involve checking bond.GetBondType() and conditionally skipping the reverse edge for dative bond types.
Activity
aditya0by0 commentedon Jun 6, 2025
@sfluegel05
I've noticed that some SMILES strings or molecules (e.g., CHEBI:32129) contain dative bonds, which are fundamentally directional in nature. These bonds represent a donation of a lone pair from a donor atom to an acceptor atom (e.g., metal-ligand interactions or coordinate covalent bonds).
RDKit explicitly models these bonds as directed, using types like
BondType.DATIVE,BondType.DATIVEL, andBondType.DATIVER. This is also supported by RDKit documentation reference where it emphasizes the directional behavior of such bonds.Currently, in our fix for graph construction logic adds all bonds as bidirectional edges (i.e., both
src → tgtandtgt → src), treating the molecular graph as undirected. However, this may not be chemically accurate for dative bonds, where directionality carries important meaning. Treating these as one-way edges (i.e., donor → acceptor only) could lead to more faithful graph representations.Shall we treat dative bonds as directed edges only during
edge_indexconstruction to preserve chemical semantics?This might improve the performance (or may be not) in comparison to directed graphs.
This would involve checking
bond.GetBondType()and conditionally skipping the reverse edge for dative bond types.aditya0by0 commentedon Jun 6, 2025
https://www.rdkit.org/docs/source/rdkit.Chem.rdchem.html#rdkit.Chem.rdchem.BondType
This all are available bond types from RDKIT api.
I think only the below are directed bonds.
[ Chem.rdchem.BondType.DATIVE, Chem.rdchem.BondType.DATIVEL, Chem.rdchem.BondType.DATIVER, Chem.rdchem.BondType.DATIVEONE ]aditya0by0 commentedon Jun 6, 2025
Total bonds: 6962481
Dative bonds: 471
Percentage of dative bonds: 0.01%
Number of molecules: 188923
Molecules with at least one dative bond: 128
Percentage of molecules with at least one dative bond: 0.07%