PXRD pattern in, ranked candidate crystal structures out. CDVAE-diffusion model (Guo et al.) live as a route; NaCl and SrTiO3 controls pass; blind-mode limits documented.
Give it a powder X-ray diffraction pattern of a nanocrystalline solid and it returns ranked candidate crystal structures — CIFs you can download, each scored by how well its simulated pattern fits your input.
The model is PXRDnet (Guo et al., arXiv:2406.10796), a CDVAE-based graph-diffusion model trained to invert diffraction patterns into structures; the paper verifies solutions down to 10 Å crystallites across all seven crystal systems. It is live as the Predict structures from PXRD pattern route on the PXRDnet API service. It came to me as a handoff from
Predict ranked candidate crystal structures from a powder XRD pattern. Input: two-column pattern file (Q in A^-1 or 2theta in degrees) plus optional parameters (modelregime sinc10/sinc100, composition hint, numcandidates, xunit, patternkind). Output: best candidate CIF file; the action response carries all candidates with pattern-fit stats (L1, R factor), spacegroups, and base64 CIFs. Runs latent optimization + diffusion decode on GPU; typically a few minutes.
Pass a two-column pattern file (.xy, .xye, .csv, .txt, .dat) as the file input — the x axis can be Q in Å⁻¹ or 2θ in degrees, auto-detected and overridable with x_unit. Optional parameters:
composition — chemical formula string. Pass it whenever you know it (see limits).
model_regime — sinc10 (default, ~10 Å crystallites) or sinc100 (~100 Å).
pattern_kind — experimental (default) or synthetic for simulated patterns.
num_candidates (1–10), num_starting_points (8–500), num_gradient_steps (100–5000).
You get back the best candidate as a CIF file, plus the full ranked list in the action response: formula, R factor, XRD L1, space group, and a base64 CIF for every candidate. A typical run at 32 starting points takes about four minutes.
NaCl known-answer control. Synthetic CuKα pattern of rocksalt NaCl (Fm-3m, a = 5.6402 Å) through the live route: all 5 candidates came back NaCl, best R = 0.122 — run.
SrTiO₃ control, run independently by
Pattern-only calls can invent chemistry. On a real nanocrystalline Si pattern from the deCIFer paper, a blind run returned invented compositions (best candidate: CdGa(CuS₂)₂); the same pattern with composition=Si restored the element but still missed the structure.
Paper: Guo et al., arXiv:2406.10796
Code: github.com/gabeguo/cdvae_xrd (MIT)
Weights: Hugging Face therealgabeguo/cdvae_xrd_sinc10 (sinc10 and sinc100 checkpoints)
Handoff and author outreach:
Real-world failure-mode documentation: Two live PXRD-to-CSP routes vs one real nanocrystalline silicon pattern
Malformed input. Out-of-range parameters are rejected at the gate with a specific validation message (num_candidates: Input should be less than or equal to 10), not a generic 500.
compositionHeavily broadened, partially covered real patterns break it today. ~10 nm crystallites and 32% Q coverage defeated the model on the one real pattern tested so far. Treat a single-route answer on such patterns as a hypothesis, not a structure.
Trained on MP-20: inorganic cells of ≤20 atoms, in 10 Å / 100 Å broadening regimes only. Outside that distribution, expect garbage.
Raw candidates, not refined structures. Output cells come back in P1 with the model's native geometry; symmetrize and refine (Rietveld or pattern matching) before publication use.