Config Files
Config files contain all of the information needed to generate a model’s absorption spectrum.
Important
Config files are written in the toml format.
As a result, all config files should be named with the .toml extension.
Config files are divided into Tables. Two tables are used:
out: Contains parameters that detail the output of the absorption spectrum. #model: Contains parameters that detail the model used to generate the absorption spectrum. #
To see sample config files for each model, see the Sample Configs section.
Tables
Config files are divided into tables. Each table contains a set of parameters specific to that table.
For example, a str parameter in the the out table is specified as follows:
out.parameter_name = "parameter_value"
Some parameters have different types, like array, int, float, or bool.
These are specified in the same way, but with the appropriate type:
out.array_parameter = [1, 2, 3] # this is an array[int] parameter
out.float_parameter = 4.5 # this is a float parameter
out.bool_parameter = true # this is a bool parameter
out Table
These parameters detail the output of the absorption spectrum. They can be used across all models.
All output parameters belong in the out table.
Warning
All output parameters are required.
- out.filename: str
Path and name of output file relative to the current working directory. Output csv file will append a “.csv” extension to the filename. Output plot will append a “.png” extension to the filename.
- out.data: bool
Whether to output the absorption spectrum data to a csv file. If False, no “.csv” file will be generated.
model Table
These parameters detail the model used to generate the absorption spectrum.
Besides name, these parameters are specific to the model used. See the documentation for the specific model for more information.
All output parameters belong in the model table.
Required Model Parameters
- model.name: str
Name of the model to use. The name of each model is listed in the documentation for that model.
all model parameters without default values
These parameters are specific to the model used. Most of a model’s parameters fall in this category. Each value is the same as the parameter name in the model’s documentation.
Optional Model Parameters
all model parameters with default values
These parameters are specific to the model used. Each value is the same as the parameter name in the model’s documentation.
- model.start_energy: float
The starting energy for the absorption spectrum in wavenumbers. Defaults to 0.
- model.end_energy
The ending energy for the absorption spectrum in wavenumbers. Defaults to 20,000.
- model.num_points
The number of points in the absorption spectrum. Defaults to 2,001.
Parameterizing Submodels
Some models have submodels that must be parameterized (such as Stark Model).
With these models, the submodel parameter can be specified as a table, like model, that contains the submodel’s parameters.
This table must be a subtable of the model table.
For example:
model.submodel_parameter_name.name = "submodel_name"
model.submodel_parameter_name.submodel_parameter = "submodel_parameter_value"
Important
The submodel_parameter_name is the name of the submodel parameter in the model, in the same way that other parameters exactly match the parameter name in the model.
Sample Configs
Each model has a sample config file provided. They are reproduced here, or can be found in the sample configs directory on GitHub.
Two-State Example
# REQUIRED: output parameters
out.filename = "two_state_output"
out.data = true
out.plot = true
out.overwrite = true
# REQUIRED: model name
model.name = "two_state"
# optional model parameters
model.start_energy = 0
model.end_energy = 20000
model.num_points = 2001
# model-specific parameters
model.temperature_kelvin = 300
model.broadening = 200
model.transfer_integral = 100
model.energy_gap = 8000
model.mode_basis_sets = [20, 200]
model.mode_frequencies = [1200, 100]
model.mode_couplings = [0.7, 2.0]
MLJ Example
# REQUIRED: output parameters
out.filename = "mlj_output"
out.data = true
out.plot = true
out.overwrite = true
# REQUIRED: model name
model.name = "mlj"
# optional model parameters
model.start_energy = 0
model.end_energy = 20000
model.num_points = 2001
# model-specific parameters
model.temperature_kelvin = 300
model.energy_gap = 8000
model.disorder_meV = 0
model.basis_size = 20
model.mode_frequencies = [1200, 100]
model.mode_couplings = [0.7, 2.0]
Stark Example
# REQUIRED: output parameters
out.filename = "stark_output"
out.data = true
out.plot = true
out.overwrite = true
# REQUIRED: model name
model.name = "stark"
# optional model parameters
model.start_energy = 0
model.end_energy = 20000
model.num_points = 2001
# model-specific parameters
model.positive_field_strength = 0.01
model.positive_field_sum_percent = 0.5
model.field_delta_dipole = 38
model.field_delta_polarizability = 1000
# submodel parameters
model.neutral_submodel.name = "two_state"
model.neutral_submodel.temperature_kelvin = 300
model.neutral_submodel.broadening = 200
model.neutral_submodel.transfer_integral = 100
model.neutral_submodel.energy_gap = 8000
model.neutral_submodel.mode_basis_sets = [20, 200]
model.neutral_submodel.mode_frequencies = [1200, 100]
model.neutral_submodel.mode_couplings = [0.7, 2.0]