Materials Project lookup and structure analysis (pymatgen, ASE)
Look up materials from the Materials Project and run basic structure analysis. Uses pymatgen and optionally ASE.
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 . Set or add to as . See for details.
MP_API_KEY~/.scienceclaw/materials_config.json{"api_key": "your_key"}references/materials-project-api.mdpython3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149
MP_API_KEY=your_key python3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149
python3 {baseDir}/scripts/materials_lookup.py --mp-id mp-149 --format json
| Parameter | Description |
|---|---|
--mp-id | Materials Project ID (e.g. mp-149 for Si) |
--format | summary | json |