stb-convergence¶
Stage 1 - Prep of the 5.5 Convergence Tests workflow · menu code 5.5.1
usage: stb-convergence [-h] [-s STRUCTURE] [-c CALC] [-p PSEUDO_DIR] --parameter
PARAMETER [PARAMETER ...] [--basis-stage {mesh,range,size}]
[--basis-values V [V ...]] [--basis-sizes SIZE LARGER]
[--mesh-cutoff RY] [--energyshift RY]
[--scan-points SCAN_POINTS] [--scan-range PCT]
[--meshcutoff-range MIN MAX STEP]
[--energyshift-range MIN MAX STEP]
[--energyshift-values RY [RY ...]] [--single-point]
[--kgrid-range MIN MAX STEP] [--relax-steps RELAX_STEPS]
[--max-stress-tol MAX_STRESS_TOL]
[--max-force-tol MAX_FORCE_TOL] [--vacuum-gap VACUUM_GAP]
[-o OUTPUT_DIR] [-v] [--no-intro]
Stage 1 of 2: writes one ready-to-run SIESTA folder per swept value of one or more convergence-test parameters, one subfolder per parameter, fully relaxing the structure (positions + cell) at each. Doesn't run SIESTA -- run each folder yourself, then use stb-convergenceAnalysis.
options:
-h, --help show this help message and exit
-s STRUCTURE, --structure STRUCTURE
Input structure.fdf, copied as 'structure.fdf' into every generated folder (default: structure.fdf).
-c CALC, --calc CALC calc.fdf template (default: calc.fdf) -- SCF/basis/MD settings, normally %including the structure file above by name. Copied into every generated folder with one line added: '%include config_extra.fdf', prepended at the very top (see [3] of the report) -- this forces full relaxation and the swept parameter's value, regardless of what this template itself contains.
-p PSEUDO_DIR, --pseudo-dir PSEUDO_DIR
Pseudopotentials source (optional): a bundled bank (dojo[-sr|-fr|-sr3plus][-pbe|-pbesol|-pw][-standard|-stringent], virtual_vault) or a folder path. If given, the required pseudopotential for every species in the structure is copied into every generated folder, so it's immediately ready for SIESTA.
--parameter PARAMETER [PARAMETER ...]
Which tag(s) to sweep: meshcutoff, energyshift, kgrid, or 'all' for all three (one independent sweep per parameter, each in its own subfolder). Or 'basis' (alone): the basis-set convergence by equations of state, see --basis-stage.
--basis-stage {mesh,range,size}
--parameter basis: which stage to write (default: mesh). Each stage is a set of
E(V) scans of single points, judged by the equilibrium volume (2D: area):
mesh : Mesh.Cutoff 350, 500, 700, 1000 Ry at PAO.EnergyShift 0.002 Ry
range: PAO.EnergyShift 0.02 ... 0.0005 Ry at --mesh-cutoff
size : the template's PAO.BasisSize and one step up (DZP -> TZP) at
--mesh-cutoff and --energyshift
Run them in this order, each with the value the previous one found.
--basis-values V [V ...]
--parameter basis: the Mesh.Cutoff values (stage mesh) or PAO.EnergyShift values (stage range) to scan instead of the defaults.
--basis-sizes SIZE LARGER
--parameter basis --basis-stage size: the two PAO.BasisSize to compare (default: the template's and the next one on SZ < DZ < DZP < TZP < TZ2P).
--mesh-cutoff RY --parameter basis, stages range and size: Mesh.Cutoff of every scan (default: the template's).
--energyshift RY --parameter basis: PAO.EnergyShift held fixed in stage mesh (default 0.002) and stage size (default: the template's).
--scan-points SCAN_POINTS
--parameter basis: single points per E(V) scan (default: 9, at least 5).
--scan-range PCT --parameter basis: half-width of each scan in % of the volume (default 12), of the area for a 2D material (default 8) or of the length for a wire (default 4).
--meshcutoff-range MIN MAX STEP
Custom Mesh.CutOff sweep range (Ry). Omit to use the suggested default (see [2] of the report). Only meaningful if 'meshcutoff' is in --parameter.
--energyshift-range MIN MAX STEP
Custom PAO.EnergyShift sweep range (Ry) (see --meshcutoff-range). Only meaningful if 'energyshift' is in --parameter.
--energyshift-values RY [RY ...]
Explicit PAO.EnergyShift values (Ry) instead of a linear range. Default when neither this nor --energyshift-range is given: the geometric set 0.02 0.01 0.005 0.002 0.001 0.0005 (the parameter acts logarithmically; versions up to 2.0.0 used 0.001 to 0.05 in steps of 0.01, which has no point between 0.001 and 0.011).
--single-point Do not relax: every folder is a single point at the input geometry (MD.Steps 0, fixed cell), so only the swept parameter changes. Default: full relaxation (positions + cell), which mixes the parameter's effect with the relaxation's noise but gives the relaxed volume to judge convergence by.
--kgrid-range MIN MAX STEP
Custom k-grid density sweep range (1/Ang) (see --meshcutoff-range). Only meaningful if 'kgrid' is in --parameter.
--relax-steps RELAX_STEPS
Number of relaxation steps (MD.Steps) forced in every generated folder (default: 100). Both atomic positions and the cell relax (MD.VariableCell true).
--max-stress-tol MAX_STRESS_TOL
Relaxation mode: MD.MaxStressTol forced in every folder, in GPa (default: 0.02). SIESTA's own default, 1 GPa, is ~1 % of the volume of Si (B0 ~ 88 GPa) -- twice the 0.5 % the analysis judges by -- and stopped most relaxations at the input cell.
--max-force-tol MAX_FORCE_TOL
Relaxation mode: MD.MaxForceTol forced in every folder, in eV/Ang (default: 0.01).
--vacuum-gap VACUUM_GAP
--parameter kgrid only: vacuum-axis detection threshold in Angstrom, same meaning as stb-kgrid's --vacuum-gap (default: 10.0).
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
Top-level directory (default: convergence_runs). Run folders go into its own '<output-dir>/<parameter>/convergence_<parameter>_<value>/' subfolder, one tree per swept parameter.
-v, --version show program's version number and exit
--no-intro Do not show the introduction
Usage examples:
stb-convergence -s structure.fdf -c calc.fdf -p dojo --parameter all
stb-convergence -s structure.fdf -c calc.fdf -p dojo --parameter all --meshcutoff-range 150 350 50
stb-convergence -s structure.fdf -c calc.fdf -p dojo --parameter kgrid --relax-steps 200