vasp-band-gap
БесплатноЗапускает вложенные скриптыНе проверенCalculate the band gap (and band structure) of a crystalline material from a CIF file using DFT/VASP on the HPCSlurmArm cloud cluster. Implements the…
от pdl-openair★ 16 звёзд на GitHubОб этом скилле
VASP Band Gap Calculation (MatterGen Protocol)
End-to-end pipeline that takes a CIF, runs the MatterGen paper's 5-step VASP protocol on the HPCSlurmArm cloud cluster via the jcc CLI, and reports the band gap. Validated on MoS2-mp-2815 → 1.21 eV indirect (lit. PBE ≈ 1.23 eV).
When to Use
Trigger this skill whenever the user wants to compute a band gap or band structure from a crystal CIF. Typical prompts:
- "What's the band gap of MoS2?"
- "Calculate the PBE gap for this structure"
- "Is this material a metal or semiconductor?"
- "Run a band structure calculation on
" - "Give me VBM/CBM for
" - Batch: "Compute band gaps for all CIFs in this directory"
Do not trigger for: pure structure relaxation without band structure
(that's vasp-thermodynamic-stability), formation energy / ehull queries
(same skill), or hypothetical "predict the band gap with ML" requests (use
alignn_prediction MCP instead — no VASP needed).
The 5-step Protocol (MatterGen issue #213)
The paper-faithful recipe is five serial VASP jobs. Each consumes the
previous step's CONTCAR; the non-scf steps also consume static's CHGCAR:
| # | Job | Purpose | INCAR highlights |
|---|---|---|---|
| 00 | MP-GGA relax 1 | Coarse ionic + cell relax | ISIF=3, IBRION=2, NSW=100, EDIFFG=-0.02 |
| 01 | MP-GGA relax 2 | Fine ionic relax on relaxed cell | ISIF=2, IBRION=2, NSW=100 |
| 02 | static SCF | Dense uniform mesh, converged wavefunction | IBRION=-1, NSW=0, ISMEAR=-5, LAECHG=.True., LORBIT=11 |
| 03 | non-scf uniform | DOS on dense uniform mesh | ICHARG=11, ISTART=1, SIGMA=0.001 |
| 04 | non-scf line | Band structure along high-sym path | same as 03 but line-mode KPOINTS |
After step 02 the band gap can already be read from eigenvalue_band_properties
on the static uniform mesh — this is the recommended fast path for just
getting a gap value. Steps 03/04 are only needed for high-resolution DOS or
along-path band structure plots.
Quick Start
路径约定:以下
<skills-dir>指 skill 安装目录(项目级安装为项目根下.claude/skills/,用户级为~/.claude/skills/)。在项目根目录执行时可直接用.claude/skills/vasp-band-gap/...。
# Single CIF, full 5-step protocol (paper-faithful)
bash <skills-dir>/vasp-band-gap/scripts/run_bandgap_hpc.sh \
--cif /path/to/material.cif \
--name MyMaterial-mp-XXXX \
--output-dir /tmp/my_material \
--nodes 1 --ntasks 4
# Fast path: skip the two relax steps, jump straight to static (uses raw POSCAR)
# Useful when the CIF is already from a relaxed/converged source (e.g., Materials Project)
bash <skills-dir>/vasp-band-gap/scripts/run_bandgap_hpc.sh \
--cif /path/to/material.cif \
--name MyMaterial-mp-XXXX \
--output-dir /tmp/my_material \
--nodes 1 --ntasks 4 --skip-relax
Result is written to <output-dir>/final/band_gap.json:
{
"MyMaterial-mp-XXXX": {
"gap_eV": 1.2138,
"vbm_eV": 5.9745,
"cbm_eV": 7.1883,
"direct": false,
"source": "static_uniform_mesh_9x9x2"
}
}
What the Pipeline Does
Generate VASP inputs (
compute_band_gap.py --write-inputs): reads the CIF, builds an atomate2BandStructureMakerwith paper-faithful INCAR settings, walks the resulting jobflow Flow, and writes 5 job directories under<output-dir>/inputs/<NAME>/0X_<job>/. Each directory has INCAR, POSCAR, KPOINTS, POTCAR (real POTCARs require a local PAW PBE pseudopotential library registered viaPMG_VASP_PSP_DIRin~/.pmgrc.yaml).Submit each step to HPC (
run_bandgap_hpc.sh→run_hpc.sh): for each step, build anupload/dir (INCAR/KPOINTS/POTCAR + POSCAR from prev CONTCAR + CHGCAR for non-scf), upload viajcc commonfile create, submit viajcc hpc create, polljcc hpc statusuntil Completed, download result zip viajcc hpc result download, unzip, flattenworkdir/, then move on.Parse band gap (final phase): reads
vasprun.xml, extractseigenvalue_band_properties = (gap, cbm, vbm, direct)from the non-scf line step (preferred) or static step (fallback).
Resume / Incremental Runs
The orchestrator skips a step if its download/CONTCAR (or
download/vasprun.xml for non-scf) already exists. This means:
- A failed run can be re-invoked with the same
--output-dirand completed steps are skipped — no wasted HPC compute. - To force re-run a step, delete its
runs/<N>-<suffix>/directory.
Known Limitations & Fast Paths
Static-only band gap (recommended default for "just give me the gap"):
The non-scf steps (03/04) currently crash on HPCSlurmArm because the
paper-faithful INCAR includes KPOINT_BSE, APACO=16, and LASPH=False
which that VASP build apparently rejects — VASP a
Установить vasp-band-gap в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vasp-band-gap?
Calculate the band gap (and band structure) of a crystalline material from a CIF file using DFT/VASP on the HPCSlurmArm cloud cluster. Implements the MatterGen paper protocol (microsoft/mattergen#213): MP-GGA double relax → static SCF → non-scf uniform → non-scf line, all orchestrated through the jcc CLI. Use this skill whenever the user mentions band gap, band structure, PBE gap, HSE gap, direct/indirect gap, optical absorption edge, VBM/CBM, electron eigenvalues, or asks "is this material a semiconductor / metal / insulator" given a crystal structure. Also triggers for batch band-gap calculations on multiple CIFs, or when the user references the MatterGen band-gap recipe specifically. The skill reads a CIF, writes 5 VASP job directories, submits them in sequence to the cloud, and parses vasprun.xml to report gap_eV + direct/indirect + VBM/CBM.
Как установить скилл vasp-band-gap?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vasp-band-gap запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic