Gammaloop computes differential cross-sections using Local Unitarity
Project description
gammaLoop
Computation of differential cross-sections using Local Unitarity.
See www.alphaloop.ch for details on the theoretical framework and related literature.
See the wiki for more information on the project.
TL;DR: I want to be running γLoop already!
We salute the eagerness of our users.
If you want to jump right in, run the following to immediately start integrating the scalar three-loop mercedes diagram!
git clone https://github.com/alphal00p/gammaloop.git && cd gammaloop
./bin/compile.sh
./bin/gammaloop example/cards/scalar_mercedes.gL
Installation
> Requirements
-
Rust
: v1.77+ You can easily install Rust with this one-liner -
Python3
: v3.11+ (equipped withpip
, and thepython-devel
) -
GNU gcc
: v10+ (notclang
!) -
git
Note: The project has been tested on Linux and MacOS. However, on MacOS, the default clang
compiler is not supported due to lack of libquadmath
support, and GNU gcc
must be installed and setup as default compiler.
Windows users are encouraged to use WSL 2.
> Installation using pip
pip install gammaloop
gammaloop --build_dependencies
> Installation from sources
git clone https://github.com/alphal00p/gammaloop.git
cd gammaloop
./bin/compile.sh
The relevant binaries will then be in ./bin/
and the gammaloop python module is located at ./python/gammaloop
.
Note: Alternatively, the dependencies can be built within a python virtual environment as follows:
./bin/build_dependencies.sh clean
./bin/build_dependencies.sh with_venv
source `./bin/gammaloop -venv`
and when using the fish
shell, the last command should be replaced by: . (./bin/gammaloop -venv).fish
Tests
> Testing an installation from pip
Testing your installation can be done by running
python -m pytest
from within the installation directory of the gammaloop module, which you can cd
into with e.g.:
bash -c 'cd `python -c "import os; import gammaloop; print(os.path.dirname(gammaloop.__file__))"`; pwd'
> Testing an installation from sources
Run:
/bin/run_tests.sh python
/bin/run_tests.sh rust
Usage
There are three entry points to the GammaLoop
functionalities:
-
Preferred method is through the Python command-line interface
gammaloop
. -
Alternatively, the same functionalities can be accessed programmatically, e.g. in a Jupyter notebook, through the Python API, by importing the
gammaloop
library. -
Finally, expert users may also find it useful to steer some of functionalities directly from the rust binary
gammaloop_rust_cli
.
Both executables gammaloop
and gammaloop_rust_cli
are made available as scripts in the bin
directory.
The gammaloop
Python module is also exposed after installation and ready to be imported in user custom Python scripts.
1. Usage from the Python command-line interface: ./gammaloop
GammaLoop
is typically used through the python command-line interface gammaloop
.
Place your list of commands in a file named e.g. cmd.gL
, for instance:
# Content of file 'cmd.gL'
import_model sm --format ufo
export_model ./sm.yaml --format yaml
and run it with:
./gammaloop cmd.gL
You can find more information on the syntax of the available commands in the wiki and by running:
./gammaloop --help
to get an overview of available commands and:
./bin/gammaloop -c "help import_model"
to get help on any specific command.
You can find example of command files in the <MODULE_PATH>/data/run_cards/
directory.
2. Usage from within a Jupyter notebook: the Python API
Follow the example jupyter notebook given in example to get started with the Python API.
cd <GAMMALOOP_INSTALLATION_DIRECTORY>/examples/jupyter
jupyter notebook steer_gammaloop.ipynb
3. Usage from the rust binary executable: ./gammaloop_rust_cli
All typical usecases of GammaLoop
are available through the Python command-line interface mentioned earlier.
However, expert users might want to steer the Monte-Carlo integration directly using the gammaloop_rust_cli
binary.
This is possible throught the gammaloop_rust_cli
binary, which can be used as follows:
./bin/gammaloop_rust_cli --config <MODULE_PATH>/gammaloop/data/run_cards/rust_run_config.yaml
Note: You have to manually define your desired external momenta in this default rust_run_config.yaml
file.
You will find more information on the content of the run configuration file and steering options in the wiki and by running:
./bin/gammaloop_rust_cli --help
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for gammaloop-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f34541a51837fb8e05774218f491ebb8e3c11d78cfc501b376f5c47b607f21e |
|
MD5 | 812ab96ed5db08ca96db0ca4f50eff69 |
|
BLAKE2b-256 | cb93b3fb1047fabcf9bddbc970f1cd33191a4d45824ce24de6d20c9ebc876849 |
Hashes for gammaloop-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e36f653b43e694c45115ca5741617da3843d9e1c7e1a7155856895fd35203d20 |
|
MD5 | 27244a1861afac97fa1d059d6602db70 |
|
BLAKE2b-256 | 7f745d792935cf70114dad1654746ace5907bf8eb4fccb5661c7c9e4b0d8f6f0 |