Setup#
ChemREL can be installed via the command line from the PyPI index using the pip install
command. Once installed, the
ChemREL CLI can be invoked from any directory in the command line using the chemrel
command (but you should cd
into
the proper directory first, as described below).
Virtual Environment#
To ensure that the chemrel
keyword is recognized by your system, it is recommended that you create a new virtual
environment before installing ChemREL. To do so, open the command line and run the following.
$ python -m venv venv
Next, if using a MacOS (unix-like) or Linux machine, activate the environment by running
$ source venv/bin/activate
or if using a Windows machine, run
$ venv\Scripts\activate
instead. Your virtual environment should now be active, and the prompt in the command line should be
prefaced by the name of your environment, venv
.
GPU Commands#
If you plan to use ChemREL CLI commands to train on a CUDA-enabled GPU, you should install versions of Spacy and PyTorch which have been compiled with CUDA enabled before installing ChemREL. To do so, within the command line and within your virtual environment, run the installation commands generated by the PyTorch quickstart site and the Spacy quickstart site after selecting your applicable preferences. Once the PyTorch and Spacy installations have been completed, proceed to the next step.
Caution
If you do not install CUDA-enabled versions of Spacy and PyTorch before installing ChemREL, all GPU-related commands will fail by default.
Installation#
Now, to install ChemREL in the environment, run the following.
$ pip install chemrel
Next, run the following to ensure that ChemREL has been properly installed. A help prompt should display.
$ chemrel --help
Before running any model-related commands, ChemREL must be initialized by downloading all necessary model and config
files required by the package. To download the files to your desired directory, first enter the directory where you wish
to save the files by running the cd
command in the command line as follows, where [PATH]
should be replaced
with the directory path of your desired location. Hereinafter, this directory will be referred to as the ChemREL Initial
Directory.
$ cd [PATH]
Note
Note that you will need to cd
into the ChemREL Initial Directory before using ChemREL in the future.
You can then run the pwd
command to print the path you have entered to verify that you are in the correct directory.
Next, run the following command to download the required files. The files will be downloaded in the folder path you previously entered. This may take a while to complete.
$ chemrel init
Tip
You can also install the files to a path relative to the currently focused directory by passing an additional
argument into the command, e.g. chemrel init [ALTERNATE PATH]
. Here, [ALTERNATE PATH]
will serve as the Initial
Directory.
Note for Windows installations
If the chemrel init
command hangs while downloading required files, you can
alternatively clone the contents of the
chemrelmodels
Hugging Face repository to the same
Initial Directory.
Once the initialization is complete, you are ready to begin using ChemREL.