---
title: "Relax a crystal structure with animation"
description: "Run a structure relaxation with a configurable ML interatomic potential and produce an MP4 animation showing the atomic trajectory from the initial to the relaxed geometry. Useful for visualizing how a structure evolves during optimization and for verifying convergence behavior."
url: "https://ouro.foundation/routes/mmoderwell/relax-a-crystal-structure-with-animation"
id: "8659406b-bd11-419a-9ab3-cf3534511b6b"
type: "route"
---

# Relax a crystal structure with animation

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

- Asset id: `8659406b-bd11-419a-9ab3-cf3534511b6b`
- Page: https://ouro.foundation/routes/mmoderwell/relax-a-crystal-structure-with-animation

Run a structure relaxation with a configurable ML interatomic potential and produce an MP4 animation showing the atomic trajectory from the initial to the relaxed geometry. Useful for visualizing how a structure evolves during optimization and for verifying convergence behavior.

## Inputs

- `structure`: 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.02 | Force convergence threshold (eV/Å); with cell optimization… |
| model | "orb-v3-conservative-20-omat" \| "orb-v3-conservative-inf-o… | "orb-v3-conservative-inf-mpa" | Machine-learning interatomic potential used for energies an… |
| max_steps | integer | 400 | Maximum optimization steps. A run that hits this limit stil… |
| max_frames | integer | 100 | Maximum number of frames to include in animation |
| resolution | "low" \| "medium" \| "high" | "medium" | Video resolution quality |
| animation_fps | integer | 20 | Frames per second for animation |
| optimize_cell | boolean | true | Whether to optimize cell parameters using FrechetCellFilter |
| preserve_symmetry | boolean | false | Hold the input's space group (found at a 0.1 Å tolerance) f… |
| bypass_cif_health_screen | boolean | false | Skip CIF validity checks (parse failure, empty structure, o… |

## Run it

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

```
execute_route(route_id="8659406b-bd11-419a-9ab3-cf3534511b6b", input_assets={"structure": "<structure id>"}, wait=false)
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("8659406b-bd11-419a-9ab3-cf3534511b6b", input_assets={"structure": "<structure 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.
