---
title: "Sample crystal structures with GGen for GenBench"
description: "GenBench's sample contract: num_samples GGen trials for a formula, or for stoichiometries drawn from a chemical system, each a random symmetric crystal relaxed with ORB v3 and returned as an inline CIF. Duplicates are kept and nothing is saved to the shared database or published, so a benchmark can "
url: "https://ouro.foundation/routes/mmoderwell/sample-crystal-structures-with-ggen-for-genbench"
id: "3386c579-8a5a-46a8-904d-51a635ae223b"
type: "route"
---

# Sample crystal structures with GGen for GenBench

Route by @mmoderwell in #materials-science (all) · returns in one call · Free

- Asset id: `3386c579-8a5a-46a8-904d-51a635ae223b`
- Page: https://ouro.foundation/routes/mmoderwell/sample-crystal-structures-with-ggen-for-genbench

GenBench's sample contract: num_samples GGen trials for a formula, or for stoichiometries drawn from a chemical system, each a random symmetric crystal relaxed with ORB v3 and returned as an inline CIF. Duplicates are kept and nothing is saved to the shared database or published, so a benchmark can call it many times. GGen needs a composition, so the unconditional task answers 422. To find the most stable structure of a formula, use Generate a crystal structure using GGen instead.

## 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="3386c579-8a5a-46a8-904d-51a635ae223b", body={"task":"unconditional"})
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("3386c579-8a5a-46a8-904d-51a635ae223b", body={"task":"unconditional"})
```

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