
Cosmic ray and HadROnic interactiOn MOnte-carlo frontend
This package provides a simple and generic user interface to popular event generators used in cosmic ray and high-energy particle physics. By removing the need for complicated Fortran-style interfaces, ASCII input cards, and C++ dependencies, the package simplifies the simulation of particle interactions, making it easier and faster for a wider audience to access.
Usage
Python user interface
To simulate interactions with one of the supported event generators, import the package and define the parameters of the collision. Then, create an instance of an event generator, and generate events.
import numpy as np
import chromo
# Define the parameters of the collisions
kinematics = chromo.kinematics.CenterOfMass(
13 * chromo.constants.TeV,
"proton", "proton")
# Create an instance of an event generator
generator = chromo.models.Sibyll23d(kinematics)
nevents = 0
average_pt = 0
# Generate 10000 events
for event in generator(10000):
# Filter event
event = event.final_state_charged()
# do something with event.pid, event.eta, event.en, event.pt, etc.
# these variables are numpy arrays, that can be histogrammed or counted like
pt = event.pt[np.abs(event.pid) == 211]
# The list could be empty
if len(pt) > 0:
nevents += 1
average_pt += np.mean(pt)
average_pt = average_pt / nevents
print("Average pT for charged pions {0:4.3f}".format(average_pt))
Further examples, such as this can be found in the examples folder.
Command line user interface (CLI)
Installing chromo also makes a command-line interface available. If your Python runtime environment is properly set up, you can do
chromo --help
To see the help of the command-line interface. If that does not work, just replace chromo with python -m chromo. The command-line interface was designed to feel familiar for users of CRMC. The CLI can write events in a variety of output formats, as detailed below. HepMC output can be piped into RIVET and many other tools supporting the format.
Output formats
- HepMC (via pyhepmc, optionally gzip compressed)
- ROOT (via uproot)
- SVG images of events (via pyhepmc package)
Supported models and how to cite them
Please note that chromo only provides a user interface for the following models, and does not contain any particle physics models itself. When using any of these models in public-facing work, it is important to properly cite the original model reference by following the links below. Additionally, if you find chromo useful in your work, we would appreciate an acknowledgement, footnote, or link to chromo.
| Interaction model (click for iNSPIRE.HEP link) | Supported proj/targ | Comment |
|---|---|---|
| DPMJET-III 3.0.7 & PHOJET 1.12-36 | hN, γγ, γN, hA, γA, AA | |
| DPMJET-III & PHOJET 19.1 and 19.3 (repo on GitHub) | hN, γγ, γN, hA, γA, AA | |
| EPOS-LHC | hN, hA, AA | |
| EPOS-LHC-R | hN, hA, AA | |
| EPOS-LHC-R (w/ hadr. rescattering) | hN, hA, AA | |
| PYTHIA 6.4 | hN, ee, γγ, γN | |
| PYTHIA 8.317 (https://pythia.org/) | hN, ee, γγ, γN | unavailable on Windows |
| PYTHIA 8.317 Cascade | hA | unavailable on Windows |
| PYTHIA 8.317 Angantyr | hA, AA | unavailable on Windows, uses precomputed glauber tables for 20 GeV–20 PeV CMS by default |
| QGSJet-01 | hN, hA, AA | |
| QGSJet-II-03 | hN, hA, AA | |
| QGSJet-II-04 | hN, hA, AA | |
| QGSJet-III | hN, hA, AA | |
| SIBYLL-2.1 | hN, hA (A<=20) | |
| SIBYLL-2.3c/d/e | hN, hA (A<=20) | incl. legacy versions 2.3 can be build from source |
| SIBYLL* (based on 2.3d and 2.3e) | hN, hA (A<=20) | |
| SOPHIA 2.0 | γN | |
| UrQMD 3.4 + second citation | hN, hA, AA* | unavailable on Windows |
h = hadron, N = nucleon (p or n), A = nucleus, γ = photon, e = electron/positron
Installation via PyPI
Supported platforms
- Python 3.9+
- Linux, Mac OS X (x86 and M1/M2), Windows
The recommended way to install chromo is by using the pre-compiled binary wheel, which is available for most common architectures and Python versions
pip install chromo
Advanced and developer installation instructions can be found here.
Citation
If you use chromo in your research, please cite the paper:
A. Fedynitch, H. Dembinski and A. Prosekin, Chromo: A high-performance python interface to hadronic event generators for collider and cosmic-ray simulations, Comput.Phys.Commun. 321 (2026) 110031, arXiv:2507.21856 [INSPIRE]
BibTeX:
@article{Fedynitch:2025mgj,
author = "Fedynitch, Anatoli and Dembinski, Hans and Prosekin, Anton",
title = "{Chromo: A high-performance python interface to hadronic event generators for collider and cosmic-ray simulations}",
eprint = "2507.21856",
archivePrefix = "arXiv",
primaryClass = "physics.comp-ph",
doi = "10.1016/j.cpc.2026.110031",
journal = "Comput. Phys. Commun.",
volume = "321",
pages = "110031",
year = "2026"
}
Authors
- Anatoli Fedynitch
- Hans Dembinski
- Anton Prosekin
- Sonia El Hadri
- Keito Watanabe
LICENSE
The source code of chromo is licensed under the BSD 3-clause license (see LICENSE for detail). The source codes of the event generators are individually licensed under different conditions (see the COPYING files located in the subdirectories).
Metadata
Release files for chromo 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chromo-0.11.0.tar.gz | 114.7 MB | Details |
Built distributions (wheels)
Total release size: 646.8 MB
Release files / chromo-0.11.0.tar.gz
| Download URL | chromo-0.11.0.tar.gz |
|---|---|
| Size | 114.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3898711c813a743c5d73e88589213f71e6a02380ceecf09eddf4365a0ec5cf7d
|
|
BLAKE2b-256 checksum How to use checksums |
9cff065a4cee55b090d8d4ff37e386a229bed27c1da505eb50c95f7af94701df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | chromo-0.11.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 27.1 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8776eb9818c9bb7e2bb2114378a9faa89f9bb231f67f9944d0bca963244069ea
|
|
BLAKE2b-256 checksum How to use checksums |
df610db498051849d548d050d3fee7893b03116fbd2bef4c2bdd9bf63979031b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | chromo-0.11.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 25.0 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f2e9b1259a715273578b0dc2357f47863675ccb52febbaa2dc999b99e5686d75
|
|
BLAKE2b-256 checksum How to use checksums |
239a62c56144287903bfbc49df3db221e7fefa2fbd31ec0bc9e3df7534d9375d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp313-cp313-macosx_15_0_x86_64.whl
| Download URL | chromo-0.11.0-cp313-cp313-macosx_15_0_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.13 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
fbc80bf60ab8550ab484337a6978a6cf134c359601dffb1906ef831394e6d535
|
|
BLAKE2b-256 checksum How to use checksums |
bf8baa003ac94f7216edf93b6585eb25add665fe6213848c28afe7d436e0dce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | chromo-0.11.0-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 26.1 MB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ea23b407050b653a1ef0e2d45a83a64ac9fcd2f2d4d7336a05229539a840cd7e
|
|
BLAKE2b-256 checksum How to use checksums |
6e186023f8cf6ad80028427db6f039fd455cdceabfc17a107f4165bca78fb2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | chromo-0.11.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 27.1 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
213f33b6145edfa9a447d32b565ca8a5d2fbfb994c65fd957799ab2174ba2d88
|
|
BLAKE2b-256 checksum How to use checksums |
aa3ce2f3d4e951bbe23d1fc59553696acb115928bcd838440d8923df56427931
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | chromo-0.11.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 25.0 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1ee86a0a322b2c21cac701be9c757b12b820a0f533c8353bee89e28cbed0d77d
|
|
BLAKE2b-256 checksum How to use checksums |
587ce7fbb63ed7e16526323bd9c52d17aa42566344e5c3444f4e4f4769e19155
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp312-cp312-macosx_15_0_x86_64.whl
| Download URL | chromo-0.11.0-cp312-cp312-macosx_15_0_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.12 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
c58466dca86771d75450ef4bd8d3e39807a77d92b71f2b1471f3410328e05072
|
|
BLAKE2b-256 checksum How to use checksums |
b491a16a325fce23ae685d118a389772579048b9b871f75ca80b33803b3164d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp312-cp312-macosx_15_0_arm64.whl
| Download URL | chromo-0.11.0-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 26.1 MB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d383f2714516d9631a8fedec061e0501da86165edd5f46252c0db7f87ed7ecbb
|
|
BLAKE2b-256 checksum How to use checksums |
990636f791f52ef1a7daee775944d6ae096bf15d643f61d066f786c9c8ac9158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | chromo-0.11.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 27.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
71c2543b2ab92010be65b9d1d1d4e094c8da21884dd26f970eaff7d302cdacd1
|
|
BLAKE2b-256 checksum How to use checksums |
5952bb58be5af9a22160e6470b32e1af5c567df838a30cdc6095750bc10fa034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | chromo-0.11.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 25.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
5e026f168f46884e045e23fd9b585c3c215f923cbef727414c08e579cf9add9c
|
|
BLAKE2b-256 checksum How to use checksums |
c0b2306eec2e8b2bc1a0d0b0c1fe85911eb8599dde5a7f65dcacafea616ba3cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp311-cp311-macosx_15_0_x86_64.whl
| Download URL | chromo-0.11.0-cp311-cp311-macosx_15_0_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.11 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd2ee4a4cc2313344fd8e87af90562afd94a7233f00f3e690de05bff63054ab5
|
|
BLAKE2b-256 checksum How to use checksums |
c20ccf10e188bffacf0240cc9e84bcd9e5e553fbe77f62b70add141872a30c17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | chromo-0.11.0-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 26.1 MB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d200bd1c1447c9d0de7725e089a9a7958f0fa4cc8258ab6772a8bb00b59b80e8
|
|
BLAKE2b-256 checksum How to use checksums |
2d0a0586050fa12ad97037473d5f4a1caca571d7cb9b023129e5bf1983398101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | chromo-0.11.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 27.0 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1421dacdf41ca075a86f6c4a093fa427a7c961f061518eba83e0ddaa25ab188d
|
|
BLAKE2b-256 checksum How to use checksums |
52bb3431f2623badfef968ac9b19cff0a88e44af7ce001c32f537b7b5bd8e070
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | chromo-0.11.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 25.0 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
91e416ee2e4abff2c4b5f414659d1a236f89706fe3542e53e756b6a4423f6020
|
|
BLAKE2b-256 checksum How to use checksums |
e4d05a46f78c8c0c1d362408787b73261005cd58581780ac63fc2e4edfcddd32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp310-cp310-macosx_15_0_x86_64.whl
| Download URL | chromo-0.11.0-cp310-cp310-macosx_15_0_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.10 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
c2aeae4e993de77bfae537092eb5d240b814a8a91d6366620db4056099edb510
|
|
BLAKE2b-256 checksum How to use checksums |
872ce9489bc91a51eb8c3f2a9fa261132131ea158974f9d378872b32b1290b4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp310-cp310-macosx_15_0_arm64.whl
| Download URL | chromo-0.11.0-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 26.1 MB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
58381df0412ec28353fd32104cfa9dc4e9bcf81bb86911281540244f180be319
|
|
BLAKE2b-256 checksum How to use checksums |
d4567a6d009081c5451f83a05fe669511b6feda718be6d8961ffe956dd8dbac2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | chromo-0.11.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 27.0 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f7827d5e83f3873ee5ca00665c3815af73b800a1a5b52425c4e9300539d2ec2
|
|
BLAKE2b-256 checksum How to use checksums |
adb9124e93c1bf5e786dc03fe3311df70c8b079e718c3e9a9ba75fe35be309af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | chromo-0.11.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 25.0 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
5b196f5d88c6198199c0961a99150e6a1c2f654eb665e8b3f2ac01726e66c4de
|
|
BLAKE2b-256 checksum How to use checksums |
afdf35b2e580139d380c1a6c2854911f2d338c13b54c2cd4082c227c350f1e37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp39-cp39-macosx_15_0_x86_64.whl
| Download URL | chromo-0.11.0-cp39-cp39-macosx_15_0_x86_64.whl |
|---|---|
| Size | 28.3 MB |
| Tags | CPython 3.9 macOS 15.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
66421bea9b010537beffb9ae14c612d9cea2394881e8c0012b7b0e36dbf3d022
|
|
BLAKE2b-256 checksum How to use checksums |
e62db4b340cce1aa57a1390a412eedb6d6007a21b17fea3e9f037d73c2bd345c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|
Release files / chromo-0.11.0-cp39-cp39-macosx_15_0_arm64.whl
| Download URL | chromo-0.11.0-cp39-cp39-macosx_15_0_arm64.whl |
|---|---|
| Size | 26.1 MB |
| Tags | CPython 3.9 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
90458ad7ea367ba5c85274fb0a827ae2f96855efba30016611157cbdaeaa779c
|
|
BLAKE2b-256 checksum How to use checksums |
481dea8dedf394d7591039811beae1b8c8638357400831470cbdd9c6110f1496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.14
|