vasp-thermodynamic-stability
БесплатноЗапускает вложенные скриптыНе проверенVASP thermodynamic stability analysis workflow for crystalline materials. Automates the full pipeline: query Materials Project for competing phases, generate…
от pdl-openair★ 16 звёзд на GitHubОб этом скилле
VASP Thermodynamic Stability Analysis
Complete workflow for verifying whether a compound is thermodynamically stable by constructing a convex hull phase diagram from DFT calculations.
Overview
Given a target compound (e.g., AlInSe3), this workflow:
- Queries Materials Project for all competing phases in the chemical system
- Generates VASP input files with unified calculation parameters
- Runs relaxation and static calculations on HPC
- Extracts total energies and builds a phase diagram
- Reports ehull (energy above hull) and formation energy
Acceptance criteria: ehull <= 0.05 eV/atom AND formation energy <= 0 eV/atom
When to Use
- Assessing thermodynamic stability of a new or hypothetical compound
- Verifying DFT-predicted stability against the convex hull
- Setting up batch VASP calculations for competing phases
- Any task involving pymatgen PhaseDiagram for stability analysis
Quick Start
# Step 0: Copy helper scripts from skill into workdir (only needed once per project)
SKILL_SCRIPTS=<path-to-skill>/scripts
cp "$SKILL_SCRIPTS/"{generate_all_potcar.sh,submit_all.sh,run_hpc.sh,hpc_results.py} ./
# Step 1: Query MP and generate all VASP inputs
python <path-to-skill>/scripts/setup_competing_phases.py \
--formula AlInSe3 \
--target-poscar /path/to/POSCAR \
--workdir competing_phases
cd competing_phases
cp ../*.sh ../hpc_results.py ./ # bring helper scripts into the workdir
# Step 2: Generate POTCAR files (requires VASP_PSP_DIR env var)
export VASP_PSP_DIR=/path/to/vasp/pseudopotentials
./generate_all_potcar.sh
# Step 3: Submit relaxations (requires jcc CLI + JCC_USERNAME/JCC_PASSWORD env vars)
# submit_all.sh auto-passes --task-name <Formula>_<Nat>at_relax
./submit_all.sh relax
# To manually submit one phase with multi-core parallelism:
# Small/medium cells (≤30 atoms): --nodes 2 --ntasks 8 (matches KPAR=2 NCORE=4)
# Large cells (≥60 atoms): --nodes 1 --ntasks 4 (avoid GLEX OOM)
# ./run_hpc.sh --local-path Se_64at/relax --output-dir results/Se_64at_relax \
# --task-name Se_64at_relax --nodes 1 --ntasks 4
# Step 4: After relaxations complete
./submit_all.sh collect # CONTCAR -> static/POSCAR
./submit_all.sh static # Submit static calculations
./submit_all.sh energies # Extract energies to energies.json
# Step 5: Analyze stability
python <path-to-skill>/scripts/analyze_stability.py --workdir .
Workflow Details
Phase 1: Query Competing Phases
The script setup_competing_phases.py queries Materials Project API for:
- All stable phases on the convex hull (ehull = 0)
- Near-stable phases with ehull <= cutoff (default 0.05 eV/atom)
- Automatically removes duplicate formulas (keeps lowest ehull)
Output: submission_info.json manifest with all phase metadata.
Dependencies: mp-api, pymatgen, MP API key (MP_API_KEY env var)
Phase 2: VASP Input Generation
Each competing phase gets a directory structure:
<Formula>_<Nat>at/
├── relax/ # Structure relaxation (ISIF=3, NSW=100)
│ ├── POSCAR # From MP or user-provided
│ ├── INCAR # Unified parameters
│ └── KPOINTS # Automatic density (KPPA=3000)
└── static/ # Static calculation (NSW=0, ISMEAR=-5)
├── POSCAR # Placeholder (replaced by CONTCAR after relax)
├── INCAR # Unified parameters
└── KPOINTS # Higher density (KPPA=5000)
Unified VASP parameters (reasoning below):
| Parameter | Relax | Static | Reason |
|---|---|---|---|
| ENCUT | 450 | 450 | High enough for all elements; ensures energy consistency |
| PREC | Accurate | Accurate | Required for reliable forces and stresses |
| EDIFF | 1E-6 | 1E-7 | Tighter for static to ensure converged energy |
| ISMEAR | 0 (Gaussian) | -5 (tetra) | Tetrahedron for accurate static energy |
| SIGMA | 0.05 | 0.05 | Small width for insulators/semiconductors |
| LREAL | A | A | Projector-augmented for memory efficiency |
| IVDW | 12 | 12 | DFT-D3-BJ dispersion correction |
| NCORE | 4 | 4 | Bands-per-group; pick so NCORE × KPAR ≈ --ntasks |
| KPAR | 2 (1 for >=28at) | 2 (1 for >=28at) | K-point parallelism; reduce for large systems or OOM |
KPOINTS: Generated via pymatgen Kpoints.automatic_density():
- Relaxation: KPPA = 3000 (k-points per reciprocal atom)
- Static: KPPA = 5000 (denser for accurate energy)
Phase 3: HPC Submission
Uses the jcc CLI tool to submit to a remote HPC Slurm cluster. The jcc binary
is not bundled with this skill — users must install it separately and ensure
it is on PATH. Credentials and cluster settings are read from environment
variables (no hardcoded values):
| Env var | Purpose | Required |
|---|---|---|
JCC_BASE_URL |
jcc service URL | yes |
JCC_USERNAME |
account username | yes |
JCC_PASSWORD |
account password | yes |
JCC_CLUSTER_NAME |
target cluster (default HPCSlurmArm) |
no |
JCC_APP_TYPE |
app type (default vasp) |
no |
JCC_NODES |
defau |
Установить vasp-thermodynamic-stability в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vasp-thermodynamic-stability?
VASP thermodynamic stability analysis workflow for crystalline materials. Automates the full pipeline: query Materials Project for competing phases, generate unified VASP inputs (POSCAR/INCAR/KPOINTS/POTCAR), submit HPC calculations (relaxation + static), extract energies, and build convex hull phase diagram to calculate energy above hull (ehull) and formation energy. Use this skill when the user mentions thermodynamic stability, convex hull, ehull, formation energy, competing phases, phase diagram, stability verification, or wants to assess whether a compound is thermodynamically stable using DFT/VASP calculations. Also triggers for queries about Materials Project phase analysis, pymatgen PhaseDiagram usage in stability context, or batch VASP calculation setup for multiple competing phases.
Как установить скилл vasp-thermodynamic-stability?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vasp-thermodynamic-stability запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic