Skip to content

stb-clean

Clean File Tools · menu code 3.2 · guide: 3.2 Clean File Tools

usage: stb-clean [-h] [--path PATH] [--keep KEEP [KEEP ...]] [--recursive] [--dry-run]
                 [--no-archive] [--no-confirm] [-v] [--no-intro]

Clean a SIESTA calc folder to restart a fresh run: removes every file except the
extensions in --keep (pseudopotentials, .fdf input, submission script by default) --
outputs/results too (.out, .XV, .DM, .bands, ...): it prepares a re-run, it does not
archive results (that is stb-archive). Never removed: hidden files, earlier stb-clean
backups, STB reports (stb_*_report*.txt) and every file a kept .fdf reads (%include,
'< file'). Every removed file is archived (tar.gz, next to the folder) and the archive
is checked before anything is deleted, unless --no-archive. The report says what the
previous run was, what stays and why, what goes by kind, and what the next run will
start from (.DM/.XV/.CG vs the fdf UseSave flags).

options:
  -h, --help            show this help message and exit
  --path PATH           Directory to clean, or a glob pattern (e.g. 'strain_*')
                        matching several directories to clean one after another
                        (default: current directory).
  --keep KEEP [KEEP ...]
                        Extensions to keep, i.e. NOT delete (default: .psml .psf .fdf
                        .sh -- pseudopotentials, the SIESTA input, and the submission
                        script). Everything else, including prior run outputs, is
                        removed. Add .DM .XV to continue from the previous run.
  --recursive           Also clean subdirectories (skips hidden ones, e.g. .git), not
                        just the top level of --path.
  --dry-run             Report what would be kept and removed, and touch nothing (no
                        archive either).
  --no-archive          Skip archiving removed files before deleting them. Archiving
                        (tar.gz, next to --path, read back before anything is deleted)
                        is the default safety net -- turn it off only if you're sure.
  --no-confirm, -n      Don't ask for confirmation before deleting.
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction