gadsbyfly / PyBioMed

machine learning, molecular descriptor
http://pybiomed.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
109 stars 61 forks source link

constitution doesn't work on python3 #22

Open sunglyoungKim opened 1 year ago

sunglyoungKim commented 1 year ago

Hello, I am using Ubuntu 22.04 with Python 3.0

I have installed openbabel 3.1.1 and rdkit 2022.9.3 (installed by pip).

When I run constitution for mol I got TypeError. I believe round behavior has been changed from python2 to python3. Could you fix it this error?

python3 constitution.py 1 CCCC [21:19:38] WARNING: the onlyHeavy argument to mol.GetNumAtoms() has been deprecated. Please use the onlyExplicit argument instead or mol.GetNumHeavyAtoms() if you want the heavy atom count. Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/PyBioMed-1.0-py3.10.egg/PyBioMed/PyMolecule/constitution.py", line 726, in print("\t", GetConstitutional(m)) File "/usr/local/lib/python3.10/dist-packages/PyBioMed-1.0-py3.10.egg/PyBioMed/PyMolecule/constitution.py", line 712, in GetConstitutional result[DesLabel] = round(_constitutionalDesLabel, 3) TypeError: type _vectSt6vectorIiSaIiEE doesn't define round method