Skip to content

stb-ani2traj

AIMD Trajectory Converter · menu code 3.5 · guide: 3.5 AIMD Trajectory Converter

usage: stb-ani2traj [-h] [-l LABEL] [-of {pdb,xsf,xyz}] [-o OUTPUT] [--skip SKIP]
                    [--stride STRIDE] [--unwrap] [--fdf FDF] [--log LOG] [--dry-run]
                    [--no-intro] [-v]

Convert a SIESTA AIMD trajectory (<label>.ANI) into a multi-frame trajectory that also carries
the lattice -- for OVITO, VMD, XCrySDen. .ANI is a bare multi-frame XYZ with no cell; the cell
is read per frame from the SIESTA log (correct for variable-cell/NPT runs), else a single one
from <label>.XV or the input .fdf. The report says what the run was (ensemble, time step, how
long), which MD step each frame is, how the cell, temperature and energy behaved (<label>.MDE),
how the atoms moved (largest step, boundary crossings, closest approach), and reads the written
trajectory back.

options:
  -h, --help            show this help message and exit
  -l LABEL, --label LABEL
                        SystemLabel of the run; may include a folder (run/si). Default: the only *.ANI here.
  -of {pdb,xsf,xyz}, --out-format {pdb,xsf,xyz}
                        Output trajectory format (default: xsf):
                          xsf - multi-frame AXSF, read natively by OVITO, VMD's xsf plugin and XCrySDen.
                          pdb - multi-model PDB (CRYST1), VMD's own default format, also read by OVITO (3 decimals).
                          xyz - extended XYZ (Lattice tag), OVITO-native; VMD's xyz reader ignores
                                the Lattice tag (positions show, but without periodic boundaries).
                                The only format that also carries per-frame E_KS/Temp_ion/E_tot/P/V/Time.
  -o OUTPUT, --output OUTPUT
                        Output filename. Default: <label>_traj.<ext>, next to the .ANI.
  --skip SKIP           Drop the first N frames (equilibration) before --stride (default: 0).
  --stride STRIDE       Keep only every Nth frame (default: 1, every frame).
  --unwrap              Remove periodic-boundary 'jumps': each frame's positions are corrected by the minimum-image
                        displacement relative to the previous frame, so atoms that cross the box edge move continuously
                        instead of teleporting. Off by default (positions as SIESTA wrote them).
  --fdf FDF             Input .fdf of the run (MD settings, fallback cell). Default: <label>.fdf, else the
                        only .fdf here whose SystemLabel is <label>.
  --log LOG             SIESTA output log. Default: <label>.out, else the only *.out next to the .ANI.
  --dry-run             Report only; write no trajectory.
  --no-intro            Do not show the introduction
  -v, --version         show program's version number and exit

Example usage:
  stb-ani2traj -l water                        # water.ANI -> water_traj.xsf
  stb-ani2traj -l si -of xyz --unwrap          # extended XYZ with E_KS, T, E_tot, P, V, time
  stb-ani2traj -l run/si -of pdb --skip 100 --stride 5
  stb-ani2traj --dry-run                       # the only *.ANI here; report only