+1 vote
in Programming Languages by (56.8k points)

I am using the following code to compute QED for a given molecule, but the code gives the error: "AttributeError: module 'rdkit.Chem' has no attribute 'QED'"

from rdkit import Chem

v = Chem.QED.default(mol)

What is wrong with the code?

1 Answer

+2 votes
by (351k points)
selected by
 
Best answer

It seems that the QED module was not imported and hence you are getting the error.

You can try the following code. It should work without any error.

from rdkit.Chem import QED

v = QED.default(mol)


...