FeynKit · latest
On this page

DiagramHalfEdge

symbolica.community.hepkit Class

DiagramHalfEdge()

A particle-line endpoint using the diagram's native half-edge numbering.

Examples

from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.phi4()
diagram = model.process(["phi", "phi"], ["phi", "phi"]).generate_diagrams(loops=1, progress=None).diagrams[0]
endpoints = [(half.id, half.vertex, half.edge.particle_name) for half in diagram.half_edges]

Member details

id

Property · read-only#
id: int

Native half-edge ID, also used in symbolic hedge annotations.

Examples

ids = [half.id for half in diagram.half_edges]

vertex

Property · read-only#
vertex: int

Incident interaction vertex ID.

Examples

incident = [half.vertex for half in diagram.half_edges]

edge

Property · read-only#
edge: DiagramEdge

Physics edge containing this half-edge.

Examples

particles = [half.edge.particle_name for half in diagram.half_edges]

flow

Property · read-only#
flow: str

Underlying endpoint flow: source or sink.

Examples

incoming = [half.id for half in diagram.half_edges if half.flow == "sink"]