Code for the ICLR 2025 paper "Periodic Materials Generation using Text-Guided Joint Diffusion Model", by Kishalay Das, Subhojyoti Khastagir, Pawan Goyal, Seung-Cheol Lee, Satadeep Bhattacharjee, and Niloy Ganguly.
TGDMat introduces a novel approach to generating 3D periodic materials using a text-guided diffusion framework:
- TGDMat is the first model to connect natural language understanding with the generation of 3D periodic materials.
- Simultaneously generates atomic coordinates, element types, and lattice parameters, while preserving essential periodic symmetry.
- Leverages rich, descriptive prompts to guide the creation process, enabling generation aligned with specific material properties and user intent.
- Outperforms existing state-of-the-art methods in accuracy and generalizability, with reduced training and inference costs.
The list of dependencies is provided in the requirements.txt file, generated using pipreqs. Yiu can install through following commands:
pip install -r requirements.txtHowever, there may be some ad-hoc dependencies that were not captured.
If you encounter any missing packages, feel free to install them manually using pip install.
Text-guided reverse diffusion remains unexplored in material design, partly due to the lack of textual data in benchmark databases. To address this, we propose two methods for generating material descriptions:
- (1) Using Robocrystallographer for detailed structural texts, and
- (2) Creating shorter, user-friendly prompts with basic material info like chemical formula, elements, crystal system, and space group.
We kept the textual data for Perov-5, Carbon-24 and MP-20 databases in data_text/ directory.
Move to 'csp_task' directory
python -W ignore train.py --dataset <Dataset> --batch_size 512 --epochs 500 --prompt_type <long/short>- Where is perov_5/carbon_24/mp_20
- Model saved at out//<expt_date>/<expt_time>/
python -W ignore evaluate.py --model_path 'gen/' --chkpt_path <saved_model_path> --tasks csp --num_evals 1 --dataset <Dataset> --batch_size 1024 --timesteps 1000 --prompt_type <long/short>
python compute_metrics.py --root_path gen/perov_5/ --tasks reconpython -W ignore evaluate.py --model_path 'gen/' --chkpt_path <saved_model_path> --tasks csp --num_evals 20 --dataset <Dataset> --batch_size 1024 --timesteps 1000 --prompt_type <long/short>
python compute_metrics.py --root_path gen/perov_5/ --tasks recon --multi_evalMove to 'generate_task' directory
python -W ignore train.py --dataset <Dataset> --batch_size 512 --epochs 500 --prompt_type <long/short>- Where is perov_5/carbon_24/mp_20
- Model saved at out//<expt_date>/<expt_time>/
python -W ignore evaluate.py --model_path 'gen/' --chkpt_path <saved_model_path> --tasks gen --dataset <Dataset> --batch_size 1024 --prompt_type <long/short>
python -W ignore compute_metrics.py --root_path gen/<Dataset>/ --tasks gen --gt_file <Test dtaset csv file path>For any further query, feel free to contact Kishalay Das
If you are using TGDMat or our Textuak Dataset, please cite our work as follow :
@article{das2025periodic,
title={Periodic Materials Generation using Text-Guided Joint Diffusion Model},
author={Das, Kishalay and Khastagir, Subhojyoti and Goyal, Pawan and Lee, Seung-Cheol and Bhattacharjee, Satadeep and Ganguly, Niloy},
journal={arXiv preprint arXiv:2503.00522},
year={2025}
}
