agentleFS
Hongyu-yuHongyu-yu/matsci-ai-skills/skills/pymatgen-ext/SKILL.md

pymatgen-ext

Skill19 starsChanged 11 months agoMITView on GitHub

Use for external data access via pymatgen.ext: Materials Project (MPRester), OPTIMADE endpoints, and COD lookups.

  • Installs packages

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ensure pymatgen is installed in your Python environment:

    line 16
  2. Distinctive:

    Search summaries and retrieve structures

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Pymatgen External Data

Overview

Pymatgen external data helpers provide access to Materials Project, OPTIMADE endpoints, and COD structures.

Required Python Environment

Ensure pymatgen is installed in your Python environment:

pip install pymatgen mp-api
# or
conda install -c conda-forge pymatgen mp-api

Example usage pattern:

from mp_api.client import MPRester
# your code here

When to Use This Skill

  • Query Materials Project or other OPTIMADE databases
  • Fetch structures or metadata from COD

Core Capabilities

1. Materials Project

  • Search summaries and retrieve structures

2. OPTIMADE

  • Query OPTIMADE-compatible endpoints

3. COD

  • Fetch structures by COD ID

Quick Workflow

  1. Confirm API keys or endpoints.
  2. Query and retrieve structures or metadata.
  3. Convert to Structure and export as needed.

Resources

scripts/

Executable examples in the scripts/ directory:

  • 2013-01-01-Calculating_Reaction_Energies_with_the_Materials_API.py - Reaction energies using Materials Project data.
  • 2013-01-01-Plotting_and_Analyzing_a_Phase_Diagram_using_the_Materials_API.py - Phase diagram plotting and analysis with MP data.
  • 2017-03-02-Getting_data_from_Materials_Project.py - Querying Materials Project for structures and data.
  • 2018-09-25-Structure_Prediction_using_Pymatgen_and_the_Materials_API.py - Structure prediction with Materials Project data.

Note: These scripts require Materials Project API access; set your API key before running.

references/

Detailed reference material (load as needed):

  • references/external-data.md - External data access patterns
  • references/docs/pymatgen.ext.md - Local API docs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.