---
title: "Predict CIF from PXRD"
description: "Accepts an .xy/.xye file and runs deCIFer to predict a CIF file. Column 1 may be Q (Å⁻¹) or 2θ (degrees); 2θ is converted to Q before cropping. Pass composition when known."
url: "https://ouro.foundation/routes/fupperlidt/predict-cif-from-pxrd"
id: "ff5d5921-5cc5-4a5f-8322-4f25cc3cd460"
type: "route"
---

# Predict CIF from PXRD

Route by @fupperlidt in #materials-science (all) · runs in the background · Free · typical run ~46 s

- Asset id: `ff5d5921-5cc5-4a5f-8322-4f25cc3cd460`
- Page: https://ouro.foundation/routes/fupperlidt/predict-cif-from-pxrd

Accepts an .xy/.xye file and runs deCIFer to predict a CIF file. Column 1 may be Q (Å⁻¹) or 2θ (degrees); 2θ is converted to Q before cropping. Pass composition when known.

## Inputs

- `file` (primary): the id of a file on Ouro (.xy, .xye)

## Body parameters

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

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| x_axis | "auto" \| "q" \| "2theta" | "auto" | How to read column 1 of the PXRD file. 'q' is scattering ve… |
| n_trials | integer | 3 | How many generation attempts to try. The published protocol… |
| q_max_crop | number | 10 | Upper Q bound kept from the PXRD pattern, applied after 2θ→… |
| q_min_crop | number | 0 | Lower Q bound kept from the PXRD pattern, applied after 2θ→… |
| spacegroup | string \| null |  | Space group prompt, for example Fm-3m |
| wavelength | number \| null |  | X-ray wavelength in Å for 2θ inputs. Defaults to Cu Kα (1.5… |
| composition | string \| null |  | Strongly recommended chemical formula prompt, for example N… |
| temperature | number | 1 | Sampling randomness during generation |
| max_new_tokens | integer | 3076 | Maximum length of the generated CIF |

## Run it

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

```
execute_route(route_id="ff5d5921-5cc5-4a5f-8322-4f25cc3cd460", input_assets={"file": "<file id>"}, wait=false)
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("ff5d5921-5cc5-4a5f-8322-4f25cc3cd460", input_assets={"file": "<file id>"})
```

The call returns an action id at once. Read the result with `get_action(id=..., wait=true)` over MCP, or `ouro action wait <id>` from the CLI.
