Skip to main content

No project description provided

Project description

ABEL: the Adaptable Beginning-to-End Linac framework

abel_logo

The ABEL simulation framework is a particle-tracking framework for multi-element particle accelerators (such as plasma-accelerator linacs, colliders, experimental test facilities, etc.), implemented at varying levels of complexity, for fast investigations or optimizations. As a systems code, it can be used for physics simulations as well as generating (and optimizing for) cost estimates.

Installation of ABEL

The project name is abel-framework, which contains the abel package with various sub-packages. The project homepage is: https://github.com/abel-framework/ABEL/

ABEL needs Python v3.11, due to requirements from some dependencies.

1. Creating a Pyton environment for ABEL:

Using venv

Make and activate a new Python (version 3.11) virtual environment for ABEL:
python3.11 -m venv your_abel_venv and source your_abel_venv/bin/activate

Using conda

If not already done, setup conda-forge:
conda config --add channels conda-forge and conda config --set channel_priority strict

Make and activate a new Python conda environment for ABEL:
conda create -p abel-2026 python=3.12 and conda activate /home/kyrsjo/CONDA/abel-2026

You may consider to then manually install some packages:
conda install numpy scipy numba matplotlib tqdm PyQt6 pyqtgraph toml dill

2. Installing abel into the Python environment

Standard installation from PyPi

After preparing the Python environment, simply run:
pip install abel-framework
This will also install any missing dependencies in the right versions, including Wake-T, RF-Track, CLICopti, ax-platform, and impactx.

To remove ABEL from the python environment, run pip uninstall abel-framework.

Editable installation from GitHub with pip (for development)

To install a specific version from GitHub, e.g. for development, you first need to clone the repository to a local folder:
git clone https://github.com/abel-framework/ABEL
Note that if you intend to contribute (push) to ABEL, cloning with SSH instead of HTTPS is reccomended.

Once the repository has been cloned, in your target python environment, run
pip install -e path-to-ABEL where path-to-ABEL is the folder you have cloned ABEL to.

If you want to be able to modify ABEL without uninstalling and reinstalling, you can instead run
pip install -e path-to-abel
Changes to the files in the folder src\abel will be reflected in the installed package, as if you had put it into your $PYTHONPATH.

To remove ABEL, run pip uninstall abel-framework.

Configuration of ABEL

To use ABEL, you must configure it. This is done with the file .abelconfig.toml, which is automatically created in your home directory the first time you import ABEL. Edit this file with your text editor to tell ABEL where to find tools such as ELEGANT, HIPACE++, and GUINEA-PIG, as well as configure it for your computing cluster, if needed.

Comments in the file explain how to edit it. The configuration file uses the TOML format, which is a simple text file similar to .ini, but more well defined.

Please do not edit the template file abelconfig.toml or CONFIG.py in the source code folder.

The loaded configuration of ABEL is printed to the terminal when ABEL starts, along with the name of the config file it has loaded.

Unit tests

Unit tests are implemented with pytest; to run the tests on an installed version of ABEL please run

pytest -v

from the root folder of ABEL. It is also possible to run single tests by name, for example: pytest -v tests/test_init.py::testCore_init

The tests are stored in in the tests subdirectory, in files with names starting with test_. In these files, the functions with names starting with test_ are represent one test; if it makes it to the end without any of the asserts triggering and all the expected exceptions happening, the test has PASSED. The test functions are also annotated with @pytest.mark.MARKNAME.

Pytest is configured in the [tool.pytest.ini_options] section of pyproject.toml. This especially defines the "markers", which are named groups of tests that can be specified to run using pytest -v -m MARKNAME.

When the tests succeed, no output (except testfile::testfile PASSED) is printed. If a test fails, a traceback and the printouts of that test are printed. If many tests fail, this can be very verbose.

References

Please cite the following when referring to ABEL or using ABEL simulations for publications:

[1] J. B. B. Chen et al., ABEL: The Adaptable Beginning-to-End Linac simulation framework, Proceedings of IPAC 2025 (Taipei, Taiwan, 2025), pp. 1438-1441.

Acknowledgements

This work was supported by the European Research Council (project SPARTA, Grant No. 101116161) and the Research Council of Norway (Grant No. 313770 and 353317).

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

abel_framework-2026.3.0.tar.gz (333.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abel_framework-2026.3.0-py3-none-any.whl (345.8 kB view details)

Uploaded Python 3

File details

Details for the file abel_framework-2026.3.0.tar.gz.

File metadata

  • Download URL: abel_framework-2026.3.0.tar.gz
  • Upload date:
  • Size: 333.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for abel_framework-2026.3.0.tar.gz
Algorithm Hash digest
SHA256 8f9cdf42b8c0da61754917a8a29a1b32234c996df0ac3fd04f7827584a92576e
MD5 70385a8873cf1ca235ce500f920d977e
BLAKE2b-256 76b1d918e1ffb66d573896836e9f10be7899655fa4c244d8c2fdf6ecc7621067

See more details on using hashes here.

File details

Details for the file abel_framework-2026.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for abel_framework-2026.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 154f72164f9bb5cef55f7cfc920e7678fd2a11642868948a3594aa1674086d98
MD5 f8dc36573f241b68822b79ab3ccf0cb1
BLAKE2b-256 46f3a287fe828a6bfc16d317f9f3a59fa780b9edf76eae545fc0c5808cb8f676

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page