Converting plain-text simulation output to HDF5 format.
Why Convert?¶
If you ran a simulation without HDF5 and want to switch to the HDF5 analysis pipeline (or simply consolidate output), you can convert existing plain-text bins to data.h5.
convert_bins.py¶
The main conversion tool. Requires Python 3 with h5py and f90nml.
# In the simulation directory (where bin files and 'parameters' live):
$ALF_DIR/Analysis/convert_bins.pyThis:
Reads the
parametersfile to extract simulation metadataConverts all
*_scal,*_eq, and*_taubin files into a singledata.h5Moves old plain-text bin files to an
old_bins/subdirectory
Options¶
$ALF_DIR/Analysis/convert_bins.py --remove-old-bins # delete old bins instead of moving themBatch Conversion¶
To convert all simulation directories in a tree at once:
$ALF_DIR/Analysis/convert_batch.shThis finds all directories containing Ener_scal (indicating a completed run) and runs convert_bins.py in each.
Alternatively:
find . -name "Ener_scal" -execdir $ALF_DIR/Analysis/convert_bins.py \;Individual Converters¶
For finer control, the individual Fortran converters can be called:
| Program | Converts |
|---|---|
convert_scal.out | *_scal files |
convert_latt.out | *_eq and *_tau files (lattice observables) |
convert_local.out | Local observables |
These are called internally by convert_bins.py and rarely need to be used directly.
Notes¶
The
parametersfile must be present in the same directory as the bin files.For Hubbard model runs with
Mz=.true., the converter applies a special fix (halvingN_SUNand settingN_FL=2) to match the internal data layout.