This package provides a diffusion model for the generation of pure silica zeolite, ZeoDiff (short for Zeolite Diffusion), which generated porous materials using a diffusion model for the first time. The model was developed based on the framework of Denoising Diffusion Probabilistic Model (DDPM) with zeolite structures represented as three dimensional grids of energy, silicon, and oxygen channels. Our model successfully generated realistic zeolite structures while exhibiting a capability of inverse design with user-desired properties. Project Page
We encourage users to build separate anaconda environment with python version >= 3.9. GPU machine is required for the training.
$ git clone https://github.com/parkjunkil/ZeoDiff.git
$ conda create -name zeodiff python=3.9
$ conda activate zeodiff
$ pip install -r requirements.txt
Following three pre-trained models are provided within models/ folder:
- unconditional.ckpt : trained ZeoDiff model without user desirability
- conditional_VF.ckpt : trained ZeoDiff model conditioned on void fraction
- conditional_HOA.ckpt : trained ZeoDiff model conditioned on heat of adsorption
Generated zeolite grids can be visualized using vislt software
$ cd zeodiff
$ mkdir sample_uncond
$ python run.py with train=False n_sample=50 eval_model='unconditional.ckpt' sample_dir='sample_uncond'
$ cd zeodiff
$ mkdir sample_vf_0.20
$ python run.py with train=False self_condition=True target_prop='VF' target_value=0.20 n_sample=50 eval_model='conditional_VF.ckpt' sample_dir='sample_vf_0.20'
$ cd zeodiff
$ mkdir sample_hoa_25
$ python run.py with train=False self_condition=True target_prop='HOA' target_value=0.25 n_sample=50 eval_model='conditional_HOA.ckpt' sample_dir='sample_hoa_25'
Training and test data are available at above link.
If you want to train the model on your own, please download 'training.tar.gz' and 'test.tar.gz', unzip, and locate it under '/ZeoDiff/data/'.
$ tar -zxvf training.tar.gz
$ tar -zxvf test.tar.gz
Specify the locations of the training and test directories while running the run.py. Check following examples.
In addition to tags handled in following examples, you also need to change 'n_gpu', 'devices', 'num_nodes' depending on your environment.
$ cd zeodiff
$ python run.py with train=True train_dataset='../data/training/' test_dataset='../data/test/'
$ cd zeodiff
$ python run.py with train=True self_condition=True target_prop='VF' train_dataset='../data/training/' test_dataset='../data/test/'
Please consider citing the following paper if you find this package useful.
I greatly appreciate Baekjun Kim for the useful discussion.
The DDPM baseline code and many other utility functions are adapted from the hugging face
For a more detailed description of this project, please contact [email protected]