Skip to main content

General purpose particle physics Monte Carlo generator.

Project description

PYTHIA

PYTHIA is a program for the generation of high-energy physics collision events, i.e. for the description of collisions at high energies between electrons, protons, photons and heavy nuclei. It contains theory and models for a number of physics aspects, including hard and soft interactions, parton distributions, initial- and final-state parton showers, multiparton interactions, fragmentation and decay. It is largely based on original research, but also borrows many formulae and other knowledge from the literature. As such it is categorized as a general purpose Monte Carlo event generator.

Installation

The PYTHIA package is natively written in C++, which is the preferred interface. To work with PYTHIA via C++ go to the PYTHIA homepage and follow the instructions outlined there. The Python interface to PYTHIA can be installed directly via pip. Note that for this PyPI distribution of PYTHIA, the module name has been changed from pythia8 to pythia8mc as the pythia8 project name was unavailable. Outside of the PyPI distribution, the pythia8 module name is always used.

pip install pythia8mc

The interface is also available via conda.

conda install -c conda-forge pythia8

It is possible, and in many ways preferable, to build the Python interface directly from the PYTHIA C++ distribution (as well as update the Python bindings) using the configuration script.

wget https://pythia.org/download/pythia83/pythia8XXX.tgz
tar xvfz pythia8XXX.tgz
cd pythia8XXX
./configure --with-python
make

Usage

For a full description of usage, as well as examples, see the accompanying HTML manual for this version of PYTHIA.

The following imports the pythia8mc module and creates a Pythia instance.

import pythia8mc
pythia = pythia8mc.Pythia()

PYTHIA must then be configured and initialized, in this example to produce minimum bias events at the LHC.

pythia.readString("SoftQCD:all = on")
pythia.init()

Finally, we can produce an event, and explore the event record.

pythia.next()
for prt in pythia.event: print(prt.name())

Paths

PYTHIA requires the XML files which are used to build the HTML manual to define settings. Additionally, settings files for tunes are also distributed with PYTHIA. For the PyPI distribution, these files can be found along the relative path,

../../../share/Pythia8/xmldoc

with respect to the pythia8mc module library. By default, this path should be correctly set, but it can be printed as follows.

print(pythia8mc.__file__.rstrip("pythia8mc.so") + "../../../share/Pythia8/xmldoc")

The settings directory can be found in ../settings/ with respect to this folder. However, it is possible to overwrite the XML path by setting the environment variable PYTHIA8DATA,

export PYTHIA8DATA=<PYTHIA XML path> 

or by passing the XML path to the Pythia constructor.

pythia8mc.Pythia("<PYTHIA XML path>")

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

pythia8mc-8.317.0.tar.gz (21.7 MB view details)

Uploaded Source

Built Distributions

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

pythia8mc-8.317.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.5 MB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp313-cp313-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pythia8mc-8.317.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp312-cp312-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pythia8mc-8.317.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp311-cp311-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pythia8mc-8.317.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp310-cp310-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pythia8mc-8.317.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp39-cp39-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

pythia8mc-8.317.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.8 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.8 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

pythia8mc-8.317.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.5mmanylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 2.7mumanylinux: glibc 2.5+ x86-64

pythia8mc-8.317.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (27.6 MB view details)

Uploaded CPython 2.7mmanylinux: glibc 2.5+ x86-64

File details

Details for the file pythia8mc-8.317.0.tar.gz.

File metadata

  • Download URL: pythia8mc-8.317.0.tar.gz
  • Upload date:
  • Size: 21.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0.tar.gz
