From 76c11a08628523e016c8b1a4d5157bcb8b23f2c3 Mon Sep 17 00:00:00 2001 From: Josh Davies Date: Wed, 21 Jan 2026 22:18:49 +0000 Subject: [PATCH] docs(manual): update section on Diagram Generation --- doc/manual/diagrams.tex | 662 +++++++++++++++------------------------- 1 file changed, 253 insertions(+), 409 deletions(-) diff --git a/doc/manual/diagrams.tex b/doc/manual/diagrams.tex index bc7d783ff..2c011adee 100644 --- a/doc/manual/diagrams.tex +++ b/doc/manual/diagrams.tex @@ -2,450 +2,294 @@ \chapter{Diagram generation} \label{diagrams} -Starting with version 5.0 \FORM{} is equiped with the diagram generator of -Toshiaki Kaneko "A Feynman graph generator for any order of coupling -constants", Toshiaki Kaneko(Meiji Gakuin U.): Comput.Phys.Commun. 92 (1995) -127-152, e-Print: hep-th/9408107. Recently he has reprogrammed it in C++ -and made it into a library, accompanied with a manual (to be published). +Starting with version 5.0, \FORM{} is equipped with the diagram generator of +Toshiaki Kaneko: ``A Feynman graph generator for any order of coupling +constants'', Toshiaki Kaneko (Meiji Gakuin U.), Comput.Phys.Commun. 92 (1995) +127-152, e-Print: hep-th/9408107. Recently, he has reprogrammed it as a C++ +library, accompanied with a manual. \FORM{} makes use of this library and has built its own syntax around it, based on many years of experience working with the QGRAF generator -("Automatic Feynman graph generation", Paulo Nogueira: J.Comput.Phys. 105 +(``Automatic Feynman graph generation'', Paulo Nogueira: J.Comput.Phys. 105 (1993) 279-289) and the problems encountered with the large number of -diagrams used with the Mincer and Forcer programs. The whole has been set -up in such a way that if more features are needed they should not be -exceptionally hard to be implemented. +diagrams used with the Mincer and Forcer programs. The library has been +programmed in such a way that more features should not be too hard to +implement if required. -In version 4.3 the diagram generator was not complete yet. Effectively it -only accepted one type of scalar particles, but one could have any number -of particles at the vertices. Hence it could be used as a fast topology -generator. +In version 4.3 the diagram generator was not yet complete. Effectively it +only accepted one type of scalar particle, but one could define vertices +with any number of particles. Hence it could be used as a fast topology +generator. The old ``topologies\_'' function has been removed in version 5.0. -For the \FORM{} implementation in version 5.0 and later two new types of -variables are introduced, a number of new functions and a number of new -preprocessor variables. In addition the special concept of models is new. +For the \FORM{} implementation in version 5.0 and later, the concept of +``models'' has been introduced, as well as two new types of variable, +a number of new functions and a number of new preprocessor variables. -Let us start with models, particles and vertices: -\begin{description} -\item[Model] Particles and vertices exist only inside the scope of a model. -A model is a very special set of which the elements will be the particles -and the vertices. It is defined by -\begin{verbatim} - Model name; - Particle .....; - . - . - Particle .....; - Vertex ....; - . - . - Vertex ....; - EndModel; -\end{verbatim} -in which the particle and vertex statements are declarations that will be -explained below. The order is important. All Particle declarations must -come before the vertex declarations. -\item[Particle] A particle is a very special type of function. It is -declared with -\begin{verbatim} - Particle particlename[,antiparticlename][,][,external]; -\end{verbatim} -A particle has an antiparticle assigned to it. If no name of an -antiparticle is specified the particle will be its own antiparticle as is -the case with for instance a photon or a gluon. The sign indicates whether -a particle is a fermion (-) or a boson (+) and the number is the dimension -of its SU(2) representation. Hence a scalar particle has the number 1, an -electron the number 2, etc. If no spin information is provided it is -assumed that the particle is a scalar. After the spin option there is the -external option to indicate that particle will not be considered for the -choice of propagators (edges). To avoid that a scalar particle has an -antiparticle by the name external one should avoid -\begin{verbatim} - Particle MyScalar,external; -\end{verbatim} -and use -\begin{verbatim} - Particle MyScalar,1,external; -\end{verbatim} -instead. -\item[Vertex] A vertex is also a very special type of function. It is -declared with -\begin{verbatim} - Vertex particle1,...,particlen:coupling; -\end{verbatim} -for an npoint vertex. The coupling constant is either the number 1, or a -(product of) symbol(s) to an integer power. If the symbols have not been -declared before they will be declared during the reading of the vertex -declaration. -\end{description} -Some examples: -\begin{verbatim} - Model PHI3; - Particle phi,1; - Vertex phi,phi,phi:g; - EndModel; - Model QCD; - Particle qua,QUA,-2; - Particle gho,GHO,-1; - Particle glu,+3; - Vertex qua,QUA,glu:g; - Vertex gho,GHO,glu:g; - Vertex glu,glu,glu:g; - Vertex glu,glu,glu,glu:g^2; - EndModel; -\end{verbatim} -It is possible to have several models simultaneously. +To begin, one must define a ``Model''\index{model}\index{diagrams!model} which contains the fields +and vertices to be used for the generation of Feynman graphs. +A Model definition is finished with ``EndModel''\index{endmodel}\index{diagrams!endmodel}. -In some cases one might want to generate diagrams in which the internal -(multi)loop propagators are represented as special edges. This requires the -definition of more complicated models as in +A ``Particle''\index{particle}\index{diagrams!particle} is defined with the syntax: \begin{verbatim} - #do i = 0,`LOOPS' - Model QCD`i'; - Particle qua,QUA,-2; - Particle gho,GHO,-1; - Particle glu,+3; - Vertex qua,QUA,glu:g; - Vertex gho,GHO,glu:g; - Vertex glu,glu,glu:g; - Vertex glu,glu,glu,glu:g^2; - #do j = 1,`i'-1 - Vertex qua,QUA:g^{2*`j'}; - Vertex gho,GHO:g^{2*`j'}; - Vertex glu,glu:g^{2*`j'}; - #enddo - EndModel; - #enddo + Particle particlename[,antiparticlename] [,] [,external]; \end{verbatim} -in which the two-point vertices are the propagators with j loops. As one -can see in this example, one can have vertices with identical particle -contents but different powers of the coupling constants. +A Particle may optionally have an antiparticle\index{antiparticle}\index{diagrams!antiparticle} name assigned to +it; if no antiparticle is specified the particle is its own antiparticle. +The \texttt{} denotes bosonic (\texttt{+}) or fermionic (\texttt{-}) +statistics and the \texttt{} denotes the dimension of the particle's +spin representation; for example, a scalar is defined with \texttt{+1}, an +electron with \texttt{-2} and a gluon with \texttt{+3}. The spin information +is used by the generator to forbid invalid vertices, but does not ultimately +affect the generation of the graphs. Neglecting the sign and spin information +is equivalent to specifying \texttt{+1}. The \texttt{external} option specifies +that the Particle should appear only as an external leg. +Note that attempting to define an external scalar particle as +\texttt{Particle MyScalar,external;} will produce a Particle called +``MyScalar'' with antiparticle ``external''. This case must be defined using +\texttt{Particle MyScalar,1,external;}. -One can generate diagrams with the diagrams\_ function. Its syntax is +Following the Particle definitions inside the Model scope, one defines +interaction vertices. An N-point Vertex\index{vertex}\index{diagrams!vertex} is defined as follows, where +$N\geq2$: \begin{verbatim} - diagrams_(model,set_of_input_particles,set_of_output_particles, - set_of_external_momenta,set_of_internal_momenta, - number_of_loops_or_coupling_constants,options) + Vertex particle1,...,particleN: coupling; \end{verbatim} -In the case of generating a boson propagator the external symmetry can be -used most effectively by declaring both as input particles as in {glu,glu} -and have the set of output particles empty. The output is given in terms of -a few functions. These functions are -\begin{description} -\item[topo\_] Its argument is the number of the topology. This numbering is -consistent in the sense that whether one generates only topologies (with -the option TOPOLOGIESONLY\_) or the full diagrams makes no difference for -the number of the topology of the diagrams. This allows relative -simple programs to match topologies and renumberings to a predefined list -of topologies, after which this renumbering can then be done later in an -economical way for the full set of diagrams. -\item[node\_] Indicates a vertex. The first argument is the number of the -vertex, the second the combined coupling constants of the vertex and after -that the momenta of the particles if only the topologies are determined, or -the particles with their momentum in their argument when the full diagrams -are generated as in: -\begin{verbatim} - - 2*topo_(1)*node_(1,1,glu(-Q1))*node_(2,1,glu(-Q2))*node_(3,g,qua(-p1) - ,QUA(-p2),glu(Q1))*node_(4,g,qua(-p3),QUA(p1),glu(Q2))*node_(5,g,qua(p2) - ,QUA(-p4),glu(-p5))*node_(6,g,qua(p4),QUA(p3),glu(p5)) -\end{verbatim} -The external lines are connected by a vertex to the vacuum. Those are the -nodes with the lowest numbers as in \verb:node_(1,1,glu(-Q1)): and only a -single particle. If we would have generated the topologies only we would -have gotten for the first diagram -\begin{verbatim} - + 1/4*topo_(1)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,Q1,-p1,-p2)* - node_(4,g,Q2,p1,-p3)*node_(5,g,p2,-p4,-p5)*node_(6,g,p3,p4,p5) -\end{verbatim} -\item[edge\_] It is also possible to generate the diagrams in terms of -edges, either with the nodes: +The coupling should be a (product of) symbol(s) to integer powers. +Symbols used here will be declared automatically if not already declared. + +Multiple models, with different names, may be defined within a single \FORM{} +script. Some concrete examples follow: + \begin{verbatim} - + 1/4*topo_(1)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,Q1,-p1,-p2)* - node_(4,g,Q2,p1,-p3)*node_(5,g,p2,-p4,-p5)*node_(6,g,p3,p4,p5)*edge_(1, - Q1,1,3)*edge_(2,Q2,2,4)*edge_(3,p1,3,4)*edge_(4,p2,3,5)*edge_(5,p3,4,6)* - edge_(6,p4,5,6)*edge_(7,p5,5,6) + Model PHI3; + Particle phi, +1; + Vertex phi,phi,phi: g; + EndModel; \end{verbatim} -or without the nodes: + \begin{verbatim} - - 2*topo_(1)*edge_(1,glu(Q1),1,3)*edge_(2,glu(Q2),2,4)*edge_(3,QUA(p1), - 3,4)*edge_(4,qua(p2),3,5)*edge_(5,QUA(p3),4,6)*edge_(6,qua(p4),5,6)* - edge_(7,glu(p5),5,6) + Model PHI4; + Particle phi, +1; + Vertex phi,phi,phi,phi: g^2; + EndModel; \end{verbatim} -Edges are only given when the options ask for it. -\item[block\_] A block is a subdiagram that is connected to the remaining -part of the diagram by a single vertex. These blocks are only given if the -options ask for it. -\end{description} -Options are provided by means of the sum of a number of predefined -preprocessor variables. They are -\begin{description} -\item[ONEPI\_] One-particle irreducible subgraphs only. -\item[WITHOUTINSERTIONS\_] No internal higher order propagators. -\item[NOTADPOLES\_] No tadpoles. -\item[SYMMETRIZE\_] Symmetrize in terms of the external legs. -\item[TOPOLOGIESONLY\_] Generate only topologies. -\item[NONODES\_] Do not put the nodes in the output. -\item[WITHEDGES\_] Put the edges in the output. -\item[WITHBLOCKS\_] Put the blocks in the output. -\item[NOSNAILS\_] No snails in the output. -\item[NOEXTSELF\_] No external self-energy subgraphs. -\item[WITHONEPISETS\_] Print the function onepi\_ containing the -one-particle irreducible subsets. -\end{description} - -When using the WITHOUTINSERTIONS\_ option one can obtain these higher order -subgraphs by adapting the definition of the model. Here we show this for -QCD: \begin{verbatim} - #do i = 0,`LOOPS' - Model QCD`i'; - Particle qua,QUA,-2; - Particle gho,GHO,-1; - Particle glu,+3; - Vertex qua,QUA,glu:g; - Vertex gho,GHO,glu:g; - Vertex glu,glu,glu:g; - Vertex glu,glu,glu,glu:g^2; - #do j = 1,`i'-1 - Vertex qua,QUA:g^{2*`j'}; - Vertex gho,GHO:g^{2*`j'}; - Vertex glu,glu:g^{2*`j'}; - #enddo + Model QCD; + Particle qua,QUA, -2; + Particle gho,GHO, -1; + Particle glu, +3; + Vertex QUA,qua,glu: g; + Vertex GHO,gho,glu: g; + Vertex glu,glu,glu: g; + Vertex glu,glu,glu,glu: g^2; EndModel; - #enddo \end{verbatim} -We see here a number of two-point verticles with a higher power of the -coupling constants. This gives, omitting the quarks and the ghosts: -\begin{verbatim} - #define LOOPS "3" - #do i = 0,`LOOPS' - Model QCD`i'; - Particle qua,QUA,-2; - Particle gho,GHO,-1; - Particle glu,+3; - Vertex qua,QUA,glu:g; - Vertex gho,GHO,glu:g; - Vertex glu,glu,glu:g; - Vertex glu,glu,glu,glu:g^2; - #do j = 1,`i'-1 - EndModel; - #enddo - Vector Q,Q1,...,Q7,p,p0,...,p21; - Symbols x1,x2,n1,...,n14; - Indices j1,j2,i1,...,i21; - Set QQ:Q1,...,Q7; - Set pp:p1,...,p21; - Set empty:; - .global - L Fprop`LOOPS' = diagrams_(QCD`LOOPS',{glu,glu},empty,QQ,pp,`LOOPS', - `OnePI_'+`NoTadpoles_'+`Symmetrize_'+`TopologiesOnly_'); - Print +f +s; - .end -Time = 0.00 sec Generated terms = 46 - Fprop3 Terms in output = 46 - Bytes used = 17788 +% TODO: reinstate this example once we have it working in the new grcc setup. +%In some cases one might want to generate diagrams in which the internal +%(multi)loop propagators are represented as special edges. This requires the +%definition of more complicated models as in +%\begin{verbatim} +% #do i = 0,`LOOPS' +% Model QCD`i'; +% Particle qua,QUA,-2; +% Particle gho,GHO,-1; +% Particle glu,+3; +% Vertex qua,QUA,glu:g; +% Vertex gho,GHO,glu:g; +% Vertex glu,glu,glu:g; +% Vertex glu,glu,glu,glu:g^2; +% #do j = 1,`i'-1 +% Vertex qua,QUA:g^{2*`j'}; +% Vertex gho,GHO:g^{2*`j'}; +% Vertex glu,glu:g^{2*`j'}; +% #enddo +% EndModel; +% #enddo +%\end{verbatim} +%in which the two-point vertices are the propagators with j loops. As one +%can see in this example, one can have vertices with identical particle +%contents but different powers of the coupling constants. - Fprop3 = - + 1/4*topo_(1)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,Q1,-p1,-p2)* - node_(4,g,Q2,p1,-p3)*node_(5,g,p2,-p4,-p5)*node_(6,g,p3,p4,-p6)*node_(7, - g,p5,-p7,-p8)*node_(8,g,p6,p7,p8) - + ... - + 1/2*topo_(10)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,-p1,-p2,-p3)* - node_(4,g,p1,-p4,-p5)*node_(5,g,Q1,p2,-p6)*node_(6,g,Q2,p4,p6)*node_(7, - g^2,p3,p5) - + ... - + 1/4*topo_(28)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,Q1,-p1,-p2)* - node_(4,g,Q2,-p3,-p4)*node_(5,g^2,p1,p3)*node_(6,g^2,p2,p4) - + ... - + 1/2*topo_(44)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g,Q1,-p1,-p2)* - node_(4,g,Q2,p1,-p3)*node_(5,g^4,p2,p3) - + 1/4*topo_(45)*node_(1,1,-Q1)*node_(2,1,-Q2)*node_(3,g^2,-p1,-p2)* - node_(4,g^2,Q1,p1,-p3,-p4)*node_(5,g^2,Q2,p2,p3,p4) - + ... - ; -\end{verbatim} -With the quarks and the ghosts there are 202 diagrams. One can see in -topo\_(44) that we have a two-loop propagator, indicated by node\_(5,...). -In topo\_(10) and topo\_(45) we see a single one-loop propagator. In -topo\_(28) we see the diagram with two one-loop propagators. In we omit the -TopologiesOnly\_ option, we will obtain the full diagrams with the same -topo\_ indicators. A few of those diagrams are: +Once a Model has been defined, Feynman graphs may be generated with the +new ``diagrams\_''\index{diagrams\_}\index{function!diagrams\_}\index{diagrams!diagrams\_} function, +which has the following syntax: \begin{verbatim} - - topo_(28)*node_(1,1,glu(-Q1))*node_(2,1,glu(-Q2))*node_(3,g,qua(-p1), - QUA(-p2),glu(Q1))*node_(4,g,qua(-p4),QUA(-p3),glu(Q2))*node_(5,g^2,qua( - p3),QUA(p1))*node_(6,g^2,qua(p2),QUA(p4)) - - topo_(28)*node_(1,1,glu(-Q1))*node_(2,1,glu(-Q2))*node_(3,g,gho(-p1), - GHO(-p2),glu(Q1))*node_(4,g,gho(-p4),GHO(-p3),glu(Q2))*node_(5,g^2,gho( - p3),GHO(p1))*node_(6,g^2,gho(p2),GHO(p4)) - + 1/2*topo_(28)*node_(1,1,glu(-Q1))*node_(2,1,glu(-Q2))*node_(3,g,glu( - Q1),glu(-p1),glu(-p2))*node_(4,g,glu(Q2),glu(-p3),glu(-p4))*node_(5,g^2, - glu(p1),glu(p3))*node_(6,g^2,glu(p2),glu(p4)) + diagrams_(model_name, incoming_particle_set, outgoing_particle_set, + external_momenta_set, internal_momenta_set, + number_of_loops_or_couplings, options); \end{verbatim} - -In version 4.3 there existed also the topologies\_ and the phi\_ -functions to just generate topologies. This was before a complete -implementation was made. For backward compatibility we have kept these -functions, but in the future they may become obsolete. - -For people who have programs that rely on the topologies\_ function we give -here nevertheless the syntax and a few examples -% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS -% WELL! (Diagrams_1) +Here, \texttt{model\_name} is the name of the user-defined Model, +and \texttt{incoming\_particle\_set} and \texttt{outgoing\_particle\_set} are +\FORM{} sets of Particle names, for example ``\texttt{\{phi\}}'' or +``\texttt{\{glu,glu\}}'', representing the desired scattering amplitude. +At two or more loops, it is also possible to generate vacuum graphs by +specifying empty sets for both the incoming and outgoing particles. +\texttt{external\_momenta\_set} and \texttt{internal\_momenta\_set} are \FORM{} +sets of vectors to be used to represent internal and external particle +momenta, respectively. These can be defined sets, such as \begin{verbatim} - Vectors Q1,Q2,p1,...,p8; - Set QQ:Q1,Q2; - Set PP:p1,...,p8; - #define LOOPS "2" - Local F = topologies_(`LOOPS',2,{3,},QQ,PP); - Print +f +s; - .end - - F = - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,p1,-p3)* - node_(4,p2,-p4,-p5)*node_(5,p3,p4,p5) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,p1,-p3,-p4)* - node_(4,p2,p3,-p5)*node_(5,Q2,p4,p5) - ; + Vector q1,...,q10, k1,...,k10; + Set ext : q1,...,q10; + Set int : k1,...,k10; \end{verbatim} -Here the second parameter indicates the number of external legs, the third -parameter is a set that tells, in this case, that 3-point vertices are -allowed, QQ is the set of external momenta and PP is the set of internal -momenta. The function node\_ is a built-in function to indicate the -vertices. +or defined dynamically in the call of diagrams\_ by providing, for example, +\{q1,q2\}. +The vectors in the external and internal sets must not come with a minus sign, +and the sets must not contain any repeated entries. +The \texttt{number\_of\_loops\_or\_couplings} can be set either to a number +denoting the number of loops required, or to specific powers of the coupling +constants used in the Model vertices, for example +``\texttt{g\^{}2}'' or ``\texttt{gs\^{}2 * gw\^{}2}''. -If one would like to allow more types of vertices one may change -the third parameter: -% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS -% WELL! (Diagrams_2) -\begin{verbatim} - Vectors Q1,Q2,p1,...,p8; - Set QQ:Q1,Q2; - Set PP:p1,...,p8; - #define LOOPS "2" - Local F = topologies_(`LOOPS',2,{3,4},QQ,PP); - Print +f +s; - .end +Finally, the \texttt{options} argument can be used to control the generation +and output formatting of the graphs. +The options are \FORM{} pre-processor variables, and should be added together. +If no filtering options are specified +(by passing ``\texttt{0}'' or omitting the argument entirely), all connected +graphs are generated. +The graph-filtering keywords are defined to be compatible with their +counterparts in QGRAF and +are given below. Options which are inverse to each other may not be specified +simultaneously. +The user must be careful not to accidentally specify a keyword twice; this +will not have the intended effect, but rather +generate a different keyword entirely. This subtlety may be improved in the +future. +\begin{description} + \item[\textbf{\texttt{`OnePI\_'}, \texttt{`OnePR\_'}}:] + \index{diagrams!onepi}\index{diagrams!onepr} + generate only one-particle irreducible (reducible) graphs. + \item[\textbf{\texttt{`OnShell\_'}, \texttt{`OffShell\_'}:}] + \index{diagrams!onshell}\index{diagrams!offshell} + generate only graphs without (with) self-energy corrections on external lines. + \item[\textbf{\texttt{`NoSigma\_'}, \texttt{`Sigma\_'}:}] + \index{diagrams!nosigma}\index{diagrams!sigma} + generate only graphs without (with) any self-energy corrections on any line. + \item[\textbf{\texttt{`NoSnail\_'}, \texttt{`Snail\_'}:}] + \index{diagrams!nosnail}\index{diagrams!snail} + generate only graphs without (with) snails. + \item[\textbf{\texttt{`NoTadpole\_'}, \texttt{`Tadpole\_'}:}] + \index{diagrams!notadpole}\index{diagrams!tadpole} + generate only graphs without (with) tadpoles. + \item[\textbf{\texttt{`Simple\_'}, \texttt{`NotSimple\_'}:}] + \index{diagrams!simple}\index{diagrams!notsimple} + generate only graphs without (with) any vertices connected by two or more edges. + \item[\textbf{\texttt{`Bipart\_'}, \texttt{`NonBipart\_'}:}] + \index{diagrams!bipart}\index{diagrams!nonbipart} + generate only bipartite (non-bipartite) graphs. + \item[\textbf{\texttt{`CyclI\_'}, \texttt{`CyclR\_'}:}] + \index{diagrams!cycli}\index{diagrams!cyclr} + generate only cycle irreducible (reducible) graphs. + \item[\textbf{\texttt{`Floop\_'}, \texttt{`NotFloop\_'}:}] + \index{diagrams!floop}\index{diagrams!notfloop} + generate only graphs which do not (do) contain closed fermion loops with an odd number of vertices. +\end{description} +Graph generation is further controlled with the options: +\begin{description} + \item[\textbf{\texttt{`WithSymmetrizeI\_'}, \texttt{`WithSymmetrizeF\_'}:}] + \index{diagrams!withsymmetrizei}\index{diagrams!withsymmetrizef} + symmetrize between the initial (final) state particles. For example, when generating a boson + propagator one could define both external particles as incoming and provide the + \texttt{`WithSymmetrizeI\_'} option. + \item[\textbf{\texttt{`TopologiesOnly\_'}:}] + \index{diagrams!topologiesonly} + generate only the distinct topologies which appear + in the requested amplitude. In this mode, Particle information is not given in the + output, but only the momenta flowing into each vertex. + The topology numbering in the \texttt{topo\_}\index{topo\_}\index{function!topo\_}\index{diagrams!topo\_} tags is consistent with and without + this option, such that graphs in the full output are produced with their topologies + already identified. Preparatory work can be performed efficiently at the level of the + topologies before processing the full graph output. +\end{description} +In addition to the filtering keywords, the following options control the formatting of the output: +\begin{description} + \item[\textbf{\texttt{`WithEdges\_'}:}] + \index{diagrams!withedges} + produce also \texttt{edge\_} functions which contain propagator momenta and the numbers of the vertices to which they connect. + \item[\textbf{\texttt{`WithoutNodes\_'}:}] + \index{diagrams!withoutnodes} + omit the \texttt{node\_} functions, which describe the fields and momenta which flow into each vertex. + \item[\textbf{\texttt{`WithBlocks\_'}:}] + \index{diagrams!withblocks} + \index{block\_}\index{function!block\_}\index{diagrams!block\_}tag each graph's ``blocks'', sub-graphs which are connected to the rest of the graph by a single vertex, in the \texttt{block\_} function. + \item[\textbf{\texttt{`WithOnePISets\_'}:}] + \index{diagrams!withonepisets} + \index{onepi\_}\index{function!onepi\_}\index{diagrams!onepi\_}tag each graph's one-particle irreducible subsets of vertices in the \texttt{onepi\_} function. +\end{description} - F = - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,Q2,-p1,-p2)*node_(3,p1,p2,-p3,p3 - ) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,p1,-p3)* - node_(4,p2,p3,-p4,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,p1,-p3)* - node_(4,p2,-p4,-p5)*node_(5,p3,p4,p5) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,-p3,-p4)* - node_(4,p1,p2,p3,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,p1,-p3,-p4)* - node_(4,Q2,p2,p3,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,p1,-p3,-p4)* - node_(4,p2,p3,-p5)*node_(5,Q2,p4,p5) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2,-p3)*node_(3,Q2,p1,p2,p3 - ) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,-p1,-p2,-p3)*node_(3,Q2,p1,-p4)* - node_(4,Q1,p2,p3,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,-p1,-p2,-p3)*node_(3,p1,p2,-p4)* - node_(4,Q1,Q2,p3,p4) - ; +With the above options and example models in mind, we now display some example output from the +generator. The options: +\begin{verbatim} + Local gluglu1 = diagrams_(QCD, {glu}, {glu}, int, ext, 1, + `WithEdges_'+`OnShell_'+`NoTadpole_'+`NoSnail_'); \end{verbatim} -and suddenly there are 9 topologies. - -In the above configuration the program sees the external lines as -different. If there is however a symmetry between the two external lines of -a propagator-like diagram (as is the case with boson propagators) one can -indicate this by putting a minus sign in front of the number 2: -% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS -% WELL! (Diagrams_3) +produce: \begin{verbatim} - Vectors Q1,Q2,p1,...,p8; - Set QQ:Q1,Q2; - Set PP:p1,...,p8; - #define LOOPS "2" - Local F = topologies_(`LOOPS',-2,{3,4},QQ,PP); - Print +f +s; - .end - - F = - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,Q2,-p1,-p2)*node_(3,p1,p2,-p3,p3 - ) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,p1,-p3)* - node_(4,p2,p3,-p4,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,p1,-p3)* - node_(4,p2,-p4,-p5)*node_(5,p3,p4,p5) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,-p3,-p4)* - node_(4,p1,p2,p3,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,Q2,-p3,-p4)* - node_(4,p1,p3,-p5)*node_(5,p2,p4,p5) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2)*node_(3,p1,-p3,-p4)* - node_(4,Q2,p2,p3,p4) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,Q1,-p1,-p2,-p3)*node_(3,Q2,p1,p2,p3 - ) - + node_(0,-Q1)*node_(1,-Q2)*node_(2,-p1,-p2,-p3)*node_(3,p1,p2,-p4)* - node_(4,Q1,Q2,p3,p4) + gluglu1 = + - + topo_(1) + *node_(1,1,glu(-k1)) + *node_(2,1,glu(-k2)) + *node_(3,g,QUA(-q1),qua(-q2),glu(k1)) + *node_(4,g,QUA(q2),qua(q1),glu(k2)) + *edge_(1,glu(k1),1,3) + *edge_(2,glu(k2),2,4) + *edge_(3,qua(q1),3,4) + *edge_(4,QUA(q2),3,4) + - + topo_(1) + *node_(1,1,glu(-k1)) + *node_(2,1,glu(-k2)) + *node_(3,g,GHO(-q1),gho(-q2),glu(k1)) + *node_(4,g,GHO(q2),gho(q1),glu(k2)) + *edge_(1,glu(k1),1,3) + *edge_(2,glu(k2),2,4) + *edge_(3,gho(q1),3,4) + *edge_(4,GHO(q2),3,4) + + + 1/2 + *topo_(1) + *node_(1,1,glu(-k1)) + *node_(2,1,glu(-k2)) + *node_(3,g,glu(k1),glu(-q1),glu(-q2)) + *node_(4,g,glu(k2),glu(q1),glu(q2)) + *edge_(1,glu(k1),1,3) + *edge_(2,glu(k2),2,4) + *edge_(3,glu(q1),3,4) + *edge_(4,glu(q2),3,4) ; \end{verbatim} -Now the program assumes this symmetry and one notices only 8 topologies -remaining. -In the case of the topologies\_ function there are no combinatorics -factors. This will of course be different with the future function -diagrams\_. +The \texttt{node\_}\index{node\_}\index{function!node\_}\index{diagrams!node\_} function arguments give their id number, the coupling +associated with the vertex they represent, and the Particle fields +which connect to them (which are functions of the incoming momenta). +The \texttt{edge\_}\index{edge\_}\index{function!edge\_}\index{diagrams!edge\_} function arguments give their id number, the +Particle and momentum of the associated propagator, and the id +numbers of the \texttt{node\_} functions which they connect. +External particles have a special \texttt{node\_} function containing a +single field and a coupling of 1. -That this function is very fast can be seen when one generates all -topologies of a 6-loop propagator with only 3-point vertices: -% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS -% WELL! (Diagrams_4) +Specifying additionally \texttt{`TopologiesOnly\_'} produces just the single +contributing topology: \begin{verbatim} - Vectors Q1,Q2,p1,...,p17; - Set QQ:Q1,Q2; - Set PP:p1,...,p17; - #define LOOPS "6" - Local F = topologies_(`LOOPS',-2,{3,},QQ,PP); - .end - -Time = 0.85 sec Generated terms = 2793 - F Terms in output = 2793 - Bytes used = 2010976 + gluglu1 = + + + topo_(1) + *node_(1,1,-k1) + *node_(2,1,-k2) + *node_(3,g,k1,-q1,-q2) + *node_(4,g,k2,q1,q2) + *edge_(1,k1,1,3) + *edge_(2,k2,2,4) + *edge_(3,q1,3,4) + *edge_(4,q2,3,4) + ; \end{verbatim} -This is very much faster than the program that is used most widely. - -The program to do this with the diagrams\_ function is: -\begin{verbatim} - #define LOOPS "6" - Model PHI3; - Particle phi,+1; - Vertex phi,phi,phi:g; - EndModel; - Vector Q1,Q2,p1,...,p{3*`LOOPS'}; - Set QQ:Q1,Q2; - Set pp:p1,...,p{3*`LOOPS'}; - Set empty:; - Local F = diagrams_(PHI3,{phi,phi},empty,QQ,pp,`LOOPS', - `OnePI_'+`NoTadpoles_'+`Symmetrize_'+`TopologiesOnly_'); - .end +In this case, Particle information is omitted from the \texttt{node\_} and \texttt{edge\_} functions. +The \texttt{topo\_} tags are consistent with the tags present in the full graph +output, produced when \texttt{`TopologiesOnly\_'} is not specified. -Time = 0.85 sec Generated terms = 2793 - F Terms in output = 2793 - Bytes used = 2010976 -\end{verbatim} -and without the symmetry: -% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS -% WELL! (Diagrams_6) -\begin{verbatim} - #define LOOPS "6" - Model PHI3; - Particle phi,+1; - Vertex phi,phi,phi:g; - EndModel; - Vector Q1,Q2,p1,...,p{3*`LOOPS'}; - Set QQ:Q1,Q2; - Set pp:p1,...,p{3*`LOOPS'}; - Set empty:; - Local F = diagrams_(PHI3,{phi,phi},empty,QQ,pp,`LOOPS', - `OnePI_'+`NoTadpoles_'+`TopologiesOnly_'); - .end +To assist with debugging configuration problems or to see more information on +the internals of the diagram generator, one may specify ``On GrccVerbose;''. -Time = 0.15 sec Generated terms = 4999 - F Terms in output = 4999 - Bytes used = 3599296 -\end{verbatim}