A modern Python interface for VASP (Vienna Ab initio Simulation Package) through ASE (Atomic Simulation Environment).
vasp/
├── vasp/ # Main package
│ ├── __init__.py # Vasp calculator class
│ ├── parameters.py # Parameter presets (VdW, DFT+U, HSE06, etc.)
│ ├── runners/ # Execution backends
│ │ ├── local.py # LocalRunner for direct execution
│ │ ├── interactive.py # InteractiveRunner for persistent VASP
│ │ ├── socket_io.py # Socket server/client (i-PI protocol)
│ │ ├── slurm.py # SLURM cluster runner
│ │ └── kubernetes.py # Kubernetes runner
│ ├── recipes/ # Workflow recipes (quacc-style)
│ │ ├── core.py # static_job, relax_job, double_relax_flow
│ │ ├── slabs.py # Surface calculation recipes
│ │ ├── phonons.py # Phonon calculation recipes
│ │ └── decorators.py # @job, @flow, @subflow decorators
│ ├── database/ # Vector database for embeddings
│ └── tests/ # Test suite
├── docs/ # Jupyter Book documentation
│ └── tutorials/ # 21 progressive tutorial notebooks
└── .claude/ # Claude Code configuration
vasp/__init__.py- MainVaspcalculator classvasp/parameters.py- Preset functions:get_vdw_params(),get_ldau_params(),get_hybrid_params()vasp/runners/- Execution backends:LocalRunner,InteractiveRunner,SocketServer,SlurmRunnervasp/recipes/core.py-static_job,relax_job,double_relax_flowvasp/database/- Vector database with per-atom embeddings
# Run tests
pytest
# Run tests with coverage
pytest --cov=vasp
# Build documentation
jupyter-book build docs
# Lint code
ruff check .xc- Exchange-correlation: 'PBE', 'LDA', 'PW91'encut- Plane-wave cutoff (eV)kpts- K-point mesh: (8, 8, 8) or path for bandsismear- Smearing: -5 (tetrahedron), 0 (Gaussian), 1 (MP)sigma- Smearing width (eV)
ibrion- Optimizer: 1 (quasi-Newton), 2 (CG)isif- What to relax: 2 (ions), 3 (ions+cell)nsw- Max ionic stepsediffg- Force convergence (negative = forces in eV/Å)
ispin- 1 (non-spin), 2 (spin-polarized)magmom- Initial magnetic moments
- Use
get_ldau_params(['Fe', 'O'], {'Fe': HubbardU(u=4.0)})
- Use
get_hybrid_params('hse06')
- Use
get_vdw_params('d3bj')for D3-BJ correction
- Beginner (01-05): Energy, convergence, relaxation, EOS, DOS
- Intermediate (06-10): Bands, magnetism, surfaces, adsorption, reactions
- Advanced (11-20): Phonons, DFT+U, HSE06, vdW, workflows, NEB, vibrations, visualization, pseudopotentials, interactive mode
- Use type hints
- Follow existing patterns in the codebase
- Add tests for new features
- Update documentation for user-facing changes
Tests use MockRunner to run without VASP:
from vasp.runners import MockRunner, MockResults
mock = MockResults(energy=-10.5, forces=np.zeros((2, 3)))
runner = MockRunner(results=mock)
calc = Vasp(atoms=atoms, runner=runner, ...)Install Claude Code skills globally (works from any project):
vasp-claude install # Install skills
vasp-claude status # Check installation
vasp-claude uninstall # Remove skillsUse these slash commands when working in this repository:
| Command | Description |
|---|---|
/docs |
Open documentation |
/examples |
List all examples |
/tutorial <n> |
View tutorial n (1-16) |
/test |
Run test suite |
/new-example |
Create new example |
/architecture |
Review codebase |
/lint |
Run code quality checks |
/build-docs |
Build Jupyter Book |
/status |
Project status |
| Command | Description |
|---|---|
/watch-job <dir> |
Monitor VASP job status |
/fix-job <dir> |
Diagnose and fix failed job |
/vasp-help <topic> |
Parameter reference |
These work from any project:
| Command | Description |
|---|---|
/vasp-help <topic> |
VASP parameter help |
/vasp-watch-job <dir> |
Monitor running job |
/vasp-fix-job <dir> |
Auto-fix failed job |
/vasp-examples |
List tutorials |
/vasp-tutorial <n> |
View tutorial |
Claude automatically uses these skills:
- vasp - General VASP calculation help
- job-watcher - Job monitoring and troubleshooting
- troubleshoot - Error diagnosis and fixes