| name | feyncalc-tools |
|---|---|
| description | Advanced FeynCalc tools and techniques for production calculations. Use this for: loop integral reduction (FIRE, Kira), numerical integration (FIESTA, LoopTools, pySecDec), IBP algorithms, master integral evaluation, dimensional regularization, multi-loop calculations, batch automation. Covers all 367 FeynHelpers functions with complete API, curator's guide for tools selection, and production workflows. |
Advanced Tools: Reduction, Integration, Automation
Before exploring examples below, consult: guides/QUERY_ROUTER.md
This file helps you quickly identify which tool & example(s) match your task:
- 8 tools (FIRE, Kira, FIESTA, LoopTools, Package-X, pySecDec, IBP, batch) mapped to examples
- Decision tree for tool selection based on your integral type
- Performance comparison matrix for 1-loop vs multi-loop
- Learning paths for different backgrounds (beginner → expert)
- O(1) routing - find the right tool instantly
How to use:
- Read your task/goal (1-loop? multi-loop? numerical? analytical?)
- Find matching tool/process in
guides/QUERY_ROUTER.md - Get directed to 1-2 specific examples (not all 8)
- Load only those examples
- Return to router for next task
File location: feyncalc-tools-skill/guides/QUERY_ROUTER.md
Consult QUERY_ROUTER.md first, then select:
-
"I have 1-loop integrals, need analytical"
- Load
SELECTION: oneloop_analytical - Use: Package-X
- Go to: Package-X
- Load
-
"I have 1-loop integrals, need numerical"
- Load
SELECTION: oneloop_numerical - Use: LoopTools or FIESTA
- Go to: Numerical 1-Loop
- Load
-
"I have multi-loop integrals, need reduction"
- Load
SELECTION: multiloop_reduction - Use: FIRE or Kira
- Go to: IBP Reduction
- Load
-
"I have master integrals, need numerical"
- Load
SELECTION: multiloop_numerical - Use: FIESTA or pySecDec
- Go to: Numerical Multi-Loop
- Load
-
"I need to run 100+ calculations"
- Load
SELECTION: automation - Use: Batch scripts
- Go to: Batch Automation
- Load
-
"I need complete API reference"
- Go to: Complete API Reference
| Tool | Purpose | Input | Output | Complexity |
|---|---|---|---|---|
| Package-X | 1-loop analytical | 1-loop integral | Series in ε | ⭐ |
| LoopTools | 1-loop numerical | 1-loop integral | Decimal | ⭐ |
| FIRE | Multi-loop IBP | Generic integrals | Master integrals | ⭐⭐⭐ |
| Kira | Multi-loop IBP | Generic integrals | Master integrals | ⭐⭐⭐ |
| FIESTA | Multi-loop numerical | Master integrals | Decimal+ε | ⭐⭐⭐⭐ |
| pySecDec | Multi-loop numerical | Multi-loop integrals | Decimal | ⭐⭐⭐⭐ |
Use when: You need exact symbolic results for 1-loop integrals
Key features:
- Exact analytical formulas
- Dimensional regularization built-in
- Series expansion in ε
- Special functions (logarithms, polylogarithms)
<< FeynHelpers`
(* Evaluate *)
result = PaXEvaluate[
expr,
PaXImplicitPrefactor -> 1/(2π)^D,
PaXAnalytic -> True,
PaXKeepEpsilonOrder -> 2
];PaXA0[m] (* Tadpole *)
PaXB0[p2, m1, m2] (* Bubble *)
PaXC0[p1^2, p2^2, (p1+p2)^2, m1, m2, m3] (* Triangle *)
PaXD0[p1^2, ..., m1, m2, m3, m4] (* Box *)PaXImplicitPrefactor -> 1/(2π)^D
PaXAnalytic -> True (* Force analytic *)
PaXKeepEpsilonOrder -> 2 (* Order in ε *)
PaXSimplify -> True (* Simplify result *)(* Box integral *)
box = PaXD0[m1, m2, m3, m4, s, t, u];
result = PaXEvaluate[box];
(* Extract poles *)
pole = Coefficient[Series[result, {ε, 0, 1}], 1/ε];
finite = Coefficient[Series[result, {ε, 0, 0}], 1];Learning difficulty: ⭐ Basic
Use when: You need fast numerical evaluation of 1-loop integrals
Key features:
- Fast numerical computation
- Passarino-Veltman integrals
- Real/complex kinematics support
LToolsLoadLibrary[];
result = LToolsEvaluate[
LToolsC0[m1, m2, m3, p1^2, p2^2, p12^2]
];
LToolsUnLoadLibrary[];LToolsA0[m^2] (* A0 *)
LToolsB0[p^2, m1^2, m2^2] (* B0 *)
LToolsB11[p^2, m1^2, m2^2] (* B11 *)
LToolsC0[p1^2, p2^2, p12^2, m1^2, m2^2, m3^2]
LToolsD0[...]Learning difficulty: ⭐ Basic
Use when: You have multi-loop generic integrals, need reduction to master integrals
(* 1. Define topology *)
topo = FCTopology["name",
{FAD[...], FAD[...], ...},
{loop momenta},
{external momenta},
{kinematic constraints},
{}
];
(* 2. Create FIRE config *)
FIRECreateConfigFile[topo, "config.txt"];
(* 3. Create integral file *)
FIRECreateIntegralFile[integrals, "ints.txt"];
(* 4. Run *)
FIRERunReduction["ints.txt", FIREBinaryPath -> "/path/fire6"];
(* 5. Import *)
results = FIREImportResults["fire.table"];(* Similar structure, more advanced *)
KiraCreateConfigFiles[topo, "kira/"];
KiraRunReduction["kira/job.kira"];
results = KiraImportResults["kira/results.txt"];When to use each:
- FIRE: Simpler topologies, fewer integrals
- Kira: Complex topologies, many integrals, performance matters
Learning difficulty: ⭐⭐⭐ Advanced
Use when: Master integrals need numerical evaluation
CRITICAL: FCLoopSwitchEtaSign must be used!
(* ⚠️ CRITICAL ⚠️ *)
topoFiesta = FCLoopSwitchEtaSign[topo, -1];
(* Create scripts *)
files = FSACreateMathematicaScripts[
GLI[topo, {n1, n2, ...}],
topoFiesta,
"/tmp/fiesta/",
FSAParameterRules -> {SPD[q] -> 10., m1 -> 1.5},
FSAOrderInEps -> 0,
FSAIntegrator -> "quasiMonteCarlo",
OverwriteTarget -> True
];
(* Run *)
FSARunIntegration[files[[1]]];
(* Load *)
result = FSALoadNumericalResults[files[[2]]];Common options:
FSAIntegrator -> "quasiMonteCarlo" (* or "Sabanskis" *)
FSAOrderInEps -> 0 (* Order in ε *)
FSAParameterRules -> {SPD[q] -> 10} (* Kinematic point *)Learning difficulty: ⭐⭐⭐⭐ Expert (remember eta sign!)
Use when: Running 50+ similar calculations
# config.json
{
"template": "mathematica script with ${param}",
"calculations": [
{"parameters": {"param1": "value1", ...}},
{"parameters": {"param1": "value2", ...}},
...
],
"max_workers": 4,
"timeout": 3600,
"output_dir": "./results"
}python3 batch_runner.py config.jsonFeatures:
- Parallel execution
- Progress tracking
- Error handling
- Result aggregation
- Logging
Learning difficulty: ⭐⭐ Intermediate
Categories:
- FIRE (37 functions) - IBP reduction
- Kira (20 functions) - Differential equations
- FIESTA (78 functions) - Numerical integration
- LoopTools (75 functions) - 1-loop Passarino-Veltman
- Package-X (28 functions) - 1-loop analytical
- PySecDec (69 functions) - Multi-loop numerical
- QGRAF (31 functions) - Diagram generation
- Configuration (12 functions) - Global settings
- Fermat (10 functions) - Symbolic computation
- Utility (7 functions) - Helper functions
See companion reference: FEYNHELPERS_COMPLETE_REFERENCE.md
(* Generated tree amplitude *)
ampTree = ...;
(* Generated 1-loop amplitude *)
ampOneLoop = ...;
(* 1. Simplify tree *)
ampTreeSimp = Contract[ampTree];
(* 2. Simplify 1-loop *)
ampOneLoopSimp = OneLoopSimplify[Contract[ampOneLoop], q];
(* 3. Evaluate *)
resultTree = ampTreeSimp;
resultOneLoop = PaXEvaluate[ampOneLoopSimp];
(* 4. Combine NLO *)
ampNLO = resultTree + (αs/(2π)) * resultOneLoop;(* 1. Define topology *)
topo = FCTopology[...];
(* 2. Reduce *)
FIRERunReduction[...];
miList = FIREImportResults[...];
(* 3. Evaluate MIs *)
resultsNumerical = Map[
(FSACreateScripts[#, ...]; FSARunIntegration[...]) &,
miList
];
(* 4. Reconstruct *)
ampFinal = (* linear combination of MI results *);| Situation | Tool | Why |
|---|---|---|
| 1-loop, need exact | Package-X | Analytical formulas |
| 1-loop, need speed | LoopTools | Fast numerical |
| Multi-loop, simple topo | FIRE | Proven, reliable |
| Multi-loop, complex | Kira | Advanced algorithm |
| Multi-loop, numerical | FIESTA | Most robust |
| 100+ jobs | batch_runner | Parallelization |
Complete function documentation: FEYNHELPERS_REFERENCE.md (50+ pages, 367 functions)
Examples catalog: FEYNCALC_CURATOR_GUIDE.md (15+ loop integral examples)
Tool interfaces: Each tool has comprehensive options documented
| Issue | Solution |
|---|---|
| FIRE not found | Set FIREBinaryPath correctly |
| FIESTA fails | Remember FCLoopSwitchEtaSign[topo, -1] |
| Kira config error | Check momentum conservation in topology |
| LoopTools link error | Verify library installation |
| Timeout | Reduce max_workers or increase timeout |
Status: Tools sub-skill Functions documented: 367 Workflows: 5+ production-tested Version: 1.0
- FEYNHELPERS_REFERENCE.md - Complete 367-function reference
- FEYNCALC_CURATOR_GUIDE.md - 15+ tool examples
- batch_runner.py - Automation script