FeynKit · latest
On this page

LoadedModel

symbolica.community.hepkit Class

LoadedModel()

A normalized model, its parameter card, and its loading diagnostics.

This is the complete result returned by UfoLoader.load; use model for diagram generation and parameters for external numerical inputs.

Examples

Replace path/to/MyUFO with the directory containing your UFO model (particles.py, vertices.py, and related files).

from symbolica import S, E
from symbolica.community import hepkit as hep
loaded = hep.UfoLoader().load("path/to/MyUFO")
model = loaded.model
particle_names = [particle.name for particle in model.particles]
parameters = loaded.parameters

Member details

model

Property · read-only#
model: Model

Return the normalized HEP model.

Examples

Using the setup in the LoadedModel class example:

model = loaded.model
particles = model.particles

parameters

Property · read-only#
parameters: ParameterCard

Return the parameter card loaded alongside the model.

Examples

Using the setup in the LoadedModel class example:

parameters = loaded.parameters
shifted = loaded.model.with_parameter_card(parameters)

diagnostics

Property · read-only#
diagnostics: UfoLoadDiagnostics

Return counts and options recorded while loading the UFO model.

Examples

Using the setup in the LoadedModel class example:

counts = (loaded.diagnostics.particle_count, loaded.diagnostics.vertex_rule_count)

__repr__

Method#
__repr__() -> str

Return a concise summary of the loaded model and its source.

Examples

Using the setup in the LoadedModel class example:

print(loaded)

_repr_html_

Method#
_repr_html_() -> str

Render a compact overview of the normalized UFO model.

Examples

Using the setup in the LoadedModel class example:

from IPython.display import display
display(loaded)

_repr_pretty_

Method#
_repr_pretty_(pretty: Any, cycle: bool) -> None

Write the concise loaded-model summary to an IPython pretty printer.

Examples

Using the setup in the LoadedModel class example:

from IPython.lib.pretty import pretty
text = pretty(loaded)

Parameters

NameTypeDefaultDescription
prettyAny—

The IPython pretty-printer object.

cyclebool—

Whether this object is part of a recursive formatting cycle.