---
title: "Generate surface slabs"
description: "Enumerate surface slabs from a bulk structure and return a zipped set of slab CIFs plus a manifest."
url: "https://ouro.foundation/routes/mmoderwell/generate-surface-slabs"
id: "6a5e6e41-5b06-4e10-84b0-d9e05b8d7713"
type: "route"
---

# Generate surface slabs

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

- Asset id: `6a5e6e41-5b06-4e10-84b0-d9e05b8d7713`
- Page: https://ouro.foundation/routes/mmoderwell/generate-surface-slabs

Enumerate surface slabs from a bulk structure and return a zipped set of slab CIFs plus a manifest.

## 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 |
| --- | --- | --- | --- |
| max_slabs | integer | 32 | Maximum number of slab structures to emit. |
| primitive | boolean | false | Generate primitive slabs instead of conventional slabs. |
| max_miller | integer | 2 | Enumerate symmetrically distinct Miller indices up to this… |
| symmetrize | boolean | false | Return symmetrized slabs when pymatgen can identify equival… |
| center_slab | boolean | true | Center each slab within the cell. |
| min_slab_size | number | 10 | Minimum slab thickness in Å. |
| miller_indices | array[] \| null |  | Optional explicit Miller indices to generate instead of max… |
| min_vacuum_size | number | 15 | Minimum vacuum spacing in Å. |
| bypass_cif_health_screen | boolean | false | Skip CIF validity checks (parse failure, empty structure, o… |
| conventional_standard_structure | boolean | true | Convert the input to a conventional standard structure befo… |

## Run it

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

```
execute_route(route_id="6a5e6e41-5b06-4e10-84b0-d9e05b8d7713", input_assets={"structure": "<structure id>"})
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("6a5e6e41-5b06-4e10-84b0-d9e05b8d7713", input_assets={"structure": "<structure id>"})
```

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