A 3D ConvNet that takes energy voxels as input and ouputs gas adsorption properties.
This repository contains a PyTorch
implementation of RetNet
,
which can be found on model.py
module.
The following example is used to train RetNet
on the University of Ottawa
database1 for predicting CO2 uptake.
Important
It is strongly recommended to run all the scripts inside a virtual environment.
git clone https://github.com/frudakis-research-group/retnet
cd retnet
- Create a virtual environment:
python -m venv <venvir_name>
- Activate it:
source <venvir_name>/bin/activate
- Install the dependencies:
(<venvir_name>) pip install -r requirements.txt
The following directory structure is required prior to training:
data/
├── MOFs
├── all_MOFs_screening_data.csv
├── batch_train
│ ├── clean_names.json
│ └── clean_voxels.npy
└── batch_val_test
├── clean_names.json
└── clean_voxels.npy
To achieve that:
- Get the inputs:
wget -O- 'https://figshare.com/ndownloader/files/43220463' | tar -xzvf-
Warning
If you use any of this data in your research work, you should cite the original work2.
- Get the labels:
wget -O- 'https://archive.materialscloud.org/record/file?filename=screening_data.tar.gz&record_id=62' | tar -xzvf- -C data/MOFs
Warning
If you use any of this data in your research work, you should cite the original work1.
Check the comments in training.py
to customize the training phase on your needs.
(<venvir_name>) python training.py
- GPU training time: 40s per epoch on Nvidia GTX 1650 Super
- CPU training time: 257s per epoch on Intel i5 8400
Tip
If you want to use a GPU but the VRAM is not enough:
- Decrease the training batch size to a value smaller than 64.
- Remove some
Conv
layers or decrease the number ofConv
filters.
If you use the RetNet
architecture in your research work or any of the scripts of this repository, please consider citing:
@article{Sarikas2024,
title = {Gas adsorption meets deep learning: voxelizing the potential energy surface of metal-organic frameworks},
volume = {14},
ISSN = {2045-2322},
url = {http://dx.doi.org/10.1038/s41598-023-50309-8},
DOI = {10.1038/s41598-023-50309-8},
number = {1},
journal = {Scientific Reports},
publisher = {Springer Science and Business Media LLC},
author = {Sarikas, Antonios P. and Gkagkas, Konstantinos and Froudakis, George E.},
year = {2024},
month = jan
}
Footnotes
-
Boyd, P.G., Chidambaram, A., García-Díez, E. et al. Data-driven design of metal–organic frameworks for wet flue gas CO2 capture. Nature 576, 253–256 (2019). https://doi.org/10.1038/s41586-019-1798-7 ↩ ↩2
-
Sarikas, A.P., Gkagkas, K. & Froudakis, G.E. Gas adsorption meets deep learning: voxelizing the potential energy surface of metal-organic frameworks. Sci Rep 14, 2242 (2024). https://doi.org/10.1038/s41598-023-50309-8 ↩