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.1.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.1-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.1-cp313-cp313-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pythia8mc-8.317.1-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.1-cp312-cp312-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pythia8mc-8.317.1-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.1-cp311-cp311-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pythia8mc-8.317.1-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.1-cp310-cp310-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

pythia8mc-8.317.1-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.1-cp39-cp39-macosx_15_0_arm64.whl (26.7 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

pythia8mc-8.317.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: pythia8mc-8.317.1.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.1.tar.gz
Algorithm Hash digest
SHA256 1b307d5e9758e6b8a3ba4f44a115231636716543af1d811b85a20506deb61b76
MD5 9571ddcc49f29ccb28ae66988c044f10
BLAKE2b-256 f2cf2e3e74ab3c7679ca5c31b37b9cdf738185a9cc7d591a6eb5460dd15f0a9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef0e1aeca0b6f5f4d60adea3e1abbc96cdbc925d9ab48dbddba8b9557ddbac81
MD5 5c5c9c35dee5ca08c61b647782c0b44e
BLAKE2b-256 9e02d30f20fe86a7b4de66b5a46d64e4dbc649b9589ac6f212177ed9215eb4fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythia8mc-8.317.1-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.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9a6f3a6cdbc2fc3fc996b6613657da58d6cad14ad3ff3b72450fb8be99cee15c
MD5 3cc683013cabfa857666006e37327f52
BLAKE2b-256 320cc23c62eb95e16b31f80a08998b4f2bfd1e98469ce4cf009673022d068a53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9de5243e4b9e423048b20cd01b4cda73caf3dba657d1345e2e2781b257e86d82
MD5 b765f5d1c414775b0eccd93756d57fa9
BLAKE2b-256 a2aae4dfd983ccf7a073f65863c60f3f4e6ae01c51b12f475795e8d1cabe0564

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythia8mc-8.317.1-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.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 012486440e09251e0942f9fd2c771f55c7a5d69974684cf1f10006567583cb7e
MD5 daadab89a9da123bee186d6467c0b10e
BLAKE2b-256 52d05e69c6455d3b7c2a3ca107f2bb38ad66488a32cc390532bc3730fb7961f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7408773d8a074f3528211029b51483c30c6a94a82049909ec94c5970ae440d0c
MD5 51836b55c3ae1a3c41b284ed1d913ee2
BLAKE2b-256 5a585bed6bb72f6c022439136a65881db9e33a2149bff11e7f346e6b2157afe1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythia8mc-8.317.1-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.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7dd1e4160546f95c5cb2efc64f1b04130e4c6a539cde22871dc596469cbdeabf
MD5 6c087d571a04517ea5fbac8b56ac7db9
BLAKE2b-256 04ae81219488f65e983670fe9a2d0f62bc5901fb34e2cb7dc085f47ae2f9ae5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e58f51171f7d7f01f54071d7156ea97c79c7ee5c4c386a2d3d4c76ec74516c27
MD5 d9465a31566d8ba734fcb5bccdd90445
BLAKE2b-256 29286e8b5c393a5e665c66fecede76a7fd3d7900cf4bf8d77d13008749394138

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythia8mc-8.317.1-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.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 360675ba68fab8536b48a0f07b8cfd629c52be575219c8b4f8bb4f636e4d8d8c
MD5 f6391403d082fc2d116cc1ed6e67f45c
BLAKE2b-256 299ec2969fa9e23daea0ca2651465dc325117828c1066c4336bfe5b621658c47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b70d804d984543394228d89f63ce9959f795347a9d028c42409ac922675c00ad
MD5 5d83c0cd3ae75846b26007c72777409f
BLAKE2b-256 6a006e9eb8184b660ab3faf395a75e715fbac9ae684039da834dda804eccbd70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pythia8mc-8.317.1-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.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e321325fa3c5b21649c26e69d57f95f537e6681a7eb7d5bbcb40698c7e467b9c
MD5 8cb66acfb97f217d01f6f4522f72d16b
BLAKE2b-256 5409444e05b5c8ea32cc46486caabd32193b9ea4f42bf06535e6580f054179b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4954516141174a5dfb2080f767cabbe905b02a70cacf2f11ea7c43137ad4c12c
MD5 e38a872425d0abc5ced2630042c65a3c
BLAKE2b-256 7a9e265bf3c98cd01e0d281376c89e73683c141c5e8fad3114c3da78bdeb5e43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 89ea56564e1a64fdfb521b2257ee41a4351dfe562694ec6c50e2040acc21a99e
MD5 f86953e1d1a6036a50e9b35394502fad
BLAKE2b-256 874bbd475611abe46cb23dfff306e8ec9c984b5219d32b7d456586f2475c4942

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d1609ec17c19914d163d894eaf394d72ea8b75a01e08691d52ee773e036e35be
MD5 900784f5e807bfbebad9450fda53b19a
BLAKE2b-256 a06d9339661d40f04fbcdd588ed70937678df2787c414dff76b0ec002f864893

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9989eecc19e7b52a88d4328c05f6ee5cbca7c154311b0a63a81aaa6da1c385e7
MD5 ab30ce26715aecccc449496cb840f6fc
BLAKE2b-256 ce73f243d49dcede378d333e12e1eb2a054212d10614ca9b425d4d2a1acc0f32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1cf5ad180cf9261193824b9ffc46bc8cc93df171939121488b41eb0303638ccc
MD5 8975ee940700b1eebd3be08afe5cb507
BLAKE2b-256 3addf1f6524a91fd1d155d8e3bbcbfcff125b8ee3a93d647e96a1efa7c7e9b17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pythia8mc-8.317.1-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e6b09954cbac5710637da77d36acfd799b4f4e187c3a9e51ca4ed011449d40f6
MD5 64ccc443a5e344d115c4c87da6a36c77
BLAKE2b-256 263839456f0b54fbb8cf2c1c02adf6342b4174fcd5f043563aec22b310e7a0b8

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