sunlabuiuc / PyHealth

A Deep Learning Python Toolkit for Healthcare Applications.
https://pyhealth.readthedocs.io
MIT License
994 stars 212 forks source link

Bug in SafeDrug #259

Closed CodeNinjaja closed 10 months ago

CodeNinjaja commented 10 months ago

The program crashes when I run the SafeDrug for drug recommendation with the real MIMIC-III dataset. When I looked into the source code, I found the bug occurred in the function generate_molecule_info(), specifically, adjacency = Chem.GetAdjacencyMatrix(mol). https://github.com/sunlabuiuc/PyHealth/blob/5592d437abf6a06df7d41204cf56971f45e98a47/pyhealth/models/safedrug.py#L529C20-L529C20

I don't know what happened. Please provide some suggestions. Thank you. I provide a bug case here: smile = '[F-].[Na+]'

ycq091044 commented 10 months ago

Sorry, it seems the function works on my end. What is your rdkit version?

image
CodeNinjaja commented 10 months ago

Sorry, it seems the function works on my end. What is your rdkit version?

image

My rdkit version is 2022.9.5. This may be due to the rdkit version, I will try another version. Thanks for your reply! 🙏