mattergen
Official implementation of MatterGen -- a generative model for inorganic materials design across the periodic table that can be fine-tuned to steer the generati
What is mattergen?
Official implementation of MatterGen -- a generative model for inorganic materials design across the periodic table that can be fine-tuned to steer the generation towards a wide range of property constraints.
Overview of mattergen
What it is
MatterGen is a generative model for inorganic materials design across the periodic table. It can be fine-tuned to steer generation towards a wide range of property constraints. The official implementation is provided in this repository.
Key features
- Generative model for inorganic materials design across the periodic table
- Supports fine-tuning to condition generation on properties such as chemical system, space group, band gap, magnetic density, bulk modulus, and energy above hull
- Provides pre-trained unconditional and fine-tuned model checkpoints
- Includes evaluation scripts using MatterSim machine-learning force field for structure relaxation and stability assessment
- Datasets and model checkpoints are provided via Git Large File Storage (LFS) and also available on Hugging Face
Use cases
- Unconditional generation of novel inorganic crystal structures
- Property-conditioned generation (e.g., target magnetic density, band gap, bulk modulus)
- Multi-property conditioned generation (e.g., chemical system and energy above hull)
- Evaluation of generated structures for novelty, uniqueness, stability, and other metrics
Getting started
Install prerequisites via uv (Linux with CUDA GPU assumed):bashpip install uvuv venv .venv --python 3.10source .venv/bin/activateuv pip install -e .Alternatively, install from PyPI with pre-built PyTorch Geometric CUDA wheels:bashuv pip install mattergen --find-links https://data.pyg.org/whl/torch-2.2.0+cu121.htmlGit LFS is required for checkpoints and datasets. Install if needed:bashsudo apt install git-lfsgit lfs installThen pull checkpoints:bashgit lfs pull -I checkpoints/ --exclude=''To generate samples unconditionally:bashexport MODEL_NAME=mattergen_baseexport RESULTS_PATH=results/mattergen-generate $RESULTS_PATH --pretrained-name=$MODEL_NAME --batch_size=16 --num_batches 1For property-conditioned generation (e.g., magnetic density):bashexport MODEL_NAME=dft_mag_densityexport RESULTS_PATH='results/$MODEL_NAME/'mattergen-generate $RESULTS_PATH --pretrained-name=$MODEL_NAME --batch_size=16 --properties_to_condition_on='{'dft_mag_density': 0.15}' --diffusion_guidance_factor=2.0
License and pricing
License: MIT. Pricing type: open source.
Based on the project's public README and repository metadata.