Agent skill

Mat Electronic Structure

by learningmatter-mit in learningmatter-mit/AtomisticSkills

Calculate electronic band structure and density of states using atomate2 and VASP.

MITAuto-check passed

Install Mat Electronic Structure

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill mat-electronic-structure -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills mat-electronic-structure --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mat-electronic-structure .claude/skills/mat-electronic-structure && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mat-electronic-structure
GitHub stars
175
Token cost
~2.1k tokens
SKILL.md length
601 words
Files
7 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Calculate electronic band structure and density of states using atomate2 and VASP.

  • Works in 3 steps: Obtain or Prepare the Input Structure → Run Band Structure Calculation → Post-Process and Visualize Results
  • SKILL.md covers Goal, Instructions, Examples and Constraints, plus 1 more section
  • Runs Python scripts from its folder

What it does

Mat Electronic Structure is an agent skill from learningmatter-mit/AtomisticSkills. Calculate electronic band structure and density of states using atomate2 and VASP.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts (for example `examples/README.md`, `scripts/get_mp_electronic_structure.py` and `scripts/plot_band_structure.py`).

It works with Model Context Protocol. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.

Example prompts

  • “/mat-electronic-structure”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Obtain or Prepare the Input Structure
  2. Run Band Structure Calculation
  3. Post-Process and Visualize Results

What it can do on your machine

Read from SKILL.md and the folder at commit 7f2d86d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mat Electronic Structure loads about 2.1k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 601 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from learningmatter-mit/AtomisticSkills at commit 7f2d86d, republished under its MIT licence (© learningmatter-mit). 601 words, ~2,071 tokens.

Download SKILL.mdSave it as .claude/skills/mat-electronic-structure/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
mat-electronic-structure
description
Calculate electronic band structure and density of states using atomate2 and VASP.
metadata.category
materials
metadata.venv
cpu

Electronic Structure

<!-- mcp-tools-note -->

[!NOTE] Steps written server.tool are MCP tool calls: base.search_materials_project_by_formula is the search_materials_project_by_formula tool of the base server (mcp__base__search_materials_project_by_formula, or mcp__plugin_atomistic-skills_base__search_materials_project_by_formula when installed as a plugin). Without a connected server, run the same tools from the shell. Tools named in one command share a process, so a model loaded by load_model stays loaded:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python -m src.mcp_server.cli base search_materials_project_by_formula key=value
${CLAUDE_SKILL_DIR}/../../venv/run cpu python -m src.mcp_server.cli atomate2 run_atomate2_vasp_calculation key=value

Goal

To calculate the electronic band structure of a crystalline material, revealing the energy-momentum relationship for electrons and determining whether the material is metallic, semiconducting, or insulating. This includes computing the band gap ($E_g$), identifying direct vs. indirect transitions, and visualizing the dispersion along high-symmetry k-paths.

Instructions

1. Obtain or Prepare the Input Structure

Start with a relaxed crystalline structure in CIF or POSCAR format. You can:

2. Run Band Structure Calculation

Use the atomate2 MCP tool with calculation_type="band_structure":

python
atomate2.run_atomate2_vasp_calculation(
    structures_path="structure.cif",           # Input structure file
    output_dir="./band_structure_results",     # Output directory
    calculation_type="band_structure",         # Band structure calculation
    bandstructure_mode="line",                 # Options: "line", "uniform", "both"
    preset_type="omat",                        # VASP preset (omat, mp, matpes-pbe, matpes-r2scan)
    execution_mode="remote",                   # "local" or "remote"
    remote_settings={                          # Required for remote execution
        "project": "<your_jobflow_project>",
        "worker": "<your_worker>"
    }
)

Band structure modes:

  • "line": Calculate along high-symmetry k-paths (for band structure plots)
  • "uniform": Calculate on a uniform k-mesh (for density of states)
  • "both": Perform both line and uniform calculations

