Skip to content

stb-archive

Archive Packager · menu code 3.7 · guide: 3.7 Archive Packager

usage: stb-archive [-h] [--path PATH] [--mode {results,inputs,full}]
                   [--include EXT [EXT ...]] [--exclude EXT [EXT ...]] [--recursive]
                   [-l LABEL] [-o OUTPUT] [--force] [--dry-run] [--no-intro] [-v]

Package a SIESTA calculation folder into a verified .tar.gz for sharing or for the record -- the
complement of stb-clean (3.2). Every file is sorted by kind; what the input needs to run again
(.fdf files, every file they read, pseudopotentials, the job script) always goes in. The archive
holds MANIFEST.txt (the run, from stb-status, and every file with its SHA-256) and SHA256SUMS
(sha256sum -c), and is read back and checked. An existing archive is never overwritten.

Modes:
  results  inputs + logs + geometry/trajectory + small electronic outputs (bands, DOS, PDOS, eigenvalues) + post-processing; no grids, restart files, basis tables or H/S/wavefunction binaries
  inputs   only what the run needs to be repeated: .fdf files, every file they read, pseudopotentials, job scripts
  full     every file (except hidden files and earlier archives)

options:
  -h, --help            show this help message and exit
  --path PATH           Directory to archive, or a glob pattern (e.g. 'strain_*') matching several directories,
                        one archive each (default: current directory).
  --mode {results,inputs,full}
                        What goes in (default: results).
  --include EXT [EXT ...]
                        Also include files ending with these (e.g. .RHO .HSX), whatever the mode.
  --exclude EXT [EXT ...]
                        Leave out files ending with these (inputs always go in).
  --recursive           Also the files of subfolders (hidden ones skipped), in the same archive.
  -l LABEL, --label LABEL
                        SystemLabel override for the run summary (auto-detected from the .fdf).
  -o OUTPUT, --output OUTPUT
                        Archive filename. Default: <folder>_archive.tar.gz next to the folder (_1, _2, ... if it
                        exists). Not with a glob.
  --force               Overwrite an existing archive of the same name.
  --dry-run             Report what would go in; write nothing.
  --no-intro            Do not show the introduction
  -v, --version         show program's version number and exit

Example usage:
  stb-archive --path si_relax --dry-run       # what would go in, and why
  stb-archive --path si_relax                 # results mode -> si_relax_archive.tar.gz
  stb-archive --path si_relax --include .RHO  # also the density
  stb-archive --path si_relax --mode inputs   # only what reruns it
  stb-archive --path 'strain/a_*'             # one archive per folder