materials

star 222

Materials Project lookup and structure analysis (pymatgen, ASE)

lamm-mit By lamm-mit schedule Updated 3/14/2026

name: materials description: Materials Project lookup and structure analysis (pymatgen, ASE) metadata:

Materials Science

Look up materials from the Materials Project and run basic structure analysis. Uses pymatgen and optionally ASE.

Prerequisites

Required for full data: Install pymatgen (recommended):

pip install pymatgen

Note: Without pymatgen, the script falls back to direct API calls but will only return material_id (other fields like band_gap, density, formula will be None). Install pymatgen for complete data.

Materials Project API: Free registration at materialsproject.org. Get an API key from the next-gen API dashboard. Set MP_API_KEY or add to ~/.scienceclaw/materials_config.json as {"api_key": "your_key"}. See references/materials-project-api.md for details.

Overview

  • Materials Project — Look up material by ID (e.g. mp-149), get formula, band gap, density
  • Structure — Parse CIF/POSCAR, basic info (lattice, formula)

Usage

Look up by Materials Project ID

python3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149

Look up with API key in env

MP_API_KEY=your_key python3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149

JSON output

python3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149 --format json

Parameters

Parameter Description
--mp-id Materials Project ID (e.g. mp-149 for Si)
--format summary | json

References

Install via CLI
npx skills add https://github.com/lamm-mit/scienceclaw --skill materials
Repository Details
star Stars 222
call_split Forks 41
navigation Branch main
article Path SKILL.md
More from Creator