The workflow automatically:

  1. Runs a static SCF calculation to obtain the charge density
  2. Runs a non-SCF calculation to compute band structure eigenvalues
Alternative: Retrieve Pre-Computed Data from Materials Project

Instead of running DFT calculations, you can retrieve existing electronic structure data from Materials Project:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/get_mp_electronic_structure.py \
    --material_id mp-149 \
    --output si_mp_bands.json \
    --plot

This retrieves:

  • Pre-computed band structure along high-symmetry paths
  • Density of states (DOS)
  • Band gap (energy, direct/indirect)
  • Fermi energy

When to use MP retrieval vs. calculations:

  • Retrieve from MP: Quick screening, validation, known materials
  • Run calculations: New materials, custom structures, specific DFT settings
3. Post-Process and Visualize Results

After the calculation completes, parse the results and generate a band structure plot:

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/plot_band_structure.py \
    band_structure_results \
    --output band_structure.png

The script will:

  • Parse the vasprun.xml.gz from the non-SCF job
  • Extract band gap information (energy, directness, transition)
  • Generate a publication-quality band structure plot

For DOS (uniform mode):

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/plot_dos.py \
    dos_results \
    --output dos.png

The script will:

  • Parse the vasprun.xml.gz from the uniform k-mesh job
  • Extract band gap and Fermi level
  • Generate a DOS plot

Alternative: Manual post-processing with pymatgen

python
from pymatgen.io.vasp import BSVasprun
from pymatgen.electronic_structure.plotter import BSPlotter

# Load band structure from atomate2 results
vasprun_path = "band_structure_results/results/structure_0/job_*/vasprun.xml.gz"
vasprun = BSVasprun(vasprun_path, parse_projected_eigen=False)
bs = vasprun.get_band_structure(line_mode=True)

# Get band gap
if not bs.is_metal():
    bg = bs.get_band_gap()
    print(f"Band gap: {bg['energy']:.3f} eV")
    print(f"Direct: {bg['direct']}")
    print(f"Transition: {bg['transition']}")

# Plot
plotter = BSPlotter(bs)
ax = plotter.get_plot(ylim=(-10, 10))
ax.get_figure().savefig("band_structure.png", dpi=300, bbox_inches='tight')

Examples

Show full SKILL.md (241 more words)Show less
Silicon Band Structure Calculation
python
# 1. Search for Si structure
base.search_materials_project_by_formula(
    formula="Si",
    save_to_file="Si.cif"
)

# 2. Run band structure calculation
atomate2.run_atomate2_vasp_calculation(
    structures_path="Si.cif",
    output_dir="./Si_bands",
    calculation_type="band_structure",
    bandstructure_mode="line",
    preset_type="omat",
    execution_mode="local"
)

# 3. Plot results
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/plot_band_structure.py Si_bands --output Si_bands.png

See examples/ for a complete Si band structure calculation showing an indirect band gap of 0.581 eV.

Silicon Density of States (DOS)
python
# 1. Use existing Si structure (or search Materials Project)

# 2. Run DOS calculation with uniform k-mesh
atomate2.run_atomate2_vasp_calculation(
    structures_path="Si.cif",
    output_dir="./Si_dos",
    calculation_type="band_structure",
    bandstructure_mode="uniform",  # Uniform k-mesh for DOS
    preset_type="omat",
    execution_mode="local"
)

# 3. Plot DOS
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/plot_dos.py Si_dos --output Si_dos.png

See examples/ for the complete DOS calculation showing the distribution of electronic states.

