Expert assistant for accessing materials databases (AFLOW and Materials Project) — query crystal structures, materials properties, thermodynamic data, and computational results from comprehensive databases.
Expert assistant for accessing materials science databases (AFLOW and Materials Project) to query crystal structures, materials properties, thermodynamic data, and computational results.
This skill enables Claude to help you:
Use this skill when you need to:
# Materials Project API client
pip install mp-api
# Structure manipulation (recommended)
pip install pymatgen ase
# AFLOW (optional - can use requests instead)
pip install aflow requests
Option A: Environment variable (recommended)
export MP_API_KEY="your_api_key_here"
Option B: Configuration file
echo '{"MAPI_KEY": "your_api_key_here"}' > ~/.config/.mpapi.json
from mp_api.client import MPRester
# This should work without errors
with MPRester() as mpr:
structure = mpr.get_structure_by_material_id("mp-149")
print(f"Got structure: {structure.formula}")
from mp_api.client import MPRester
with MPRester() as mpr:
docs = mpr.materials.summary.search(
formula="Si",
fields=["material_id", "formula_pretty", "band_gap"]
)
for doc in docs:
print(f"{doc.material_id}: {doc.formula_pretty}, Egap = {doc.band_gap} eV")
with MPRester() as mpr:
docs = mpr.materials.summary.search(
elements=["Ga", "N"],
energy_above_hull=(0, 0.05), # Thermodynamically stable
band_gap=(1.0, 4.0), # Semiconducting range
fields=["material_id", "formula_pretty", "band_gap", "energy_above_hull"]
)
import requests
# Get POSCAR file for FCC Silver
url = "http://aflowlib.duke.edu/AFLOWDATA/ICSD_WEB/FCC/Ag1/?geometry"
poscar = requests.get(url).text
print(poscar)
SKILL.md - Complete skill instructions for ClaudeREADME.md - This file (overview and setup)QUICK_REFERENCE.md - Quick syntax referencereferences/materials-project.md - Detailed Materials Project API documentationreferences/aflow.md - AFLOW REST API and AFLUX query syntaxexamples/mp_search_examples.py - Materials Project query examplesexamples/aflow_search_examples.py - AFLOW query examplesexamples/structure_download.py - Download and save structuresexamples/property_screening.py - Multi-property screening workflowfields in Materials Project queries to get only what you needMaterials Project: https://materialsproject.org
AFLOW: https://aflow.org
Pymatgen: https://pymatgen.org (structure analysis toolkit)
"MPRestError: Unauthorized"
AFLOW queries timing out
No results found
Import errors
pip install mp-apipip install --upgrade mp-apiSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer