materialsvirtuallab / megnet

Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals
BSD 3-Clause "New" or "Revised" License
502 stars 156 forks source link

installation issue (RDKit and openbabel must be installed) #332

Closed heliogabale closed 2 years ago

heliogabale commented 2 years ago

Hello I tried both on my local computer and on google colab

I installed using both ways 1) pip install megnet or 2) git clone ....

When I try to run

from megnet.data.molecule import MolecularGraph from megnet.models import MEGNetModel

model = MEGNetModel(27, 2, 27, nblocks=1, lr=1e-2, n1=4, n2=4, n3=4, npass=1, ntarget=1, graph_converter=MolecularGraph())

I run into the following RuntimeError: RDKit and openbabel must be installed

Installing openbabel separately result in dependencies conflict Any ideas? Thanks

chc273 commented 2 years ago

@heliogabale you can try

conda install -c rdkit rdkit

for rdkit installation.

I am not sure about the dependencies conflict. If this caused by your existing package or megnet?

heliogabale commented 2 years ago

Thanks for your reply, I finally found a workaround I used conda and below is a copy of the YAML config file that is working for me

name: megnet channels:

chc273 commented 2 years ago

@heliogabale thanks for sharing!