mat-db-optimade

SkillDatabases & data

Query the Crystallography Open Database (COD) and other OPTIMADE-compliant databases for experimental crystal structures.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the mat-db-optimade skill

What this skill tells your AI

The instructions your AI receives, as published by learningmatter-mit/atomisticskills in .agents/skills/mat-db-optimade/SKILL.md and read by ahel’s review.

Goal

To query experimental crystal structures (e.g. from the Crystallography Open Database - COD, NOMAD) using the standardized REST API provided by OPTIMADE, and to extract the structural data and metadata in a JSON format.

Instructions

Step 1. Querying an OPTIMADE Database

Use the query_optimade.py script to fetch structure data based on standard OPTIMADE query language filters.

# Env: base-agent
python .agents/skills/mat-db-optimade/scripts/query_optimade.py \
    results.json \
    --filter 'elements HAS ALL "Na", "Cl"' \
    --provider cod \
    --max_results 5

Parameters:

  • output: Path to the output JSON file where results will be stored.
  • --filter: The OPTIMADE filter string. (e.g., elements HAS ALL "O", "Ti").
  • --provider: Comma-separated list of database providers. Defaults to cod.
  • --max_results: Maximum number of structures to pull per provider. Defaults to 10.

Supported Database Providers (Common short IDs)

When using the --provider parameter, you can provide the following short string identifiers for well-known databases:

  • codCrystallography Open Database: The largest open-access collection of experimentally determined crystal structures.
  • nmdNOMAD: Comprehensive repository of both theoretical methods and experimental configurations.
  • aflowAFLOW: Automatic-FLOW Computational Materials Data Repository.
  • mpMaterials Project: Well-known theoretical stable/unstable materials repository based on DFT.
  • oqmdOpen Quantum Materials Database: High-throughput DFT database of thermodynamic and structural properties.
  • jarvisJARVIS: Joint Automated Repository for Various Integrated Simulations.

Constraints

  • Environments: The scripts require the base-agent Conda environment.
  • Provider Status: Sometimes specific providers (like Aflow or NOMAD) may experience API downtime. If a provider fails, the optimade client will log warnings.

References

  • Andersen, C. W., et al. "OPTIMADE, an API for exchanging materials data." Scientific Data, 8, 217 (2021). DOI

Author: Bowen Deng Contact: GitHub @learningmatter-mit

Signals

GitHub stars
164
Forks
24
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
mat-db-optimade
Source
github.com/learningmatter-mit/atomisticskills