---
title: XTalNet
description: Predict candidate crystal structures from SMILES or a PXRD pattern, then screen polymorphs and co-crystals — a GPU job returning CIFs plus energies.
tags:
  - xtalnet
---

XTalNet predicts candidate crystal structures directly from a powder X-ray diffraction pattern, so you can propose which solid forms a compound may adopt. Reach for it during solid-form and formulation risk assessment, when you have PXRD data and want to explore the polymorphs behind it. It pairs naturally with [PyWPEM](/docs/pywpem) and [OpXRD](/docs/opxrd), which simulate and identify the diffraction patterns those predicted structures produce. See the [Materials & Crystals overview](/docs/materials-crystals) for where this fits.

**XtalNet** is the first equivariant deep generative model for **end-to-end crystal structure prediction** from Powder X-ray Diffraction (PXRD) data. Published in Advanced Science (2025), it can generate complex organic structures with up to 400 atoms in the unit cell.

## Citations

> Lai Q, Xu F, Yao L, Gao Z, Liu S, Wang H, Lu S, He D, Wang L, Zhang L, Wang C, Ke G. End-to-End Crystal Structure Prediction from Powder X-Ray Diffraction. *Advanced Science*. 2025 Feb;12(8):2410722. doi: [10.1002/advs.202410722](https://doi.org/10.1002/advs.202410722)

## Key architecture

- **Contrastive PXRD-Crystal Pretraining (CPCP)**: Aligns PXRD space with crystal structure space
- **Conditional Crystal Structure Generation (CCSG)**: Diffusion-based structure generation guided by PXRD patterns
- **Equivariant GNN**: Extracts crystal structure features while maintaining geometric symmetry

## Performance

- **90.2% Match Rate** (top-10) on hMOF-100 dataset
- **79% Match Rate** (top-10) on hMOF-400 dataset
- Works for both organic and inorganic crystal systems

.bloom* exposes two XtalNet tools. `xtalnet_csp_predict` generates candidate crystal structures for a compound (from a SMILES string, or by matching an experimental PXRD pattern) — up to 400 atoms in the unit cell. `xtalnet_polymorph_predict` builds on that to screen for stable and metastable polymorphs, including co-crystals with a specified coformer. Both submit a GPU job and return CIF structures plus energy/stability data; use the linked guides to prepare PXRD or SMILES inputs and interpret the results.

## Chat Usage

### Example Prompts

- "Predict crystal structure forms for ritonavir"
- "Run XtalNet polymorph screening on this compound, including co-crystal candidates with nicotinamide"
- "Match this experimental PXRD pattern against candidate crystal structures for aspirin"
- "Which polymorph of this compound is thermodynamically stable at room temperature?"

### Workflow Chaining

- **Feeds into**: [PyWPEM](/docs/pywpem) (simulate the diffraction pattern for a predicted structure), formulation assessment
- **Accepts from**: PubChem (SMILES/formula), uploaded PXRD data

## FAQ

### What inputs are required?

  A SMILES string (for de novo crystal structure prediction) or an experimental PXRD pattern plus the compound's chemical formula (for matching against candidate structures) — provide one of the two.

### CSP or polymorph screening — which do I use?

  Use `xtalnet_csp_predict` for an initial crystal structure prediction. Use `xtalnet_polymorph_predict` when you specifically want a stability-ranked screen of polymorphs, or a co-crystal prediction with a named coformer.

## Read next
