XuhanLiu / DrugEx

Deep learning toolkit for Drug Design with Pareto-based Multi-Objective optimization in Polypharmacology
MIT License
196 stars 67 forks source link

Error module 'rdkit.Chem' has no attribute 'MolFromSimles' #10

Open nghiencuuthuoc opened 3 years ago

nghiencuuthuoc commented 3 years ago

With rdkit 2021.03.4 Error in file environ.py,

385     data = df.drop(test.index)
386 

--> 387 test_x = utils.Predictor.calc_fp([Chem.MolFromSimles(mol) for mol in test.index]) 388 data_x = utils.Predictor.calcfp([Chem.MolFromSimles(mol) for mol in data.index]) 389 out = 'output/single/%s%s_%s' % (alg, 'REG' if reg else 'CLS', feat)

AttributeError: module 'rdkit.Chem' has no attribute 'MolFromSimles'

Change code "Chem.MolFromSimles" to "AllChem.MolFromSmiles"

XuhanLiu commented 3 years ago

I am afraid that you have to downgrade the version of RDKit. Because in the previous version, I always use Chem but not Allchem module to invoke MolFromSmiles().

queliyong commented 2 years ago

I am afraid that you have to downgrade the version of RDKit. Because in the previous version, I always use Chem but not Allchem module to invoke MolFromSmiles().

but it appears the same error, my rdkit version is 2020.03.

queliyong commented 2 years ago

hahahah, MolFromSmiles() spelled wrong in the enrivon.py

XuhanLiu commented 2 years ago

PyCharm did no remind me of this error. I have changed in the "environ.py". Thank you very much!