LoadModel
LoadModel["file"]
executes the model definition contained in file and returns the therein-defined Lagrangian.
Details and Options
- If no directory is specified LoadModel looks for the model file in the current Directory, the NotebookDirectory, and in $MatchetePath/Models.
- The valid file extensions are .m and .wl. If none are given, the function looks for files with both extensions.
- If file does not correspond to model file in any of the standard directories, LoadModel will attempt a partial match to the available models if it is unambiguous.
- The following options can be given:
-
ModelParameters {} replaces model parameters of the model file with new values. SetModelOptions {} changes or provides field, coupling, or group options for the model defined in the file. Verbose False prints the name of the loaded model if the name is a partial match. - The option ModelParameters takes a replacement list of symbol names used in the model file, and new names/values provided by the user.
- If a field or coupling label is changed with ModelParameters option, the NiceForm option for the field or coupling definition is changed to default to avoid confusion. A bespoke NiceForm option can be set explicitly with SetModelOptions in this case.
- SetModelOptions takes a (list of) instructions of the form
-
{matcheteFunction, label, option value} -
matcheteFunction is one the functions DefineCoupling, DefineField, DefineFlavorIndex, DefineGaugeGroup, and DefineGlobalGroup; label is the label of the coupling, field, or group to be changed; option is name of the the option to be changed/added; value is (new) value for the option.
A valid combination would be {DefineCoupling, Yd, EFTOrder 1}, which adds/changes the option EFTOrder 1 to the definition of the coupling Yd when loading the model (assuming that the coupling Yd is defined in the model).
Examples
open allclose allBasic Examples (1)
The prototypical example of LoadModel is to load the Standard Model distributed in $MatchetePath/Models. We may assign the Lagrangian to a variable by
Options (4)
ModelParameters (1)
The ModelParameters option allows the user to change the name/value of one or more symbols used in the model file (e.g., to avoid name conflicts or set the number of generations). To change the field label for the light scalar in the VLF toy model, we call
SetModelOptions (2)
Here we add a NiceForm option to the U(1) gauge group of VLF toy model, thereby changing how it gets displayed under NiceForm:
SetModelOptions is very general and can be used to change all options for any object defined in the model file. It is not restricted to cosmetic changes but can change, e.g., field properties. Say we can make a field from the VLF toy model heavy:
Observe now that the field has property Heavy True, despite the field being defined as light in the model file.
Verbose (1)
With the Verbose option, the full path to the model is printed. This way the user may ensure that the correct file is loaded:
Possible Issues (2)
If a model parameter is renamed, options are modified with the new symbol name rather than the old one:
Since SetModelOptions can be used to change all optional properties, it is possible to make changes that make the model Lagrangian invalid or even produce outright errors. For instance, giving right-handed charged leptons of the SM an SU(2)L index will produce an error, as the model file Lagrangian uses only one index to the field:
With such drastic changes the users will have to construct a new model instead.