Web frontend for building Feynman diagrams. Hand-draw them on a canvas with live conservation/legality checks, or type a process like e+ e- → mu+ mu- and have gammaloop enumerate the diagrams for you. Forward-scattering cuts, UFO models, and round-trip .dot export included.
Live demo: https://huggingface.co/spaces/ecavan/feynmangraph
1-loop electron self-energy with forward-scattering glue between the incoming and outgoing legs.
pip install feynmangraph
feynmangraph setup # builds gammaloop
feynmangraph serve # http://localhost:8000The Canvas, Import, and Export tabs work without gammaloop; only the Generate tab needs it. Skip setup if you only want the editor.
- Canvas. Drag vertices, connect propagators, place externals. Charge, lepton number, baryon number, and color triality are checked live, and each vertex is matched against the UFO interaction list — you can't build something that isn't a real diagram.
- Generate. Pick a process spec; gammaloop enumerates the diagrams. Speed-up controls: restrict to a particle subset and pick the numerator-isomorphism grouping mode (
no_groupingfor fastest). - Forward-scattering cuts. Pair two externals via
isCutfrom a single dropdown. Round-trips through.dotincluding Linnet'snode [isCut="X"]shorthand. - UFO models. Upload a
.tar.gzor.zip— particles and vertex rules light up immediately. - Export. Single diagram or whole gallery → gammaloop-format
.dotwith projector, half-port IDs,lmb_idchords, andisCutglue.
Built on gammaloop (diagram enumeration + .dot dialect), FastAPI, React + reactflow.
MIT