The default installation method is a Git checkout in Mathematica's user Applications directory.
Clone LoopS together with its pinned FIRE and OPITeR dependencies:
cd /path/to/Mathematica/Applications
git clone --recurse-submodules https://github.com/BoxuanShi/LoopS.gitThe resulting package entry point should be located at
$UserBaseDirectory/Applications/LoopS/LoopS.m. Load it in Mathematica with:
Needs["LoopS`"]Existing Git installations can be updated with:
cd /path/to/Mathematica/Applications/LoopS
git status
git pull --ff-only
git submodule sync --recursive
git submodule update --init --recursiveCheck git status before updating and preserve any local Config.m customizations. Restart the
Mathematica kernel after an update so that no definitions from the previous version remain loaded.
If LoopS was cloned without --recurse-submodules, initialize its pinned dependencies with:
git submodule update --init --recursiveGitHub-generated source archives do not contain submodule files. Use a Git clone with initialized submodules rather than downloading an automatically generated source archive.
An example notebook is provided in Examples/Notebook/examples.nb.
You can open this notebook to learn how to use LoopS step by step.
The same setup can also be run from a terminal through WolframScript:
wolframscript -file Examples/Scripts/run-all.wlIndividual script examples are available in Examples/Scripts/ and load LoopS from the same source
tree, so they validate the current checkout without using another installed copy.
Input amplitudes are stored in Examples/Inputs/, while verified reference outputs for script tests are stored in Examples/References/.
External-reducer state is isolated by integral family. FIRE, Kira, and BLADE place each family's
configuration, scripts, logs, databases, and results below a distinct
IBPReduction/<Reducer>/<family-name><number>/ directory. AMFlow likewise uses one
AMFlow/<family-name><number>/ directory per family so its scripts, results, logs, and default
cache do not collide with another family. FIRERunDirectory, KiraRunDirectory,
BladeRunDirectory, and AMFlowRunDirectory expose the resolved locations. Existing flat FIRE or
BLADE results remain readable, but new runs are written only to the isolated layout.
Run the fast loading and core-function tests with:
wolframscript -file Tests/run-tests.wlRun the complete example regression suite, including the PionEMFF FIRE reduction, with:
wolframscript -file Examples/Scripts/run-all.wlBoth commands return a nonzero exit code when a test fails. Runtime files generated by the
headless tests are kept under their corresponding LoopSFile/ directories and are ignored by Git.
Kira is an optional external reducer. Its real integration test can be run with:
LOOPS_KIRA_EXECUTABLE=/path/to/kira \
LOOPS_KIRA_FERMAT_EXECUTABLE=/path/to/fer64 \
wolframscript -file Tests/kira-integration.wlThe test reduces the same one-loop family with FIRE and Kira, then checks the master basis and all
requested reduction rules symbolically. LOOPS_KIRA_FERMAT_EXECUTABLE is optional when Kira can
already find Fermat through FERMATPATH or PATH.
The Git checkout uses the following third-party modules or interfaces:
- FeynCalc
- The Mathematica components of FIRE 7
- MultivariateApart
- OPITeR (included as a Git submodule)
LoopS also provides an interface to external Kira. The
Kira executable is not included in this repository; set $KiraExecutable in Config.m or pass "KiraExecutable" to
KiraIBPReduction. $KiraFermatExecutable defaults to Automatic, allowing Kira to find Fermat
through FERMATPATH or PATH. Set it in Config.m, or pass
"KiraFermatExecutable" -> "/absolute/path/to/fer64", to have LoopS provide FERMATPATH only to
the Kira child process. The interface defaults to integral_ordering: 2, which ranks irreducible
scalar-product numerators as more complicated than dotted positive propagator powers and therefore
prefers a positive-power master basis. Kira's per-family --parallel value defaults to
LoopSParallelKernels, matching FIRE's internal parallelism policy; pass "KiraParallel" -> 1 for
the conservative single-worker mode. LoopS derives Kira's maximal top_level_sectors from the
requested targets with FindTopSectors; auxiliary propagators that occur only with zero or negative
powers are not incorrectly promoted to positive lines. The targets added by FindCompleteGList
remain in Kira's mandatory list and determine the generated r and s bounds. Each family and
ordering uses an isolated Kira state directory.
Additionally, some functions are modified from the CalcLoop package, which is licensed under the MIT License.
The repository does not include FIRE's compiled binaries, Fermat, build dependencies, or
third-party extra/ tree. See THIRD_PARTY_NOTICES.md for component versions, upstream links, and
the applicable license notices.
Note:
- Users can also customize the paths of dependencies and interfaces by editing the
Config.mfile located in the main LoopS directory. This allows you to specify where external packages (e.g., FeynCalc, FIRE, MultivariateApart, OPITeR) are installed on your system. - Git source downloads may not include FIRE or OPITeR submodule contents. LoopS reports the missing optional component without downloading code at runtime.
- LoopS supports Mathematica 14.0 or later and is tested on Mathematica 14.0.
- FORM (Source code also available on GitHub): Required for OPITeR. Please install FORM separately if you intend to use OPITeR features.
LoopS can be used without OPITeR, but the efficiency of Passarino–Veltman reduction will be significantly reduced in complex cases if OPITeR is not available.
- LoopS is licensed under GPL-3.0; see
LICENSE. - Bundled third-party components retain their own copyright and license notices; see
THIRD_PARTY_NOTICES.mdand the license files included with those components.
- In notebooks, LoopS uses the current notebook directory for generated files. Please save your notebook before loading LoopS.
- In terminal scripts, LoopS uses the script directory as the same base directory. When loaded with
wolframscript -code, it falls back to the current shell directory.
If you use LoopS in your research, please cite it as: Shi, Bo-Xuan. LoopS: A Mathematica package for Feynman amplitudes reduction. Zenodo, 2025. DOI: 10.5281/zenodo.17383900