forked from ALF-QMC/ALF
-
Notifications
You must be signed in to change notification settings - Fork 0
Bin Conversion
Johannes Hofmann edited this page Apr 18, 2026
·
2 revisions
Converting plain-text simulation output to HDF5 format.
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.
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 metadata - Converts all
*_scal,*_eq, and*_taubin files into a singledata.h5 - Moves old plain-text bin files to an
old_bins/subdirectory
$ALF_DIR/Analysis/convert_bins.py --remove-old-bins # delete old bins instead of moving themTo 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 \;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.
- 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.