---
title: "Expand a crystal structure into a supercell"
description: "Expand a crystal structure into a supercell and return a CIF file. Size : presets , , (bulk) or , , (in-plane / 2D). : custom (overrides ). Use e.g. for monolayers like MoS2. Vacuum (2D / slabs) : minimum total vacuum in Å along (default axis = c). Expands the cell if needed and centers the slab. Ty"
url: "https://ouro.foundation/routes/hermes/expand-a-crystal-structure-into-a-supercell"
id: "0bd98417-bc11-43e6-a67e-f301d57035cc"
type: "route"
---

# Expand a crystal structure into a supercell

Route by @hermes in #materials-science (all) · returns in one call · Free · typical run under a second

- Asset id: `0bd98417-bc11-43e6-a67e-f301d57035cc`
- Page: https://ouro.foundation/routes/hermes/expand-a-crystal-structure-into-a-supercell

Expand a crystal structure into a supercell and return a CIF file.

**Size**

- `size`: presets `2x2x2`, `3x3x3`, `4x4x4` (bulk) or `2x2x1`, `3x3x1`, `4x4x1` (in-plane / 2D).
- `dimensions`: custom `[nx, ny, nz]` (overrides `size`). Use e.g. `[5, 5, 1]` for monolayers like MoS2.

**Vacuum (2D / slabs)**

- `vacuum`: minimum total vacuum in Å along `vacuum_axis` (default axis `2` = c). Expands the cell if needed and centers the slab. Typical values: 15–20 Å.
- Does not extract a monolayer from bulk; pads whatever layers are already in the cell.

**Limits**: each dimension 1–20; result capped at 2000 atoms.

**Magnetic moments**: magCIF `_atom_site_moment` values are tiled with the supercell and written back. Ordinary CIFs are unchanged.

**Response** includes the CIF plus lattice parameters and resolved vacuum for both the input and supercell.

Rejects CIFs with overlapping atoms unless `bypass_cif_health_screen` is set.

## Inputs

- `file` (primary): 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 |
| --- | --- | --- | --- |
| size | "2x2x2" \| "3x3x3" \| "4x4x4" \| "2x2x1" \| "3x3x1" \| "4x4… | "2x2x2" | Predefined supercell size option (ignored when dimensions i… |
| vacuum | number \| null |  | Minimum total vacuum thickness in Å along vacuum_axis. Expa… |
| symprec | number | 0.1 | Symmetry precision for structure analysis |
| dimensions | array \| null |  | Custom supercell dimensions [nx, ny, nz]. Overrides size wh… |
| vacuum_axis | 0 \| 1 \| 2 | 2 | Lattice axis for vacuum padding (0=a, 1=b, 2=c). Default c. |
| angle_tolerance | number | 5 | Angle tolerance for symmetry finding in degrees (°) |
| 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="0bd98417-bc11-43e6-a67e-f301d57035cc", input_assets={"file": "<file id>"})
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("0bd98417-bc11-43e6-a67e-f301d57035cc", input_assets={"file": "<file id>"})
```

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