Generate FeynRules .fr model files from LaTeX Lagrangian descriptions. Triggers when the user provides a Lagrangian in LaTeX notation and wants it converted to a FeynRules model file for particle physics simulations.
This skill converts LaTeX Lagrangian descriptions into complete, validated FeynRules .fr model files. These files define Beyond-the-Standard-Model (BSM) particle physics models that extend the Standard Model (SM) with new particles, couplings, and interactions.
The generated .fr files are used downstream for validation (feynrules-model-validator skill) and UFO generation (ufo-generator skill).
This is a pure LLM generation task — no remote execution or Magnus blueprints are involved.
Work through these steps one at a time. Do not try to write the complete .fr file in one shot — copy the skeleton first, then edit each section incrementally.
ee = electromagnetic coupling, gw = weak SU(2)_L coupling, gs = strong SU(3)_C couplingg1 = hypercharge U(1)_Y coupling, sw/cw = sine/cosine of Weinberg angleInteractionOrder -> {NP, 1}Copy templates/skeleton.fr into models/<Model>.fr (e.g. models/HeavyN.fr). Fill in M$ModelName and M$Information with the model name and metadata. Add any needed index definitions.
Output paths (all relative to working directory):
models/<Model>.frmodels/<Model>_UFO/Edit the M$ClassesDescription section. For each BSM particle, define the appropriate class (F[], S[], V[], T[]) with all required attributes. See references/feynrules_syntax.md section 5 for the full attribute list for each particle type.
Edit the M$Parameters section. For each new coupling constant:
ParameterType -> External with BlockName, OrderBlock, ValueInteractionOrder -> {NP, 1} for every new physics coupling (both External and Internal)For derived parameters, use ParameterType -> Internal with a Value expression.
See references/feynrules_syntax.md section 6 for External/Internal parameter examples, including mixing matrices with Unitary -> True.
Edit the Lagrangian section. Key rules:
Block[{indices}, ...] to declare dummy indices* for all multiplicationLNPtmp := Block[{...}, <non-hermitian part only>];
LNP := LNPtmp + HC[LNPtmp];
See references/feynrules_syntax.md sections 7-8 for Lagrangian syntax and a complete BSM example.
After writing the .fr file, use the validate-feynrules Magnus blueprint (see feynrules-model-validator skill) to validate the model:
magnus run validate-feynrules -- --model <path-to-fr-file> --lagrangian <lagrangian-symbol>
Additionally, manually verify:
Snew, Zp, N1)*) instead of implicit juxtapositionpsibar[sp1].Ga[mu,sp1,sp2].psi[sp2] or dot notation psibar.Ga[mu].psiProjM = (1-gamma5)/2 (left), ProjP = (1+gamma5)/2 (right)Ltmp, then L := Ltmp + HC[Ltmp]X = positive charge, Xbar = negative charge (canonical convention)Width -> {WSnew, 0.04}) or use Width -> {WSnew, Internal}. Do NOT use Width -> 0 — this tells MG5 the particle is stable, and MG5 will silently override any set param_card DECAY attempt to match the model's zero-width expression.fr file syntax specification.fr file with all required sections and TODO markers