Constraints

  • Structure Requirements: Input must be a crystalline structure with well-defined symmetry. Band structure calculations are not meaningful for amorphous or highly disordered materials.
  • VASP Setup: Requires properly configured VASP environment:
    • PMG_VASP_PSP_DIR must point to POTCAR directory (or set in ~/.pmgrc.yaml)
    • For remote execution: Atomate2/jobflow-remote must be configured
  • Environments:
    • Band structure calculation: cpu (via MCP tool)
    • Post-processing scripts: cpu (pymatgen, matplotlib)
  • Functional Choice:
    • PBE (omat, mp presets) typically underestimates band gaps
    • For accurate gaps: Use hybrid functionals (HSE06) or GW methods (not yet supported)
    • MatPES presets (matpes-pbe, matpes-r2scan) use r2SCAN which improves gap predictions
  • k-point Density: The automatic k-path generation uses pymatgen's HighSymmKpath. For very accurate results, you may need to manually specify denser k-paths.
  • Spin-Polarization: Current implementation assumes non-spin-polarized calculations. For magnetic materials, additional configuration may be needed.

Foundation Potential Recommendations

For exploratory band structure analysis using MLIPs (not DFT):

  • CHGNet: Can predict band gaps, but accuracy varies
  • Note: MACE, M3GNet, and other MLIPs trained on PES data do not predict electronic properties

For production calculations, always use DFT (this skill) and choose the appropriate functional:

  • Standard screening: PBE (omat/mp presets)
  • Improved gaps: r2SCAN (matpes-r2scan preset)
  • Accurate gaps: HSE06 or GW (requires custom INCAR settings)

Author: Bowen Deng Contact: GitHub @learningmatter-mit

© learningmatter-mit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts) in skills/mat-electronic-structure of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/README.md
  • examples/Si_band_structure.png
  • examples/Si_dos.png
  • scripts/get_mp_electronic_structure.py
  • scripts/plot_band_structure.py
  • scripts/plot_dos.py

Open the folder on GitHubat commit 7f2d86d

Compare with similar skills

Mat Electronic Structure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mat Electronic Structure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mat Electronic Structure this skilllearningmatter-mit/AtomisticSkills175—~2.1kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official37k11 repos~3.1kAutomated safety check: PassApache-2.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Stitch to Remotion Walkthrough Videosgoogle-labs-code/stitch-skills8.4k6 repos~3.2kAutomated safety check: NotesApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    37k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Stitch to Remotion Walkthrough Videos

    google-labs-code/stitch-skills

    Official

    Builds walkthrough videos from Stitch design projects using Remotion, with transitions, zoom effects and text overlays on each screen.

    8.4k GitHub starsUsed in 6 repos~3.2k tokens
    Media & CreativeAuto-check: notes
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    175 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    175 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    175 GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    175 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    175 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    175 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Questions about Mat Electronic Structure

What does Mat Electronic Structure do?

Calculate electronic band structure and density of states using atomate2 and VASP. Mat Electronic Structure is an agent skill from learningmatter-mit/AtomisticSkills. Calculate electronic band structure and density of states using atomate2 and VASP.

How do I install Mat Electronic Structure in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-electronic-structure -a claude-code`. Or copy the skill folder (skills/mat-electronic-structure in learningmatter-mit/AtomisticSkills) into .claude/skills/mat-electronic-structure in your project. Claude Code loads it when a task matches its description.

How do I install Mat Electronic Structure in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-electronic-structure -a codex`. Or copy the skill folder (skills/mat-electronic-structure in learningmatter-mit/AtomisticSkills) into .agents/skills/mat-electronic-structure in your project. Codex loads it when a task matches its description.

Can I use Mat Electronic Structure in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add learningmatter-mit/AtomisticSkills --skill mat-electronic-structure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mat-electronic-structure, .gemini/skills/mat-electronic-structure, .github/skills/mat-electronic-structure and .opencode/skills/mat-electronic-structure in your project.

What does Mat Electronic Structure need to run?

Going by SKILL.md and its folder, Mat Electronic Structure needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Mat Electronic Structure access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Mat Electronic Structure safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Mat Electronic Structure use?

Mat Electronic Structure is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mat Electronic Structure use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mat Electronic Structure?

Skills that share tags, products or a category with Mat Electronic Structure: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 37k stars) and Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mat Electronic Structure?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 175 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 6, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.