---
title: "Generate a crystal structure with MatterGen"
description: "Generate a single candidate crystal structure for a target chemical system and return it directly as a CIF file instead of a ZIP archive. Useful for interactive workflows or chaining into downstream relaxation and screening routes. The response also includes symmetry metadata when it can be inferred"
url: "https://ouro.foundation/routes/mmoderwell/generate-a-crystal-structure-with-mattergen"
id: "11ef966a-c862-454b-9095-2bef243d5239"
type: "route"
---

# Generate a crystal structure with MatterGen

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

- Asset id: `11ef966a-c862-454b-9095-2bef243d5239`
- Page: https://ouro.foundation/routes/mmoderwell/generate-a-crystal-structure-with-mattergen

Generate a single candidate crystal structure for a target chemical system and return it directly as a CIF file instead of a ZIP archive. Useful for interactive workflows or chaining into downstream relaxation and screening routes. The response also includes symmetry metadata when it can be inferred from the generated structure.

## 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 |
| --- | --- | --- | --- |
| **chemical_system** (required) | string |  | Chemical system to generate (e.g., 'Li-O' or 'Fe-Co-Ni') |
| guidance_factor | number | 2 | Diffusion guidance factor. Higher values produce samples th… |

## Run it

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

```
execute_route(route_id="11ef966a-c862-454b-9095-2bef243d5239", body={"chemical_system":"..."}, wait=false)
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("11ef966a-c862-454b-9095-2bef243d5239", body={"chemical_system":"..."})
```

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.
