Paper: TransChem: Data-based prediction of redox potentials via introducing chemical features into the transformer architecture
- Clone this repo
git clone https://github.com/xianHUJINGJING/TransChem.git
cd example
- Prepare model weight
Download model_xxx.pt (160M), put it under './model_weight' directory.
- Install dependencies.
This code requires Python 3.7, PyTorch, and a few other Python libraries. We recommend creating conda environment and installing all the dependencies as follows:
# create conda env
conda create --name transchem python=3.7
# activate env
conda actiavte transchem
# install pytorch with CUDA 11.0
conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch
# install other python packages
pip install pickle rdkit sklearn random numpy pandas
The PyTorch version we tested is 1.9.0
.
cd example
To train TransChem on your own dataset, please prepare your dataset annotations following the format
Training can be launched by running the following command:
python train.py
For more configurable options, please checkout our config file config.py.
The annotation files are under CC BY-NC-SA 4.0 license, see ./data/LICENSE. All the code are under MIT license, see LICENSE.