بنقرة واحدة
draw-feynman
Generate publication-quality Feynman diagrams in TikZ-Feynman, FeynMF, or ASCII
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate publication-quality Feynman diagrams in TikZ-Feynman, FeynMF, or ASCII
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Numerically evaluate a FormCalc-reduced one-loop amplitude with LoopTools 2.16 (Passarino-Veltman integrals via the Wolfram/LoopTools MathLink) and emit a scattering/v1 JSON (σ_SI, σ_SD) for direct detection. Unblocks the 2HDM+a loop-only DD path. Self-heals via _shared/installs/looptools preflight.
Reduce a FeynArts amplitude list with FormCalc 9.10. Produces amp_reduced.m and amp_reduced.meta.json sidecar conforming to amp_reduced.meta/v1. Self-heals via _shared/installs/formcalc preflight.
Generate Feynman diagrams and amplitudes using FeynArts 3.11. Supports built-in models (SM, SMQCD, THDM, MSSM) and SARAH-generated models. Outputs FeynAmpList.m, diagrams.pdf, topologies.json, and metadata sidecar.
Compute direct-detection likelihoods and 90%-CL exclusion verdicts using DDCalc 2.2.0. Leaf consumer of scattering/v1 JSON from /micromegas or /formcalc.
MadDM — dark matter relic density, direct detection cross-sections, indirect detection rates, parameter scans with experimental limit comparison
Run HiggsBounds-5 + HiggsSignals-2 constraint checks on a model SLHA file. Computes hb_allowed (per-channel AND), hs_consistent (Δχ² < 6.18), p-values, and per-channel CSV. Supports single-point and scan-directory modes.
| name | draw-feynman |
| description | Generate publication-quality Feynman diagrams in TikZ-Feynman, FeynMF, or ASCII |
Generate Feynman diagrams for particle physics processes. Supports tree-level and loop diagrams across QED, QCD, electroweak, and BSM theories.
Parse the process: Identify initial and final state particles, the relevant theory (QED/QCD/EW/BSM), and the perturbative order.
Enumerate topologies: List all contributing Feynman diagrams at the requested order. For tree-level, enumerate all valid s-channel, t-channel, u-channel, and contact diagrams. For loops, enumerate all one-particle-irreducible topologies.
Draw each diagram: Generate the diagram code in the requested format.
Wrap in compilable LaTeX: Provide a complete .tex file that compiles standalone.
\feynmandiagram for simple diagrams, \begin{feynman} environment for complex layoutsfermion, anti fermionphoton (wavy), gluon (coiled), boson (dashed for scalars)[blob] for effective vertices and form factorsInput: "Draw the leading-order Feynman diagrams for e+e- -> mu+mu-"
Output: Two diagrams (s-channel gamma and Z), each as compilable TikZ-Feynman code with proper labels.
Reference:
docs/design-system.md— the canonical source of truth for all visual rules.
Palette: Ink-only (Palette C). The repo ships styles/hephaestus-tikz.sty, but it is repo-local — pdflatex won't find it from a user's working directory unless TEXINPUTS is set. Emit a self-contained preamble inline so the output compiles anywhere. Use this exact block at the top of every generated .tex:
\documentclass[border=2pt]{standalone}
\usepackage{tikz-feynman}
\usepackage{xcolor}
% Inlined from styles/hephaestus-tikz.sty — keep in sync.
\definecolor{hepInk}{HTML}{1a1a1a}
\definecolor{hepAccent}{HTML}{0284c7} % use {0369a1} for slate context
\definecolor{hepLabelGray}{HTML}{555555}
\tikzfeynmanset{
every fermion/.style={line width=1.0pt, draw=hepInk},
every anti fermion/.style={line width=1.0pt, draw=hepInk},
every photon/.style={line width=1.0pt, draw=hepInk},
every gluon/.style={line width=1.0pt, draw=hepInk},
every boson/.style={line width=1.0pt, draw=hepInk},
every scalar/.style={line width=1.0pt, draw=hepInk},
every ghost/.style={line width=0.7pt, draw=hepInk},
every dot/.style={fill=hepInk, inner sep=0pt, minimum size=4pt},
}
\tikzset{
hep label/.style={font=\itshape\small, text=hepLabelGray, inner sep=2pt},
hep propagator label/.style={font=\itshape\small, text=hepAccent, inner sep=2pt, midway},
}
Key rules:
#1a1a1a (near-black), 1.0pt. Ghost lines: 0.7pt dotted.#0284c7 or #0369a1, same weight.#555555, 2pt offset from the line, placed at the midpoint of external legs.These are silent failure modes — the LaTeX compiles, the diagrams look right, but the output is wrong. Check each before emitting.
[hep propagator label] rendered as literal textedge label=<x> expands to node[auto]{<x>}, so <x> is the text content of the node, not its options. Putting a tikzset key in the braces typesets it literally:
% WRONG — [hep propagator label] lands inside text braces, prints literally:
(a) -- [photon, edge label={[hep propagator label]\(Z\)}] (b)
% CORRECT (plain) — accepts default styling:
(a) -- [photon, edge label=\(Z\)] (b)
% CORRECT (with accent-color styling) — use edge node= so the brackets are parsed as node options:
(a) -- [photon, edge node={node[hep propagator label]{\(Z\)}}] (b)
Use the plain form by default. Use the accent-color form only when the propagator is the "boson of interest" being discussed.
layered layout, horizontal=a to b, and spring layout are PGF graph-drawing algorithms that require LuaTeX. Under pdflatex they're silently dropped — the diagram still compiles, but vertices land wherever you put them (or collapse to the origin). Compile with pdflatex using explicit vertex coordinates (at (x,y) or right=of a). Only emit the layout keys if the caller's pipeline runs lualatex.
For a Majorana initial state, every t-channel topology has a required u-channel partner (with relative Fermi sign −1) obtained by swapping the two identical incoming legs. If you emit only one, you've undercounted. Example: chi1 chi1 -> W+ W- with chargino exchange gives both a t-channel and a u-channel diagram, not one.