DiagramVertex
symbolica.community.hepkit Class
DiagramVertex()An interaction point in a Feynman diagram.
External states belong to edges; every public vertex references an interaction.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.phi4()
process = model.process(["phi", "phi"], ["phi", "phi"])
result = process.generate_diagrams(loops=1)
diagram = result.diagrams[0]
vertex = diagram.vertices[0]
interaction = model.vertex_rule(vertex.interaction)
factor = vertex.numerator_expression()Member details
id
Property · read-only#id: intReturn this vertex's integer ID within the diagram.
Examples
Using the setup in the DiagramVertex class example:
vertices_by_id = {item.id: item for item in diagram.vertices}name
Property · read-only#name: strReturn the stable vertex label stored in the diagram.
Examples
Using the setup in the DiagramVertex class example:
vertex_names = [item.name for item in diagram.vertices]interaction
Property · read-only#interaction: strReturn the interaction name.
Raises DiagramError for an incomplete imported diagram.
Examples
Using the setup in the DiagramVertex class example:
vertex = diagram.vertices[0]
rule = model.vertex_rule(vertex.interaction)numerator
Property · read-only#numerator: strReturn the symbolic numerator annotation as source text.
Raises DiagramError when the diagram does not carry an instantiated Feynman-rule numerator for this vertex.
Examples
Using the setup in the DiagramVertex class example:
source_text = vertex.numerator
factor = vertex.numerator_expression()numerator_expression
Method#numerator_expression() -> TensorExpressionReturn the numerator annotation as a Spenso TensorExpression.
Examples
Using the setup in the DiagramVertex class example:
vertex = diagram.vertices[0]
vertex_factor = vertex.numerator_expression()
weighted_vertex_factor = diagram.overall_factor_expression() * vertex_factor__repr__
Method#__repr__() -> strReturn a concise, unambiguous description of the vertex.
Examples
Using the setup in the DiagramVertex class example:
vertex = diagram.vertices[0]
print(vertex) # includes its external state or interaction rule_repr_pretty_
Method#_repr_pretty_(pretty: Any, cycle: bool) -> None Write the vertex summary to an IPython pretty printer.
Examples
Using the setup in the DiagramVertex class example:
from IPython.lib.pretty import pretty
text = pretty(vertex)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pretty | Any | — | The IPython pretty-printer object. |
cycle | bool | — | Whether this object is part of a recursive formatting cycle. |
View generated signature source: docs/api/python/feynkit-community.pyi:2427