Command line tools#

A number of executable python scripts in the folder py_alf/cli. For productive work, it may be suitable to add this folder to the $PATH environment variable. \(\phantom{\xi}\)

minimal_ALF_run#

Extensively commented example script showing the minimal steps for creating and running an ALF simulation in pyALF.

alf_run#

Helper script for compiling and running ALF.

usage: alf_run [-h] [--alfdir ALFDIR] [--sims_file SIMS_FILE]
               [--branch BRANCH] [--machine MACHINE] [--mpi] [--n_mpi N_MPI]
               [--mpiexec MPIEXEC] [--mpiexec_args MPIEXEC_ARGS]
               [--do_analysis]

Named Arguments#

--alfdir

Path to ALF directory. (default: os.getenv(‘ALF_DIR’, ‘./ALF’)

--sims_file

File defining simulations parameters. Each line starts with the Hamiltonian name and a comma, after wich follows a dict in JSON format for the parameters. A line that says stop can be used to interrupt. (default: ‘./Sims’)

--branch

Git branch to checkout.

--machine

Machine configuration (default: ‘GNU’)

--mpi

mpi run

--n_mpi

number of mpi processes (default: 4)

--mpiexec

Command used for starting a MPI run (default: ‘mpiexec’)

--mpiexec_args

Additional arguments to MPI executable.

--do_analysis, --ana

Run default analysis after each simulation.

alf_postprocess#

Script for postprocessing Monte Carlo bins.

usage: alf_postprocess [-h] [--check_warmup] [--check_rebin]
                       [-l CHECK_LIST [CHECK_LIST ...]] [--do_analysis]
                       [--always] [--gather] [--no_tau]
                       [--custom_obs CUSTOM_OBS] [--symmetry SYMMETRY]
                       [directories ...]

Positional Arguments#

directories

Directories to analyze. If empty, analyzes all directories containing file “data.h5” it can find, starting from the current working directory.

Named Arguments#

--check_warmup, --warmup

Check warmup. Opens new window.

Default: False

--check_rebin, --rebin

Check rebinning for controlling autocorrelation. Opens new window.

Default: False

-l, --check_list

List of observables to check for warmup and rebinning.

--do_analysis, --ana

Do analysis.

Default: False

--always

Do not skip analysis if parameters and bins are older than results.

Default: False

--gather

Gather all analysis results in one file named “gathered.pkl”, representing a pickled pandas DataFrame.

Default: False

--no_tau

Skip time displaced correlations.

Default: False

--custom_obs

File that defines custom observables. This file has to define the object custom_obs, needed by py_alf.analysis. (default: os.getenv(“ALF_CUSTOM_OBS”, None))

--symmetry, --sym

File that defines lattice symmetries. This file has to define the object symmetry, needed by py_alf.analysis. (default: None))

alf_bin_count#

Count number of bins in ALF HDF5 file(s), assuming all observables have the same number of bins.

usage: alf_bin_count [-h] [filenames ...]

Positional Arguments#

filenames

Name of HDF5 files. If no arguments are supplied, all files named “data.h5” in the current working directory and below are taken.

alf_show_obs#

Show observables and their number of bins in ALF HDF5 file(s).

usage: alf_show_obs [-h] [filenames ...]

Positional Arguments#

filenames

Name of HDF5 files. If no arguments are supplied, all files named “data.h5” in the current working directory and below are taken.

alf_del_bins#

Delete N bins in all observables of the specified HDF5-file.

usage: alf_del_bins [-h] --N N [--N0 N0] filename

Positional Arguments#

filename

Name of HDF5 file.

Named Arguments#

--N

Number of bins to remove after first N0 bins.

--N0

Number of first N0 bins to keep. (default=0)

alf_test_branch#

Script for testing two branches against one another.The test succeeds if analysis results for both branches are exactly the same.

usage: alf_test_branch [-h] [--sim_pars SIM_PARS] [--alfdir ALFDIR]
                       [--branch_R BRANCH_R] [--branch_T BRANCH_T]
                       [--machine MACHINE] [--devel] [--mpi] [--n_mpi N_MPI]
                       [--mpiexec MPIEXEC] [--mpiexec_args MPIEXEC_ARGS]
                       [--no_prep] [--no_sim] [--no_analyze]

Named Arguments#

--sim_pars

JSON file containing parameters for testing. (default: ‘./test_pars.json’)

--alfdir

Path to ALF directory. (default: os.getenv(‘ALF_DIR’, ‘./ALF’))

--branch_R

Reference branch. (default: master)

--branch_T

Branch to test. (default: master)

--machine

Machine configuration. (default: “GNU”)

--devel

Compile with additional flags for development and debugging.

--mpi

Do MPI run(s). (default: False)

--n_mpi

Number of MPI processes. (default: 4)

--mpiexec

Command used for starting an MPI run. (default: “mpiexec”)

--mpiexec_args

Additional arguments to MPI executable.

--no_prep

Do not prepare runs, i.e. Compiling and creating directories.

--no_sim

Do not run ALF binary.

--no_analyze

Do not analyze and compare results.