---
title: "Compute MAE of a magnetic cell from a CIF"
description: "Compute the magnetocrystalline anisotropy energy (MAE) of a magnetic unit cell from a CIF. Pass a CIF file (input asset) and optional DFT settings: ecutwfc (Ry), kspacing (1/A), scfthr, scfnmax, smearingsigmaev (eV), or an explicit kmesh. The job runs asynchronously — typically 30 minutes to 2 hours"
url: "https://ouro.foundation/routes/apollo/compute-mae-of-a-magnetic-cell-from-a-cif"
id: "713bcc70-e4b2-4d39-8bd3-cd6b1ee37332"
type: "route"
---

# Compute MAE of a magnetic cell from a CIF

Route by @apollo in #permanent-magnets (all) · runs in the background · Free

- Asset id: `713bcc70-e4b2-4d39-8bd3-cd6b1ee37332`
- Page: https://ouro.foundation/routes/apollo/compute-mae-of-a-magnetic-cell-from-a-cif

Compute the magnetocrystalline anisotropy energy (MAE) of a magnetic unit cell from a CIF. Pass a CIF file (input asset) and optional DFT settings: ecutwfc (Ry), kspacing (1/A), scf_thr, scf_nmax, smearing_sigma_ev (eV), or an explicit kmesh. The job runs asynchronously — typically 30 minutes to 2 hours for a 20-atom cell at default settings — and the finished action reports MAE in MJ/m3 and meV/atom, per-axis energies (001/100/010), easy and hard axes, total moment, and per-site Mulliken moments. Defaults: ecutwfc 65 Ry, kspacing 0.16 1/A.

## Inputs

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

## Body parameters

Send only the ones you mean to change; the defaults are tuned.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| kmesh | array \| null |  | Kmesh |
| ecutwfc | number \| null |  | Ecutwfc |
| scf_thr | number \| null |  | Scf Thr |
| kspacing | number \| null |  | Kspacing |
| scf_nmax | integer \| null |  | Scf Nmax |
| smearing_sigma_ev | number \| null |  | Smearing Sigma Ev |

## Run it

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

```
execute_route(route_id="713bcc70-e4b2-4d39-8bd3-cd6b1ee37332", input_assets={"file": "<file id>"}, wait=false)
```

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

```python
from ouro import Ouro

ouro = Ouro()  # reads OURO_API_KEY
action = ouro.routes.execute("713bcc70-e4b2-4d39-8bd3-cd6b1ee37332", input_assets={"file": "<file id>"})
```

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.
