A tool for managing simulation output files
Output files must be stored in a directory named output/
- Can be changed with
--prefix
The simulation script must produce a file named either <fileroot>_info.json or <fileroot>_info.npz
-
<fileroot>can be anything (e.g., a UUID), but acts as a unique identifier for the run -
This file must contain a dictionary under the key
'inputs'with the input parameters from the run -
Example content for a
.jsonfile (the.npzfile should have the same structure):{ "inputs": { "E0": 0.01, "omega": 0.057, "dt": 0.05 } } -
Other associated data (e.g., large sampling arrays) should be stored in separate files using the same root name (e.g.,
<fileroot>_samples.npz)
The tool comes with a set of default accepted input parameters defined in dbtools.inputs.json
- Accepted input parameters can be dynamically appended using a file with the same name in the current working directory (the directory from which you run the dbtools command)
- The input parameters are fully replaced if a file named
dbtools.inputs.replace.jsonis present in the current working directory - If no such files are found locally, the tool will look for
inputs.jsonandinputs.replace.jsonin the configuration directory~/.config/dbtools/using the same logic (replace takes precedence over append).
- Basic command structure (order of single-dash and double-dash flags is interchangeable)
dbtools <command> [--command-options] [-simulation-parameters]
- Input parameters are given by single-dash flags (e.g.,
-omega,-E0,-dt) - Double-dash flags (e.g.,
--prefix,--print-style) are specific to each<command> - The commands have short forms (e.g.,
sforsearch,pdordiffforprint_diff) — rundbtools --helpto see the full list
(update --fast is run automatically unless --no-update):
dbtools search -E0=0.01 -omega=0.057
dbtools search -E0=0.01 -omega=0.057 --print-style=diff
dbtools update
dbtools update --no-prune
(does not catch changes in existing _info.npz files)
dbtools update --fast
dbtools diff <fileroot1> <fileroot2>
dbtools delete <fileroot>