This is a simple Pytorch implementation of the paper An invertible crystallographic representation for general inverse design of inorganic crystals with targeted properties. The representation-building code is reserved, and the model is rewritten in Pytorch.
pip install -r requirements.txt
Pytorch install command is recommended on Pytorch official website, if you want a exactly GPU version of it.
python train.py # training
python infer.py # sampling
You can change the hyperparameters in the variable params
from train.py
file.
params = { 'num_conv_layers' : 3,
'embedding_dim' : 128,
'kernel1_size' : 5,
'kernel2_size' : 3,
'kernel3_size' : 3,
'strides1' : 2,
'strides2' : 2,
'strides3' : 1,
'latent_dimensions' : 256,
'batch_size' : 256,
'epochs' : 300,
'dim_pp' : 128,
'property_predictor':True,
'learning_rate' : 1e-4,
'max_elms': 5,
'max_sites': 40,
'device': device,
}
The parameters of infer.py will be loaded from the checkpoint.
The example dataset in data/example.csv
of is from the Material Project
- Original (in tensorlfow 1.15): https://github.com/PV-Lab/FTCP