setup_executable
full name: tenpy.tools.misc.setup_executable
parent module:
tenpy.tools.misc
type: function
- tenpy.tools.misc.setup_executable(mod, run_defaults, identifier_list=None)[source]
Read command line arguments and turn into useable dicts.
Warning
this is a deprecated interface. Use the
Simulation
interface in combination withconsole_main()
instead. You can invoke that from the command line aspython -m tenpy ...
.Uses default values defined at: - model class for model_par - here for sim_par - executable file for run_par Alternatively, a model_defaults dictionary and identifier_list can be supplied without the model
- NB: for setup_executable to work with a model class, the model class needs to define two things:
defaults, a static (class level) dictionary with (key, value) pairs that have the name of the parameter (as string) as key, and the default value as value.
identifier, a static (class level) list or other iterable with the names of the parameters to be used in filename identifiers.
- Parameters:
- Returns:
model_par, sim_par, run_par (dict) – containing all parameters.
args – namespace with raw arguments for some backwards compatibility with executables.