/atomistic-skills:mat-electronic-structurefrom Atomistic Skills
Calculates electronic band structure and density of states for crystalline materials using atomate2 and VASP. Determines band gap, direct vs indirect transitions, and metallic/semiconducting/insulating character.
Ships in Atomistic Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
[!NOTE] Steps written
server.toolare MCP tool calls:base.search_materials_project_by_formulais thesearch_materials_project_by_formulatool of thebaseserver (mcp__base__search_materials_project_by_formula, ormcp__plugin_atomistic-skills_base__search_materials_project_by_formulawhen 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 byload_modelstays loaded:${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
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.
Start with a relaxed crystalline structure in CIF or POSCAR format. You can:
base.search_materials_project_by_formula toolUse the atomate2 MCP tool with calculation_type="band_structure":
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 calculationsThe workflow automatically:
Instead of running DFT calculations, you can retrieve existing electronic structure data from Materials Project:
${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:
When to use MP retrieval vs. calculations:
After the calculation completes, parse the results and generate a band structure plot:
${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:
vasprun.xml.gz from the non-SCF jobFor DOS (uniform mode):
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/plot_dos.py \
dos_results \
--output dos.png
The script will:
vasprun.xml.gz from the uniform k-mesh jobAlternative: Manual post-processing with pymatgen
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')
# 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.
# 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.
PMG_VASP_PSP_DIR must point to POTCAR directory (or set in ~/.pmgrc.yaml)cpu (via MCP tool)cpu (pymatgen, matplotlib)HighSymmKpath. For very accurate results, you may need to manually specify denser k-paths.For exploratory band structure analysis using MLIPs (not DFT):
For production calculations, always use DFT (this skill) and choose the appropriate functional:
Author: Bowen Deng Contact: GitHub @learningmatter-mit
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub learningmatter-mit/atomisticskills --plugin atomistic-skills133 skills in this plugin
/chem-bond-dissociationCalculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation./chem-conformer-searchGenerate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting./chem-db-mofQuery multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al. via Materials Cloud) and download CIF structures with optional element or identifier filters./chem-db-qmofQuery the Quantum MOF (QMOF) database via Materials Project's MPContribs platform for DFT-computed properties (bandgap) and optimized crystal structures of Metal-Organic Frameworks./chem-db-spectraSearch and download experimental InfraRed (IR), Mass spectra, and UV-Vis spectra data (JCAMP-DX format) for molecules./chem-dft-orca-advanced-calculationWrite and run custom ORCA input files for advanced electronic structure methods or settings not available through the SCINE wrapper, including multi-reference methods, excited states, relativistic effects, advanced SCF, NMR/EPR, and more.Other plugins' skills for the same job