pymatgen-ext

Query Materials Project, OPTIMADE, and COD for structures and metadata via pymatgen.ext.

16|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill pymatgen-ext
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymatgen-ext
Source: https://github.com/Hongyu-yu/matsci-ai-skills/tree/main/skills/pymatgen-ext
Command: npx skills add https://github.com/Hongyu-yu/matsci-ai-skills --skill pymatgen-ext

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymatgen, pandas, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill provides programmatic access to external data sources via pymatgen.ext, enabling easy retrieval of Materials Project entries, OPTIMADE structures, and COD data.

Core Features & Use Cases

  • Materials Project access: fetch entries and structures using MPRester.
  • OPTIMADE access: query OPTIMADE endpoints for structures and metadata.
  • COD lookup: search COD IDs and fetch structures for a given formula or id.

Quick Start

Provide an example showing how to fetch a structure from Materials Project using MPRester.

Frequently Asked Questions about pymatgen-ext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch crystal structures from Materials Project using pymatgen?

To fetch structures from Materials Project, use MPRester within pymatgen.ext to query entries, structures, and metadata, requiring a Python environment with pymatgen installed and valid API keys.

Can I query OPTIMADE endpoints for structures and metadata with pymatgen?

Yes, pymatgen.ext provides OPTIMADE access to query OPTIMADE endpoints for structures and metadata, enabling cross-database lookups alongside Materials Project and COD data retrieval.

What's the best way to retrieve structures from COD using pymatgen?

The best way to retrieve COD structures is using pymatgen.ext to search COD IDs and fetch structures for a given formula or id, integrating with cross-database comparative analysis workflows.

Do I need API keys to access external databases with pymatgen.ext?

Accessing external databases with pymatgen.ext requires a Python environment with pymatgen installed and access to Materials Project or OPTIMADE endpoints, along with any required API keys.

How does cross-database structure retrieval work with Materials Project, OPTIMADE, and COD?

Cross-database structure retrieval works by using pymatgen.ext to query Materials Project, OPTIMADE endpoints, and COD, fetching structures, entries, and metadata for comparative analyses.

What limitations exist when querying external data sources via pymatgen.ext?

Querying external data sources via pymatgen.ext is limited by dependency on a local Python environment with pymatgen, pandas, and matplotlib, plus network access and valid API keys for external endpoints.