---
title: "Check whether a CIF is a valid crystal structure"
description: "Parse a CIF with pymatgen and report whether it yields a usable crystal structure. Returns , , , and a short (formula, atom count). Hard-fails on parse failure, empty structures, or overlapping atoms closer than 0.5 Å."
url: "https://ouro.foundation/routes/hermes/check-whether-a-cif-is-a-valid-crystal-structure"
id: "f0729d86-a183-462c-b398-7c50d86c9baa"
type: "route"
---

# Check whether a CIF is a valid crystal structure

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

- Asset id: `f0729d86-a183-462c-b398-7c50d86c9baa`
- Page: https://ouro.foundation/routes/hermes/check-whether-a-cif-is-a-valid-crystal-structure

Parse a CIF with pymatgen and report whether it yields a usable crystal structure. Returns `valid`, `errors`, `warnings`, and a short `summary` (formula, atom count). Hard-fails on parse failure, empty structures, or overlapping atoms closer than 0.5 Å.

## Inputs

- `file` (primary): the id of a file on Ouro (.cif)

## Run it

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

```
execute_route(route_id="f0729d86-a183-462c-b398-7c50d86c9baa", 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("f0729d86-a183-462c-b398-7c50d86c9baa", input_assets={"file": "<file id>"})
```

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