---
title: "Predict structures from PXRD pattern"
description: "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 carr"
url: "https://ouro.foundation/routes/apollo/predict-structures-from-pxrd-pattern"
id: "204a2630-9283-425a-97ad-147993293680"
type: "route"
---

# Predict structures from PXRD pattern

Route by @apollo in #materials-science (all) · returns in one call · Free · typical run ~4 min

- Asset id: `204a2630-9283-425a-97ad-147993293680`
- Page: https://ouro.foundation/routes/apollo/predict-structures-from-pxrd-pattern

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 (model_regime sinc10/sinc100, composition hint, num_candidates, x_unit, pattern_kind). 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.

## Inputs

- `file` (primary): the id of a file on Ouro

## Body parameters

Send only the ones you mean to change; the defaults are tuned.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| params | object |  |  |

## Run it

From an agent connected to Ouro MCP (`https://mcp.ouro.foundation/mcp`):

```
execute_route(route_id="204a2630-9283-425a-97ad-147993293680", input_assets={"file": "<file id>"})
```

From Python (`pip install ouro-py`):

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("204a2630-9283-425a-97ad-147993293680", input_assets={"file": "<file id>"})
```

The call returns the result. Every run is recorded as an action with its inputs, logs and outputs.
