A Python interface to run MadGraph
Project description
MadGraPy
A simple Python interface to run MadGraph
How to use this module
Requirements:
- Python 3.6+
- MadGraph 3.6+
- AND Python 2.7 (for MadDM compatibility)
- AND MadGraph 2.9 (for MadDM compatibility)
- ghostscript (on Ubuntu:
sudo apt-get install ghostscript)
(Optional) Create a virtual env
python3 -m venv my_virtualenv
source my_virtualenv/bin/activate
Install with pip
pip install madgrapy
(optional) Install madgraph from its GitHub
If you don't have already madgraph installed, you can do it by the following:
git clone https://github.com/mg5amcnlo/mg5amcnlo.git
cd mg5amcnlo
git switch 3.x
rm -rf bin/*.py
Test it with
./mg5amcnlo/bin/mg5_aMC
How to run a simple process
You can find a example Jupyter notebook inside the notebooks folder.
To generate a simple script and run it, you can do
from madgrapy import madpy_generate_script, madpy_run
# Write the script
full_script_str, mg5_script_path, workdir_process = madpy_generate_script(process = "p p > t t~", models = "sm", process_name="my_first_mg5run")
# Run
mg5_script_complete_path = madpy_run(madgraph_path="/path/to/madgraph/folder", process_name = "my_first_mg5run", mg5_script_folder_path = f".")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file madgrapy-0.2.0.tar.gz.
File metadata
- Download URL: madgrapy-0.2.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8c3d2818348a24138df41965b5376ac1e1bb8599a6dff7f51818701337c1c6e
|
|
| MD5 |
dff7a47e75fe82aa69221cafb06aac36
|
|
| BLAKE2b-256 |
84914cd39f8120876e75696f129711669aa1734f8269ee153674115ce2f60bd8
|
File details
Details for the file madgrapy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: madgrapy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37f2e40c3807c4b30f90464e8bcaef4430e24d36bcd56a329d4143996b719316
|
|
| MD5 |
fd4b836210a194bba8960bfd7f3a5359
|
|
| BLAKE2b-256 |
b49fd98ad67c41966fe4ba1fae0febeba66805b29433362120348a0692c25ac9
|