cgcnn
cgcnn copied to clipboard
How to run CGCNN through Jupyter or Python interface
I'm able to run CGCNN on a command line interface (PowerShell) through Anaconda, but I'm curious if you have suggestions for using it with an IDE.
%run main.py data/sample-regression
and
%run predict.py pre-trained/formation-energy-per-atom.pth.tar data/sample-regression
seem to do the trick in a Jupyter Notebook.
For Spyder, one way to go about it is using runfile() or debugfile(), i.e.
runfile(<path-to-main.py>, args='data/sample-regression', wdir=<path-to-working-directory>)
or
debugfile(<path-to-main.py>, args='data/sample-regression', wdir=<path-to-working-directory>)
e.g.
runfile('main.py', args='data/sample-regression', wdir='.')
@mliu7051
Another potential approach is to copy the code in main.py
into a Jupyter notebook. This would allow to modify the code in the notebook as well.
Maybe you should copy and paste all the cgcnn code in your jupyter notebook in sequence, and should amend "args" part to a class with instance attributes. I am using cgcnn model like that. Until now, It's working well. hope you success!