OpenParable
Skip to content
← Back to skills

Mat DB Optimade

Research
mat-db-optimade

Mat DB Optimade is an Agent Skill for research published in the learningmatter-mit/AtomisticSkills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/learningmatter-mit/AtomisticSkills/blob/HEAD/.agents/skills/mat-db-optimade/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/mat-db-optimade, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

mat-db-optimade

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:

  • cod – Crystallography Open Database: The largest open-access collection of experimentally determined crystal structures.
  • nmd – NOMAD: Comprehensive repository of both theoretical methods and experimental configurations.
  • aflow – AFLOW: Automatic-FLOW Computational Materials Data Repository.
  • mp – Materials Project: Well-known theoretical stable/unstable materials repository based on DFT.
  • oqmd – Open Quantum Materials Database: High-throughput DFT database of thermodynamic and structural properties.
  • jarvis – JARVIS: 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