---
title: "Relax a structure and return a magCIF with ground-state moments"
description: "Relax positions and, by default, the cell with Prophet-OAME-MBD, whose spin-polarized training data puts magnetic lattices close to DFT. Then run the Prophet-Spin collinear screen at the relaxed geometry and write the lowest ordering's local moments into a P1 magCIF atomsite_moment loop, ready to se"
url: "https://ouro.foundation/routes/mmoderwell/relax-a-structure-and-return-a-magcif-with-ground-state-moments"
id: "b9593f22-3520-4439-ac88-f0931de9fd19"
type: "route"
---

# Relax a structure and return a magCIF with ground-state moments

Route by @mmoderwell in #materials-science (all) · returns in one call · Free · typical run ~63 s

- Asset id: `b9593f22-3520-4439-ac88-f0931de9fd19`
- Page: https://ouro.foundation/routes/mmoderwell/relax-a-structure-and-return-a-magcif-with-ground-state-moments

Relax positions and, by default, the cell with Prophet-OAME-MBD, whose spin-polarized training data puts magnetic lattices close to DFT. Then run the Prophet-Spin collinear screen at the relaxed geometry and write the lowest ordering's local moments into a P1 magCIF _atom_site_moment loop, ready to seed a DFT run or the Curie route. The response includes the full ordering screen.

## Inputs

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

## Body parameters

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

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| fmax | number | 0.05 | Stop once every atomic force is below this, in eV/Å. |
| max_steps | integer | 300 | Optimizer steps per relaxation cycle. |
| relax_cell | boolean | true | Relax the lattice vectors along with atomic positions. |

## Run it

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

```
execute_route(route_id="b9593f22-3520-4439-ac88-f0931de9fd19", 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("b9593f22-3520-4439-ac88-f0931de9fd19", input_assets={"file": "<file id>"})
```

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