This code uses QGRAF and tikz-feynman
The program qgraf-xml-drawer is a Python program for drawing Feynman diagrams. The code translates QGRAF diagrams into a LuaLaTeX file using tikz-feynman to draw them after compilation
The program is provided with a QGRAF style file called xmldraw.sty
. Any set of feynman rules compatible with QGRAF can be handled and the output should be put in the package folder to be processed.
The user is required to modify the code to adapt it to their situation.
- The QGRAF output file name should be provided by modifying the variable
INPUTS
in the filedrawer.py
. - The particle dictionnary
pt
indrawer.py
should also be modified to contain the list of particles and anti-particles appearing in the diagrams. Each key in the dictionnary is the name of the particle as defined in QGRAF and the associated value should be the associated propagator type as defined in tikz-feynman.
Once this is defined, run the code using python drawer.py
and compile the output using lualatex main.tex
. The diagrams ared drawn in main.pdf
.
The code is designed to make loop diagrams look nice. At the moment, it returns a ValueError
if two vertices are joined by 4 or more propagators.
This code is citeable using the following DOI: