VertexRule

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

VertexRule

class VertexRule

An interaction vertex rule from a particle model.

A vertex rule links its participating particles to color tensors, Lorentz structures, and the corresponding matrix of coupling names.

Examples

from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
vertex = model.vertex_rules[0]
particles = [model.particle(name) for name in vertex.particles]

Attributes

Name Description
color_structures Return the color structures used by the vertex.
couplings Return the coupling-name matrix indexed by color and Lorentz structure.
lorentz_structures Return the Lorentz-structure names used by the vertex.
name Return the vertex-rule name.
particles Return the ordered particle names attached to the vertex.

color_structures

VertexRule.color_structures: builtins.list[Expression]

Return the color structures used by the vertex.

Examples

Using the setup in the VertexRule class example:

color_basis = vertex.color_structures

couplings

VertexRule.couplings: builtins.list[builtins.list[typing.Optional[builtins.str]]]

Return the coupling-name matrix indexed by color and Lorentz structure.

Examples

Using the setup in the VertexRule class example:

vertex = model.vertex_rules[0]
names = [name for row in vertex.couplings for name in row if name is not None]
couplings = [model.coupling(name) for name in names]

lorentz_structures

VertexRule.lorentz_structures: builtins.list[builtins.str]

Return the Lorentz-structure names used by the vertex.

Examples

Using the setup in the VertexRule class example:

vertex = model.vertex_rules[0]
tensors = [model.lorentz_structure(name) for name in vertex.lorentz_structures]

name

VertexRule.name: builtins.str

Return the vertex-rule name.

Examples

Using the setup in the VertexRule class example:

rules_by_name = {rule.name: rule for rule in model.vertex_rules}

particles

VertexRule.particles: builtins.list[builtins.str]

Return the ordered particle names attached to the vertex.

Examples

Using the setup in the VertexRule class example:

vertex = model.vertex_rules[0]
particles = [model.particle(name) for name in vertex.particles]

Methods

Name Description
__repr__ Summarize the defining data as well as the vertex-rule name.
_repr_html_ Display the model member’s physical data and defining expressions.
_repr_pretty_ Write the complete text summary to an IPython pretty printer.
coupling_orders Combine the coupling-order powers referenced by this vertex.

__repr__

VertexRule.__repr__() -> builtins.str

Summarize the defining data as well as the vertex-rule name.

Examples

Using the setup in the VertexRule class example:

print(next(v for v in model.vertex_rules if "e-" in v.particles))

_repr_html_

VertexRule._repr_html_() -> builtins.str

Display the model member’s physical data and defining expressions.

Examples

Using the setup in the VertexRule class example:

from IPython.display import display
display(vertex)

_repr_pretty_

VertexRule._repr_pretty_(pretty: typing.Any, cycle: builtins.bool) -> None

Write the complete text summary to an IPython pretty printer.

Examples

Using the setup in the VertexRule class example:

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

Parameters

  • pretty (object) IPython pretty printer receiving the text.
  • cycle (bool) Whether the object occurs recursively in the current display.

coupling_orders

VertexRule.coupling_orders() -> builtins.dict[builtins.str, builtins.int]

Combine the coupling-order powers referenced by this vertex.

Examples

Using the setup in the VertexRule class example:

vertex.coupling_orders()
{'QED': 2}