Skip to content

constitution doesn't work on python3 #22

Description

@sunglyoungKim

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions