Skip to content

stb-neb

Stage 1 - Prep of the 5.9 NEB / Reaction Path workflow · menu code 5.9.1

usage: stb-neb [-h] -i INITIAL -f FINAL -c CALC [-p PSEUDO_DIR] [--force-spin]
               [--no-force-spin] [--force-vdw] [--no-force-vdw] [--force-dipole]
               [--no-force-dipole] [--fix-atoms LIST] [-n N_IMAGES]
               [--autosort-tol AUTOSORT_TOL] [--idpp] [--idpp-fmax IDPP_FMAX]
               [--idpp-steps IDPP_STEPS] [--mode {1,2,3}]
               [--ml-model {small,medium,large}] [--ml-device {cpu,cuda}]
               [--ml-fmax ML_FMAX] [--ml-k ML_K] [--ml-max-steps ML_MAX_STEPS]
               [--ml-freeze-substrate] [--no-ml-freeze-substrate]
               [--ml-freeze-threshold ML_FREEZE_THRESHOLD] [--ml-prerelax-endpoints]
               [-O OUTPUT_DIR] [--max-cycles MAX_CYCLES] [--siesta-exe SIESTA_EXE]
               [--mpirun-np N] [--conda-env CONDA_ENV] [--cycle-fmax CYCLE_FMAX] [-v]
               [--no-intro]

Prepares SIESTA folders for a NEB (Nudged Elastic Band) reaction-path study: interpolates images between two already-relaxed endpoint structures, optionally refining the path with MACE-MP-0 before writing single-point SIESTA folders per image.

options:
  -h, --help            show this help message and exit
  -i INITIAL, --initial INITIAL
                        Initial (already-relaxed) endpoint: a structure.fdf file, or a directory containing one -- a directory's own finished siesta.XV, if present, is preferred over its structure.fdf guess.
  -f FINAL, --final FINAL
                        Final (already-relaxed) endpoint -- same file-or-directory convention as --initial, same composition.
  -c CALC, --calc CALC  calc.fdf template (kgrid, basis, XC, %include structure.fdf, etc.) -- copied into every image_NN/ folder with MD.TypeOfRun/MD.Steps forced to a single-point evaluation.
  -p PSEUDO_DIR, --pseudo-dir PSEUDO_DIR
                        Pseudopotentials source (optional): a bundled bank or a folder path.
  --force-spin          Force Spin polarized (via config_extra.fdf, overriding --calc's own Spin tag if any) in every image_NN/ (default: ON) -- a reacting atom commonly leaves the system with a net magnetic moment, which a spin-restricted calculation cannot represent at all; costs nothing for a genuinely closed-shell path (converges to zero moment).
  --no-force-spin       Leave --calc's own Spin tag untouched in every image_NN/.
  --force-vdw           Force the Grimme DFT-D3 dispersion (van der Waals) correction (default: ON) in every image_NN/'s config_extra.fdf.
  --no-force-vdw        Leave --calc's own dispersion settings untouched.
  --force-dipole        Force the slab dipole correction (default: ON) in every image_NN/'s config_extra.fdf -- only meaningful for a genuinely one-sided slab/surface reaction path; harmless (evaluates near zero) otherwise.
  --no-force-dipole     Leave --calc's own dipole settings untouched.
  --fix-atoms LIST      Atoms held fixed along the whole band, 1-based (e.g. '1-32' or '1-16,33'), or 'none'. Default: the Geometry.Constraints the endpoints were relaxed with (config_extra.fdf/calc.fdf next to --initial/--final -- stb-adsorb --fix-layers writes it there), else the --calc template's own block. Written into every image's config_extra.fdf; stb-nebCycle then keeps them fixed (FixAtoms) and reads the constrained forces (<label>.FAC), and the MACE stages (--mode 1/2, --ml-prerelax-endpoints) and --idpp keep them fixed too.
  -n N_IMAGES, --n-images N_IMAGES
                        Total images along the band, endpoints included (default: 7).
  --autosort-tol AUTOSORT_TOL
                        Atom-correspondence tolerance (Ang) for linear interpolation (default: 0.5, pymatgen's own suggested value for two endpoints that may have a different atom order). Pass 0 to skip distance -based matching entirely and use --initial/--final's atom order directly -- the right choice (and more robust for a small/densely-packed cell) when both endpoints already share a guaranteed matching order (e.g. a neb_manifest.json-proven pair). If matching fails at this tolerance, stb-neb automatically retries once with --autosort-tol 0 (a [WARNING], not an [ERROR]) before giving up -- this is usually already the right correspondence, so most runs never need this flag set explicitly at all.
  --idpp                Refine the interior images with ASE's IDPP method after linear interpolation -- a better initial guess than plain linear, no MACE needed.
  --idpp-fmax IDPP_FMAX
                        IDPP force convergence (default: 0.1, ASE's own). Loose for a molecular adsorbate: on H2O/Ag(111) it stopped after 7 steps with H-O-H at 169 deg in the middle image (DFT: +1.3 eV, 1.37 eV/Ang there); --idpp-fmax 0.01 --idpp-steps 2000 gave 112.7 deg. The report warns when an bond or angle inside a molecule leaves the endpoints' range.
  --idpp-steps IDPP_STEPS
                        IDPP maximum steps (default: 100). See --idpp-fmax.
  --mode {1,2,3}        How to build the path and what to write (default: 2). A pure MACE-MP-0 path with no SIESTA at all lives exclusively in stb-mlneb (ML Simulations menu), not as a mode here:
                          1 = 100% MACE-MP-0, then ONE single-point SIESTA per image -> image_NN/ (this is the old --ml-neb behavior).
                          2 = MACE-MP-0 shapes the path, then a FEW real-DFT NEB refinement cycles (via the separate stb-nebCycle CLI tool, run in your own submission-script loop) -> cycle_00/image_NN/ + a printed loop snippet.
                          3 = 100% real-DFT NEB from a plain interpolated path, no MACE at all -> cycle_00/image_NN/ + a printed loop snippet (same stb-nebCycle tool as mode 2, more cycles expected).
  --ml-model {small,medium,large}
  --ml-device {cpu,cuda}
  --ml-fmax ML_FMAX
  --ml-k ML_K           NEB spring constant, eV/Ang^2 (default: 0.1, ASE's own default).
  --ml-max-steps ML_MAX_STEPS
  --ml-freeze-substrate
                        With --mode 1/2: freeze atoms whose position barely differs between --initial and --final (default: ON) -- fewer degrees of freedom for the MACE optimizer and avoids spurious drift of atoms that are spectators to the reaction. See --ml-freeze-threshold.
  --no-ml-freeze-substrate
                        Let every atom relax during the MACE path-shaping stage (modes 1/2), even ones that don't move between --initial and --final.
  --ml-freeze-threshold ML_FREEZE_THRESHOLD
                        Displacement threshold in Ang (default: 0.3) below which an atom is considered a spectator and frozen by --ml-freeze-substrate.
  --ml-prerelax-endpoints
                        Relax both endpoints' positions (cell fixed) with MACE-MP-0 before interpolating -- independent of --mode (a cheap safety net when you're not fully certain the endpoints are already relaxed). Needs the optional 'ml' extra.
  -O OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Root directory (default: current directory) for every image_NN/.
  --max-cycles MAX_CYCLES
                        Cluster-submission snippet only (--mode 2/3): max number of stb-nebCycle refinement cycles the printed loop will attempt before giving up (default: 30). Has no effect on this run itself.
  --siesta-exe SIESTA_EXE
                        Cluster-submission snippet only (--mode 2/3): SIESTA executable name or path for the printed loop to call (default: 'siesta', assumed already on PATH).
  --mpirun-np N         Cluster-submission snippet only (--mode 2/3): prefix the SIESTA call in the printed loop with 'mpirun -np N'. Omit for no mpirun (default).
  --conda-env CONDA_ENV
                        Cluster-submission snippet only (--mode 2/3): conda environment name to activate at the top of the printed loop. Omit to print a generic placeholder reminder instead (default).
  --cycle-fmax CYCLE_FMAX
                        Cluster-submission snippet only (--mode 2/3): the looped stb-nebCycle call's own --fmax (real-DFT NEB force-convergence threshold, eV/Ang, default: 0.05) -- distinct from this tool's own --ml-fmax (the MACE-MP-0 path-shaping target).
  -v, --version         show program's version number and exit
  --no-intro            Do not show the introduction

Usage examples:
  stb-neb -i initial.fdf -f final.fdf -c calc.fdf -n 7
  stb-neb -i initial.fdf -f final.fdf -c calc.fdf --idpp
  stb-neb -i initial.fdf -f final.fdf -c calc.fdf --mode 1 --idpp --ml-k 0.2
  stb-neb -i initial.fdf -f final.fdf -c calc.fdf --mode 3