Long and Winding Road to XenonPy
Last Update:2021/12/09
Introduction:
Xenon is a Python tool for searching for materials using machine learning. Here, we will install it on MateriApps LIVE!, and try the tutorials
Version of software
- MateriApps LIVE! version 2.4 (Debian Buster, Python 3.5)
- XenonPy version 0.3.1
Installation of XenonPy on MateriApps LIVE!:
VirtualBox settings
By default, MateriApps LIVE! is allocated 1GB of memory. As 1GB is not enough to install XenonPy, first we increase the memory allocation to 2GB
- From the Oracle VM VirtualBox manager screen
- Choose MateriAppsLive-2.4-amd64
- “Setting” button → “System” button → “Motherboard” tag
- Increase “Base memory” to 2 GB, and push “OK”
Below, we log in to MateriApps LIVE! and work in LX Terminal
Preparation of directories etc.
$ sudo mkdir -p /usr/local/lib/python3.5 $ sudo ln -s python3.5 /usr/local/lib/python3 $ echo '/usr/local/lib' | sudo tee /etc/ld.so.conf.d/local.conf $ sudo ldconfig
RDkit for Python3
$ sudo apt -y install libboost-system-dev libboost-iostreams-dev libboost-python-dev libboost-serialization-dev $ cd $ HOME $ wget https://github.com/rdkit/rdkit/archive/Release_2019_09_3.tar.gz $ tar zxvf Release_2019_09_3.tar.gz $ cd rdkit-Release_2019_09_3 $ mkdir build $ cd build $ cmake -DPYTHON_EXECUTABLE = / usr / bin / python3 -DRDK_INSTALL_INTREE = OFF -DRDK_INSTALL_STATIC_LIBS = OFF .. $ make $ sudo make install
Upgrading Numpy
$ sudo pip3 install -U numpy == 1.13.3
Cython
$ sudo apt install cython
XenonPy
$ sudo pip3 install --no-cache-dir xenonpy
Runing XenonPy tutorial:
Let’s run tutorials based on the XenonPy tutorial https://xenonpy.readthedocs.io/en/latest/tutorial.html
Getting Materials API key
- Go to https://materialsproject.org
- Click Login at the top right
- Log in by Google account, Github account, or create an account with an email address and password
- After logging in, click on the Dashboard in the upper right
- Write down the key (character string of 16 characters) displayed under “Generate API Key”
Getting sample files
$ mkdir $HOME/XenonPy $ cd $HOME/XenonPy $ wget -O - https://github.com/yoshida-lab/XenonPy/archive/master.tar.gz | tar zxf - --strip-components=2 XenonPy-master/samples
Running the tutorials
$ cd $HOME/XenonPy $ jupyter-notebook
Following the XenonPy tutorial https://xenonpy.readthedocs.io/en/latest/tutorial.html, please run the tutorials