gnina / libmolgrid

Comprehensive library for fast, GPU accelerated molecular gridding for deep learning workflows
https://gnina.github.io/libmolgrid/
Apache License 2.0
144 stars 48 forks source link

Imports fail in "Grid single molecule" tutorial #70

Closed mgarort closed 3 years ago

mgarort commented 3 years ago

Hi,

I am trying to follow the tutorial Grid single molecule and unfortunately the import of OpenBabel fails. I am not sure what I could be doing wrong since I'm using a fresh conda installation and it's the third line in the tutorial.

      1 import torch                                                                                                                              
      2 import molgrid                                                                                                                            
----> 3 from molgrid.openbabel import pybel as pybel                                                                                              

ModuleNotFoundError: No module named 'molgrid.openbabel'

My installation was done with

conda create -n molgrid python=3.7
source activate molgrid
conda install -c conda-forge rdkit
conda install -c conda-forge openbabel
conda install -c jsunseri molgrid
conda install pytorch
conda install ipython

Many thanks in advance.

dkoes commented 3 years ago

You need to install 0.5.1 with pip to get the openbabel submodule.

dkoes commented 3 years ago

See Issue #62 for why there is a submodule and the potential issues with interfacing with openbabel.

mgarort commented 3 years ago

Thank you for the quick response! That makes sense. Installing version 0.5.1 with pip solves the issue.