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-gw-conv-sigma"
Install specific skill from multi-skill repository
# Description
Set up a sigma-only convergence sweep (reusing a fixed epsmat) for screened_coulomb_cutoff or number_bands
# SKILL.md
name: rubato-bgw-gw-conv-sigma
user-invokable: true
description: Set up a sigma-only convergence sweep (reusing a fixed epsmat) for screened_coulomb_cutoff or number_bands
argument-hint: "sweep:param values:v1,v2,v3 parent_epsilon:cNNN [calc_id:cNNN] vbm:ik=N,n=M cbm:ik=N,n=M [options...]"
Set up a convergence sweep that runs sigma.x multiple times, each with a different value of one parameter, while reusing a single pre-computed epsmat from a parent epsilon calculation.
This is Step 2 or Step 3 in the recommended GW convergence workflow.
Usage
rubato:bgw-gw-conv-sigma sweep:param values:v1,v2,v3 parent_epsilon:cNNN [calc_id:cNNN] vbm:ik=N,n=M cbm:ik=N,n=M [options...]
sweep:paramβ Required. Parameter to sweep:screened_coulomb_cutoffornumber_bands.values:v1,v2,...β Required. Comma-separated list of values to sweep (e.g.,values:15,20,25,30for cutoff in Ry, orvalues:1000,1500,2000,2500for bands).parent_epsilon:cNNNβ Required. Parent epsilon calculation that produced the large epsmat.calc_id:cNNNβ Optional base calc to anchor the sweep.vbm:ik=N,n=Mβ VBM k-point index and band index for the kpoints/diag blocks.cbm:ik=N,n=Mβ CBM k-point index and band index for the kpoints/diag blocks.bare_coulomb_cutoff:Ryβ Override bare_coulomb_cutoff (default: = screened_coulomb_cutoff).frequency_dependence:Nβ 1 = GPP (default), 2 = full-frequency.
Execution
Step 1: Gather required information
- Read
parent_epsiloncalc to extract: epsilon_cutoff(for constraint validation).number_bands(for constraint validation of sigma'snumber_bands).-
K-points list (to determine VBM/CBM k-points in fractional coordinates).
-
If
vbmandcbmare not specified, ask the user for:"Please specify VBM and CBM k-point and band indices:
vbm:ik=N,n=M cbm:ik=N,n=M"
"Whereikis the k-point index from the nscf k-list, andnis the band index." -
Determine fixed parameters:
- If sweeping
screened_coulomb_cutoff: fixnumber_bands(ask user, or use epsilon'snumber_bands). - If sweeping
number_bands: fixscreened_coulomb_cutoff(ask user for a converged value, or use epsilon_cutoff as upper bound).
Step 2: Create sweep subdirectory structure
For each sweep value v, create:
conv_sigma_{param}/
val_{v}/
sigma.inp
Inside each sigma.inp, set:
- The swept parameter to value v.
- The fixed parameters.
- begin kpoints block: only VBM + CBM k-points (fast convergence runs).
- begin diag block: only VBM + CBM band indices.
Template for each sigma.inp:
screened_coulomb_cutoff {screened_coulomb_cutoff}
bare_coulomb_cutoff {bare_coulomb_cutoff}
number_bands {number_bands}
frequency_dependence {frequency_dependence}
begin kpoints
{vbm_kpt}
{cbm_kpt}
end
begin diag
{vbm_n}
{cbm_n}
end
Step 3: Report
After creating all directories and input files, report:
Created convergence sweep: sweep={param}
conv_sigma_{param}/val_{v1}/sigma.inp
conv_sigma_{param}/val_{v2}/sigma.inp
...
Fixed parameters:
{other_param} = {value}
parent epsmat: calc_db/{epsilon_dir}/
To run:
cd conv_sigma_{param}/val_{v1} && sigma.x < sigma.inp > sigma.out
cd conv_sigma_{param}/val_{v2} && sigma.x < sigma.inp > sigma.out
...
After runs complete, analyze with:
/rubato-bgw-gw-conv-analyze calcs:conv_sigma_{param}/val_{v1},conv_sigma_{param}/val_{v2},... vbm:ik={ik},n={n} cbm:ik={ik},n={n} sweep:{param}
Validation
- All
screened_coulomb_cutoffvalues must be β€ parentepsilon_cutoff. Warn and skip any values that violate this. - All
number_bandsvalues must be β€ parent epsilonnumber_bands. Warn and skip any values that violate this. - At least 2 sweep values are required for a meaningful convergence test.
Rules
- Sweep only one parameter at a time. Do not mix cutoff and band sweeps in one call.
- Use VBM + CBM k-points only in the kpoints block for convergence runs (much faster than full k-grid).
- The epsmat is shared β sigma.inp files must point to the same epsmat location.
- Never sweep parameters that violate constraints. Check and warn before creating files.
- Report the exact run commands and the analyze command after creating the structure.
- If
vbm/cbmare not given, ask before creating any files.
# 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.