UfoLoader
symbolica.community.hepkit Class
UfoLoader(*, restriction_name: Optional[str] = None, simplify_model: bool = True, wrap_indices_in_lorentz_structures: bool = True) Load and normalize a Universal FeynRules Output model.
The loader delegates UFO parsing to ufo_model_loader and returns typed HEP model entities suitable for process and diagram generation.
Examples
Replace path/to/MyUFO with the directory containing your UFO model (particles.py, vertices.py, and related files).
from symbolica.community import hepkit as hep
loader = hep.UfoLoader()
loaded = loader.load("path/to/MyUFO")Parameters
restriction_namestr, optionalRestriction-card name to apply while loading.
simplify_modelbool, optionalSimplify normalized symbolic model expressions.
wrap_indices_in_lorentz_structuresbool, optionalWrap normalized indices in Lorentz structures.
Constructor
#Construct a UFO loader with normalization options.
Examples
Using the setup in the UfoLoader class example:
loader = hep.UfoLoader(restriction_name="massless")Parameters
| Name | Type | Default | Description |
|---|---|---|---|
restriction_name | Optional[ | None | Restriction-card name passed to the UFO loader. |
simplify_model | bool | True | Simplify expressions in the normalized model. |
wrap_indices_in_lorentz_structures | bool | True | Wrap indices in normalized Lorentz structures. |
Member details
restriction_name
Property · read-only#restriction_name: Optional[str] Return the configured restriction-card name.
Examples
Using the setup in the UfoLoader class example:
loader = hep.UfoLoader(restriction_name="massless")
assert loader.restriction_name == "massless"simplify_model
Property · read-only#simplify_model: boolReturn whether model simplification is enabled.
Examples
Using the setup in the UfoLoader class example:
loader = hep.UfoLoader(simplify_model=False)
assert not loader.simplify_modelwrap_indices_in_lorentz_structures
Property · read-only#wrap_indices_in_lorentz_structures: boolReturn whether normalized Lorentz indices are wrapped.
Examples
Using the setup in the UfoLoader class example:
loader = hep.UfoLoader(wrap_indices_in_lorentz_structures=True)
assert loader.wrap_indices_in_lorentz_structuresload
Method#load(path: str | os.PathLike | pathlib.Path) -> LoadedModel Load through the caller's attached interpreter without changing Python globals.
Examples
Using the setup in the UfoLoader class example:
loaded = hep.UfoLoader().load("path/to/ufo_model")
model = loaded.modelParameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | os. | — | Directory containing the UFO Python modules. |
View generated signature source: docs/api/python/feynkit-community.pyi:12026