pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
20.92k stars 3.61k forks source link

rdkit-based methods #9546

Closed sajfb closed 1 month ago

sajfb commented 1 month ago

🐛 Describe the bug

Thank you for adding RDKit featurization in utils.smiles and the recent addition of from_rdmol which allows direct featurization of RDKit mol objects. However, I am encountering an issue when trying to call this function directly.

from torch_geometric.utils import from_rdmol

The SMILES function works without any problems: from torch_geometric.utils import from_smiles

I believe this issue can be resolved by updating the __init__ file in the utils library to include the from_rdmol function.

Versions

Versions of relevant libraries: [pip3] numpy==1.25.2 [pip3] torch==2.3.1+cu121 [pip3] torch_geometric==2.5.3 [pip3] torchaudio==2.3.1+cu121 [pip3] torchinfo==1.8.0 [pip3] torchsummary==1.5.1 [pip3] torchtext==0.18.0 [pip3] torchvision==0.18.1+cu121 [pip3] triton==2.3.1

akihironitta commented 1 month ago

The feature hasn't been released yet but will be in the next release. In the meantime, you can use nightly https://github.com/pyg-team/pytorch_geometric/?tab=readme-ov-file#nightly-and-master.