Import["http://www.feyncalc.org/formlink/install.m"]
formlink.zip from here and extract the files
from the archive to the directory Applications in the directory $UserBaseDirectory,
which is by default located in the search path of Mathematica. Their values for different
platform are listed in TABLE I. Specifying
$installdirectory = mydir
HomeDirectory[], or $BaseDirectory.
| Platform | $UserBaseDirectory |
| Windows | C:\Users\username\AppData\Roaming\Mathematica |
| Linux | ~/.Mathematica |
| Mac OS X | ~/Library/Mathematica |
FormLink and FeynCalcFormLink are loaded and two simple examples are run, one uses FormLink:
FormLink[" AutoDeclare vector p; Local T = g_H0, p1,p2,p3,p4,p5,p6L; trace4 0; " (*, Form2M -> Identity *) (* <-- uncommenting returns a string *) ]; FORM and FormRead finished, time needed before translating to Mathematica: 0. sec Translation done. Total wall clock time needed: 0.2184 sec 4 p1.p6 p2.p5 p3.p4 - 4 p1.p5 p2.p6 p3.p4 + 4 p1.p2 p3.p4 p5.p6 - 4 p1.p6 p2.p4 p3.p5 + 4 p1.p4 p2.p6 p3.p5 + 4 p1.p5 p2.p4 p3.p6 - 4 p1.p4 p2.p5 p3.p6 + 4 p1.p6 p2.p3 p4.p5 - 4 p1.p3 p2.p6 p4.p5 + 4 p1.p2 p3.p6 p4.p5 - 4 p1.p5 p2.p3 p4.p6 + 4 p1.p3 p2.p5 p4.p6 - 4 p1.p2 p3.p5 p4.p6 + 4 p1.p4 p2.p3 p5.p6 - 4 p1.p3 p2.p4 p5.p6The other example executes
FeynCalcFormLink, which generates and runs the corresponding FORM program, substituting ASCII values for greek indices intermediately:
FeynCalcFormLink[DiracTrace[GA[μ,ν,ρ,σ,τ,α]]
-----------------------------------------------------------------------------------------
AutoDeclare Index lor;
Format Mathematica;
L resFL = (g_(1,lor2)*g_(1,lor3)*g_(1,lor4)*g_(1,lor5)*g_(1,lor6)*g_(1,lor1));
trace4,1;
contract 0;
.sort;
#call put("%E", resFL)
#fromexternal
-----------------------------------------------------------------------------------------
Piping the script to FORM and running FORM
Time needed by FORM : 0. seconds. FORM finished. Got the result back to Mathematica as a string.
Start translation to Mathematica/FeynCalc syntax
Total wall clock time used: 0.14 seconds. Translation to Mathematica and FeynCalc finished.