---
title: "Sample crystal structures with MatterGen for GenBench"
description: "GenBench's sample contract: (base checkpoint), (chemical-system checkpoint, guidance factor 2), or (the formula's chemical system in cells of whole formula units, keeping exact matches from up to two batches). Async: about 11 minutes for 32 samples on an A10G. Answers the webhook with raw, unrelaxed"
url: "https://ouro.foundation/routes/mmoderwell/sample-crystal-structures-with-mattergen-for-genbench"
id: "1775a4d3-2fa3-4c86-b4b7-6d647f863eb8"
type: "route"
---

# Sample crystal structures with MatterGen for GenBench

Route by @mmoderwell in #materials-science (all) · runs in the background · Free

- Asset id: `1775a4d3-2fa3-4c86-b4b7-6d647f863eb8`
- Page: https://ouro.foundation/routes/mmoderwell/sample-crystal-structures-with-mattergen-for-genbench

GenBench's sample contract: `unconditional` (base checkpoint), `chemical_system` (chemical-system checkpoint, guidance factor 2), or `formula` (the formula's chemical system in cells of whole formula units, keeping exact matches from up to two batches). Async: about 11 minutes for 32 samples on an A10G. Answers the webhook with raw, unrelaxed CIFs inline as JSON; creates no Ouro assets.

## Inputs

- No input assets: the body below is the whole request.

## Body parameters

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

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| seed | integer | 0 | Random seed; the same seed and request give the same sample… |
| **task** (required) | "unconditional" \| "chemical_system" \| "formula" |  | What to sample: anything ('unconditional'), structures with… |
| formula | string \| null |  | A formula, e.g. 'LiCoO2'. Required for task 'formula'. |
| num_samples | integer | 32 | How many structures to return. |
| chemical_system | string \| null |  | Elements joined by dashes, e.g. 'Li-Mn-O'. Required for tas… |

## Run it

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

```
execute_route(route_id="1775a4d3-2fa3-4c86-b4b7-6d647f863eb8", body={"task":"unconditional"}, wait=false)
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("1775a4d3-2fa3-4c86-b4b7-6d647f863eb8", body={"task":"unconditional"})
```

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.
