Skip to main content

Local-first particle decay simulator

Project description

ColliderX

ColliderX is a local-first particle decay simulator (MVP).

Run a short end-to-end flow: event simulation → Feynman diagram → summary plots.

Install

From PyPI:

pip install colliderx

For local development:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Install Graphviz (optional, only needed for rendered feynman.png):

macOS:

brew install graphviz

Linux (Debian/Ubuntu):

sudo apt-get update
sudo apt-get install -y graphviz

Windows (PowerShell):

# Option 1: winget
winget install Graphviz.Graphviz

# Option 2: Chocolatey
choco install graphviz

Verify Graphviz is available:

dot -V

Note: pip install colliderx cannot reliably auto-install system Graphviz (dot) across all OS/package managers. ColliderX will still run without it and fall back to DOT-only output (feynman.dot).

Quick Run

If installed from PyPI, run the installed CLI command from any folder:

colliderx -p "Muon" -n 1000 --save --no-show -o artifacts/flow_muon

If running from source, first cd into the repository root, then use main.py:

cd /path/to/ColliderX
python main.py -p "Muon" -n 1000 --save --no-show -o artifacts/flow_muon

Other examples (from source):

Default (interactive, show-only):

python main.py -p "Muon" -n 1000

Save outputs to disk and avoid interactive windows:

python main.py -p "Muon" -n 1000 --save --no-show -o artifacts/flow_muon

Run with a seed:

python main.py -p "Muon" -n 1000 -s 42

CLI Flags (short)

  • -p, --particle : parent particle name (positional also supported)
  • -n, --events : number of events to simulate
  • -s, --seed : random seed
  • -E, --energy : override parent energy (MeV)
  • --save : persist generated files to -o/--out
  • --no-show : do not open interactive plot windows
  • -o, --out : output directory (default artifacts/run_<timestamp>)
  • --decay : force a particular root decay mode
  • --afb : enable forward-backward asymmetry (where applicable)

Saved Outputs (--save)

  • feynman.dot (DOT source)
  • feynman.png (if Graphviz is available and rendering enabled)
  • graphs/ (PNG plots: decay modes, spectra, process-specific plots)
  • summary.txt (run summary and counts)

Tests

pytest -q

If Graphviz is not installed, the tool falls back to writing DOT files only and continues the flow.

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

colliderx-0.1.2.tar.gz (57.6 kB view details)

Uploaded Source

Built Distribution

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

colliderx-0.1.2-py3-none-any.whl (77.4 kB view details)

Uploaded Python 3

File details

Details for the file colliderx-0.1.2.tar.gz.

File metadata

  • Download URL: colliderx-0.1.2.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for colliderx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bb2b66adbf84c903a7973bd0ab87c696e8a808e258651cba7e8b8961c9eeb933
MD5 24050dad6c47a0db516ec26ce3efad16
BLAKE2b-256 54dc8517b1902c02bff5e9b2bad0d7905dc408d37070bc8b88f1b0b206668499

See more details on using hashes here.

File details

Details for the file colliderx-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: colliderx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 77.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for colliderx-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5db7ad7875ffff09b9bc0ce43739464baaa461f417dadafec68fccbdee08debe
MD5 2b70bf945715bcdfd4ee0105aae56a86
BLAKE2b-256 4ec51e9157a63df61e09da32a6d50694fb770ad529c5ff12d87dac0a33096ab3

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