Use when you have a written implementation plan to execute in a separate session with review checkpoints
npx skills add BryceByeongchan/rubato-skills --skill "rubato-bgw-parabands"
Install specific skill from multi-skill repository
# Description
Generate parabands.inp to produce WFN_pb with many empty bands via stochastic pseudobands
# SKILL.md
name: rubato-bgw-parabands
user-invokable: true
description: Generate parabands.inp to produce WFN_pb with many empty bands via stochastic pseudobands
argument-hint: "number_bands:N [parent:cNNN] [calc_id:cNNN] [options...]"
Generate parabands.inp for the parabands.x executable, which produces WFN_pb β a wavefunction file with a large number of empty bands using stochastic pseudobands compression.
Usage
rubato:bgw-parabands number_bands:N [parent:cNNN] [calc_id:cNNN] [options...]
number_bands:Nβ Required. Target total number of bands in the output WFN_pb (e.g., 2000β6000).parent:cNNNβ Parent pw2bgw calculation. Used to locate VSC and VKB files, and to read the number of bands in the input WFN to validate the constraint.calc_id:cNNNβ Saveparabands.inptocalc_db/{calc_id}/input/. If omitted, save to current directory.protected_cond_bands:Nβ Override the number of low-energy conduction bands kept exact (default: 10).accumulation_window:Xβ Override the fractional energy window for stochastic slicing (default: 0.02).num_bands_per_slice:Nβ Override the number of pseudobands per stochastic subspace (default: 2).
Execution
Step 1: (Optional) Read parent information
If parent:cNNN is given, look for:
- The pw2bgw calc directory to find WFN, VSC, VKB file locations.
- Read parent pw.in to get nbnd for validation.
Step 2: Construct parabands.inp
input_wfn_file WFN
output_wfn_file WFN_pb
vsc_file VSC
vkb_file VKB
number_bands {N}
use_pseudobands
protected_cond_bands {protected_cond_bands}
accumulation_window {accumulation_window}
num_bands_per_slice {num_bands_per_slice}
Defaults:
- protected_cond_bands = 10
- accumulation_window = 0.02
- num_bands_per_slice = 2
Step 3: Show and save
- Show the complete
parabands.inpto the user. - Ask for confirmation or modifications.
- Save to
calc_db/{calc_id}/input/parabands.inpifcalc_idis given, or./parabands.inpotherwise.
Validation
number_bandsmust be >nbndof the input WFN (the number of bands from the parent QE nscf). If the parent is known, check this and error if violated.protected_cond_bandsshould cover at least the bands used in sigma'sbegin diagblock. Suggest this to the user.use_pseudobandsis always ON. Never omit it.
Physics Notes
use_pseudobandscompresses high-energy conduction bands stochastically. For example, 4000 explicit bands collapse to a smaller number of effective pseudobands, dramatically reducing memory and I/O.- This is the standard approach for low-dimensional materials (2D materials, surfaces) that require many empty bands for convergence.
number_bandssets the upper limit for epsilon/sigma convergence tests. A typical starting value is 2000β4000 for 2D materials; for bulk semiconductors 500β2000.protected_cond_bandskeeps the lowestNconduction bands as exact KS states. These must cover the bands used inbegin diagof sigma.inp.
Rules
use_pseudobandsis always written. It is the purpose of this executable.number_bandsmust exceed the parent nscfnbndβ parabands.x cannot reduce bands, only add more.- Show the complete parabands.inp before saving. Never write without user confirmation.
- When saving to a calc directory, always use the
input/subdirectory:calc_db/{calc_id}/input/parabands.inp. - If
number_bandsis not specified, ask the user for it. There is no reasonable default.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.