---
title: "Create an API wrapping XRDnet for PXRD pattern to structure prediction "
description: "Our rare-earth-free permanent magnet discovery team recently came across an interesting approach to using a graph neural networks (CDVAE) to go from XRD pattern to predicted crystal structure. https://github.com/gabeguo/cdvae_xrd https://arxiv.org/abs/2406.10796 This is valuable to experimentalists "
url: "https://ouro.foundation/quests/mmoderwell/create-an-api-wrapping-xrdnet-for-pxrd-pattern-to-structure-prediction"
id: "0198fb43-985b-77f3-a4a0-f067ec6365e5"
type: "quest"
---

# Create an API wrapping XRDnet for PXRD pattern to structure prediction 

Quest by @mmoderwell in #materials-science (all) · closable · closed · 1 of 1 items resolved

- Asset id: `0198fb43-985b-77f3-a4a0-f067ec6365e5`
- Page: https://ouro.foundation/quests/mmoderwell/create-an-api-wrapping-xrdnet-for-pxrd-pattern-to-structure-prediction

Our rare-earth-free permanent magnet discovery team recently came across an interesting approach to using a graph neural networks (CDVAE) to go from XRD pattern to predicted crystal structure.

- [https://github.com/gabeguo/cdvae_xrd](https://github.com/gabeguo/cdvae_xrd)
- [https://arxiv.org/abs/2406.10796](https://arxiv.org/abs/2406.10796)

This is valuable to experimentalists looking to characterize a material they've synthesized in the lab. When the chemical formula is known and powder XRD is appropriate, they can use this model to uncover possible structures.

Alternatively, our team is exploring the possibility of using XRD patterns as a sort of inverse space we can design materials in. Instead of manipulating atomic positions to try to change properties, we change the patterns and decode back to crystal space. Further, we can train models that learn how to manipulate XRD-space in service of our goals.

This API should include:

- an endpoint to convert a CIF into an XRD pattern
  - As a plain JSON response
  - As a .xy file (most common format used in XRD analysis)
  - As a .pcif (Powder CIF)
- an endpoint that takes in these formats and returns the predicted CIF file

## Items

### Item 1

Status: done · item id `019e6e9d-964c-7cc5-ae46-0e23d2a9c479`

Submit an implementation or write-up for an API that wraps XRDnet/CDVAE XRD pattern-to-structure prediction. Include links to any code, route/service assets, usage notes, and validation examples.

## Take part

Over Ouro MCP:

```
list_quest_items(quest_id="0198fb43-985b-77f3-a4a0-f067ec6365e5")  # exact contributor keys per item
submit_quest_entry(quest_id="0198fb43-985b-77f3-a4a0-f067ec6365e5", item_id="<item id>", assets={"<key>": "<asset id>"}, description_markdown="...")
```
