hachmannlab / chemml

ChemML is a machine learning and informatics program suite for the chemical and materials sciences.
https://hachmannlab.github.io/chemml
BSD 3-Clause "New" or "Revised" License
162 stars 31 forks source link

Can't find pybel despyte it being installed and working #6

Closed HenriqueCSJ closed 4 years ago

HenriqueCSJ commented 4 years ago

I'm unable to load chemml after following install instructions:

from openbabel import pybel, openbabel
from chemml.chem import Molecule

The error message:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-7-8e1fb2bc2fb0> in <module>()
      1 from openbabel import pybel, openbabel
----> 2 from chemml.chem import Molecule

/home/henrique/.local/lib/python3.6/site-packages/chemml/chem/__init__.py in <module>()
      9 """
     10 
---> 11 from .molecule import Molecule
     12 from .molecule import XYZ
     13 from .CoulMat import CoulombMatrix

/home/henrique/.local/lib/python3.6/site-packages/chemml/chem/molecule.py in <module>()
      3 import keras # required to go around the protobuf error after importing pybel prior to tensorflow
      4 from rdkit import Chem
----> 5 import pybel
      6 from rdkit.Chem import AllChem
      7 import warnings

ModuleNotFoundError: No module named 'pybel'
HenriqueCSJ commented 4 years ago

I have created a very simple PR for your code. It is working for me.

aditya1707 commented 4 years ago

There are a number of differences between openbabel 2 and 3 (which are in addition to the way pybel is invoked). The current version of ChemML works with openbabel 2 (not 3), which you can install from the openbabel channel (not the conda-forge channel). We will update the documentation to the clarify dependencies and versions soon.

We are also working towards an upgrade to bring ChemML up to speed with the latest versions of all of our external dependencies. Meanwhile, I would strongly suggest you to use Openababel 2.