mattergen
MatterGen is a Python-based generative model developed by Microsoft for designing inorganic materials across the periodic table. It uses diffusion-based generation and can be fine-tuned to produce materials with specific physical properties like band gap, magnetic density, or bulk modulus.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | microsoft/mattergen |
| Owner | microsoft |
| Primary language | Python |
| License | MIT — OSI-approved |
| Stars | 1.8k |
| Forks | 333 |
| Open issues | 13 |
| Latest release | v1.0.3 (2025-07-23) |
| Last updated | 2026-07-07 |
| Source | https://github.com/microsoft/mattergen |
What mattergen is
A diffusion-based generative model for crystal structure design, implemented in Python 3.10+, supporting both unconditional and property-conditioned generation via classifier-free guidance. Pre-trained checkpoints available; evaluation uses MatterSim (ML force field) for structure relaxation and stability assessment. Training and inference support GPU acceleration (CUDA) with experimental Apple Silicon support.
Get the mattergen source
Clone the repository and explore it locally.
git clone https://github.com/microsoft/mattergen.gitcd mattergen# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Install Git LFS before cloning; model checkpoints are stored via LFS and must be pulled separately.
- Requires CUDA-capable GPU; batch size tuning is critical for memory efficiency (documentation recommends maximizing sustainable batch size).
- Pre-trained checkpoints are re-trained versions; results will slightly deviate from published paper. Validate against your domain baseline.
- Evaluation pipeline depends on MatterSim; structure relaxation accuracy is ML-based, not DFT. For critical applications, confirm with DFT.
- Property conditioning requires fine-tuned models; diffusion guidance factor (gamma) trades off adherence to constraints vs. sample diversity and realism.
When to avoid it — and what to weigh
- Production-grade DFT-level accuracy required — Evaluation uses MatterSim (ML force field), not DFT. Documentation explicitly notes MatterSim predictions may differ from DFT, especially for uncommon chemical systems. Confirm results with DFT before critical decisions.
- Real-time or low-latency generation needed — Diffusion-based models require iterative denoising steps. Generation speed not documented; batch processing and GPU resources are required.
- Minimal Python expertise or GPU infrastructure — Requires Python 3.10+, CUDA GPU, Git LFS, and dependency management via uv. Apple Silicon support is experimental. Setup complexity may exceed non-technical teams.
- Proprietary or restricted-license materials data — Training uses Alex-MP-20 and MP-20 datasets; retraining on proprietary data requires data format alignment and computational resources. No clear licensing guidance for derivative models.
License & commercial use
MIT License. Permits commercial use, modification, and distribution with attribution. No derivative restrictions.
MIT License explicitly permits commercial use. However, no warranty or liability guarantees are provided. Generated materials must be validated independently (especially against DFT) before deployment in commercial materials-design workflows. Verify that training data (Alex-MP-20, MP-20) and MatterSim dependencies do not impose additional restrictions.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
Model and data downloaded from Hugging Face and Git LFS; verify integrity if used in restricted environments. No signed checksums or reproducibility guarantees documented. ML model inference may exhibit unexpected behavior on out-of-distribution inputs; validate generated structures before use. No explicit security audit or vulnerability disclosure policy noted.
Alternatives to consider
CDVAE (Crystal Diffusion VAE)
Open-source VAE-based crystal generation; smaller scope (fewer property constraints) but simpler deployment and faster inference.
Matformer / other DFT-based screening tools
DFT-grounded; higher accuracy for critical properties but computationally expensive and no generative capability.
PhAST / proprietary ML platforms (Schrodinger, Materials Design)
Commercial alternatives with integrated workflows, SLAs, and DFT validation; higher cost and vendor lock-in.
Build on mattergen with DEV.co software developers
Our engineering team can help you set up MatterGen, integrate it with your workflows, validate outputs via DFT or experiment, and build custom fine-tuned models for your property targets. Contact us to discuss your use case.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
mattergen FAQ
Can I use MatterGen to generate materials and directly deploy them?
How do I fine-tune MatterGen on my own property data?
What GPU memory is required?
Are generated structures novel or duplicates of training data?
Custom software development services
Adopting mattergen is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate ai frameworks software in production.
Ready to integrate MatterGen into your materials-science pipeline?
Our engineering team can help you set up MatterGen, integrate it with your workflows, validate outputs via DFT or experiment, and build custom fine-tuned models for your property targets. Contact us to discuss your use case.