Algorithm Hash digest
SHA256 abbbbe99f5789cf59ef5f52256e17fbd2b94ce7cafff4cb54b8e3420bb2ac825
MD5 fdd056c4e543e96371afbae01b489215
BLAKE2b-256 a77a9031e9ec38c7ce4564e08fed55be434f236977b405dbd76ea42e362aad8b

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85c42f7a8bdbefb6f1c94384b070b507d7ced307e0f39c56951da1492e878ac9
MD5 8afe45fb06ab5b7e932488b2be90b7ee
BLAKE2b-256 0de35dac5ed61f40e045866be4f650efe6ddd1e53bb6041088a5b495f71b3c8a

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c59166cf47760ad5fbc429749b8edb9aa5edfd167aaf6f99302ceebaa6035292
MD5 7e42edb11cde85e47f4f8a7ceced82c8
BLAKE2b-256 2739138f3c2ae11144ffe7cfe3a03f629f84436dee0f6494e4e819421c93ce8f

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pythia8mc-8.317.0-cp313-cp313-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.13, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 51c34bcb93598786c2f82c9f6e73d44d7d0ade34ea52a123852da2032762465f
MD5 c73272206a3be4c6102bf6a43b81d28c
BLAKE2b-256 822a131c23f7cb402ae68575434d6dd18c9375c90e1ef7f635ac9cc528b0bf5a

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a91dca2a00db43e8b27350bc914db26e951a8b8ad991243e16b67d7b9ba13e3a
MD5 f7cd1e8d4b37e72e2d76a141edee14fc
BLAKE2b-256 e5d826dbd4f3a708a45a13e0239098bbd31fe49ff5b86ac891c9a31dbb1c0030

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pythia8mc-8.317.0-cp312-cp312-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.12, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8989f5dfa4299ddb93c65cc52fdcb2a34805a16968f3d03846402f1812ec0090
MD5 2145f1a60926a0228dc0d7645527ecad
BLAKE2b-256 ebdac25a94e000fb0ff6bb66900124e56d95458f05e6ee2e289646d4d494f196

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e395699ae2d02acbd685789b0a2a4a476619392408e6d3a1d57496463b3c360
MD5 17676181bab2ed30f592cce8c7d5c82c
BLAKE2b-256 e6e09136dff44b28862577ad74ea7de44dcfda867fc0ca524b4de96a2a982b6c

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pythia8mc-8.317.0-cp311-cp311-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.11, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 cdadd1657ece0b16224c516a77face29bfdbc8e09df692f9fb03ae41207c714a
MD5 3459abd709db42e826aa09633bd2dd9f
BLAKE2b-256 f1c3a11c6a72e848efdd001d66b0114d8114b36c0bc5892cd7db084594bf1993

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e3f6a1e3c9c227fa29398c27914010310f8ba204655b7437cbaee7fb7b4dd88
MD5 bb996175a2b131240e30a8a717fa5e01
BLAKE2b-256 0922dafe6f7c11d69bcad649d5eeb2ff8c1ad6a236ee9f2c975e09bfb56bb4dd

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pythia8mc-8.317.0-cp310-cp310-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.10, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4ec485fd006fd2fec61d2b4dc0b167697f12559fcd4181d4245cf440fb5621bc
MD5 8439ba29425a7f2b275934f2941e1556
BLAKE2b-256 f2ef22e2f394c84a162bb88e2aa075346a1d6c0240e7d890bd338a092bae5dc7

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 667bfdf7dcda10e934b76892707b092f0ba0bca2766d8007e78073bda18f18a1
MD5 8e3a696316691e89db5e4ea5faad87b2
BLAKE2b-256 0eaaa9ab42b533023f0335d6a60144ec971fc4d9de4a69aa2c3e9fb963562f75

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: pythia8mc-8.317.0-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 26.7 MB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

File hashes

Hashes for pythia8mc-8.317.0-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8574c0660211f2db5ed176e0bb151b45ca7a00ae57daf836e8389b398b4be9b2
MD5 77a39c8911db470b1c6bf14bf4e747ef
BLAKE2b-256 1bf9152bdbe6c88360089e7a155902dcb6c506bc06af2dafd9ed7c11779749ed

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ca07a3a1d68c0392d52298bc36712252880a62d2084a55d2eb37b1e69cfb460b
MD5 0ce7fc6009242081fd6f7a174ea0af58
BLAKE2b-256 74b49a433a7b1287e53d20f8417669a81387db19ec40e54e98b8edb0b7c3364a

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad5083fb5a94bf972dbc3a268eb6837bbdd7bf1f3f5eb401aca8470f09599c9d
MD5 c474b36cd29ed22516541ed554a5ab1c
BLAKE2b-256 8308a47c68a5b5da04f7b41f125b33f17d54f724dbe9bd59ca4e0240f8438ebf

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8739ed07672809d0e186153241115a2eb2444646bd80f16befc2e06b9963ef6d
MD5 36e189be33ecb1d1e612572c4547e55f
BLAKE2b-256 7b88b72f43dbc36c048856cdb3ae6a30ea9457634946707590d1398dc9da2c61

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 50d2ddbc76fa14779d61b1f4cc7eb6f51986eca38ac44a22c0e41060c49df1b5
MD5 dd9cc46ba4bfc853ea5a1407d2fe8bb3
BLAKE2b-256 3cd31d8f2348ccece50abd9c1a08d5c42797e6037f35ad3a140ea13d3b346d00

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0c86d8cc5101ee7a8bb834e433db10701fa0501f850e9d4fd9ec5ebe73968b8a
MD5 0e6a8eda60a655e866e01ea55777f9ee
BLAKE2b-256 040928a9efaebb938af9350abcfeb5451e0b746c005a1cc0b7fca923fb6de821

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2e2ff15f92f288ffe54c2ebd3c0e12c644d22ccbd9d4a29c87120d323c2cea65
MD5 f177c36a513a2056b499750edb842c4e
BLAKE2b-256 4749df4f635c5e5e738e8980539172006e2a5df2df5a9450e2b23124e8710ab7

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dad091013f9b390a3235b22d805194e9e746670a787c9c21936d8f182891d410
MD5 e395c5998b4835246d4bc972ea2435b9
BLAKE2b-256 6cedd6d3fa7ff07cfd7e267338452e852f5f8089c488bf709deeaadc2955e0e2

See more details on using hashes here.

File details

Details for the file pythia8mc-8.317.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pythia8mc-8.317.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 df2604cac0aadbca8ef6767853475addfae7870b32f32ae24924ad61989360c6
MD5 54c87191b101e2e53216c89194d9ad66
BLAKE2b-256 5d1d275a1d1d84858bc87e09acb306da9c0a5863b1a4820614f1dc0039e4b13b

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