{"id":19505409,"url":"https://github.com/n3pdf/madflow","last_synced_at":"2025-08-12T23:09:45.947Z","repository":{"id":37779938,"uuid":"370371517","full_name":"N3PDF/madflow","owner":"N3PDF","description":"Automating Monte Carlo simulation on hardware accelerators.","archived":false,"fork":false,"pushed_at":"2024-01-10T10:32:08.000Z","size":362,"stargazers_count":19,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-12T07:23:00.621Z","etag":null,"topics":["gpu-acceleration","monte-carlo-simulation","particle-physics"],"latest_commit_sha":null,"homepage":"https://madflow.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N3PDF.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-24T13:59:50.000Z","updated_at":"2025-03-19T19:29:55.000Z","dependencies_parsed_at":"2024-11-10T22:42:01.319Z","dependency_job_id":null,"html_url":"https://github.com/N3PDF/madflow","commit_stats":{"total_commits":233,"total_committers":11,"mean_commits":"21.181818181818183","dds":0.6008583690987124,"last_synced_commit":"430c7aa219433099716dfee08a125212204c369b"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/N3PDF/madflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fmadflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fmadflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fmadflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fmadflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N3PDF","download_url":"https://codeload.github.com/N3PDF/madflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fmadflow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270149345,"owners_count":24535728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpu-acceleration","monte-carlo-simulation","particle-physics"],"created_at":"2024-11-10T22:30:29.002Z","updated_at":"2025-08-12T23:09:45.182Z","avatar_url":"https://github.com/N3PDF.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Madflow\n\n[![Tests](https://github.com/N3PDF/madflow/actions/workflows/pytest.yml/badge.svg)](https://github.com/N3PDF/madflow/actions/workflows/pytest.yml)\n[![Documentation Status](https://readthedocs.org/projects/madflow/badge/?version=latest)](https://madflow.readthedocs.io/en/latest/?badge=latest)\n[![epjc](https://img.shields.io/badge/%20%20%20%20Eur.Phys.J.C-%2081%20(2021)%207%2C%20656-blue)](https://inspirehep.net/literature/1869616)\n\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4954375.svg)](https://doi.org/10.5281/zenodo.4954375)\n\nIf you use this software please cite this [paper](https://inspirehep.net/literature/1869616)\n\n```bibtex\n@article{madflow,\n    author = \"Carrazza, Stefano and Cruz-Martinez, Juan and Rossi, Marco and Zaro, Marco\",\n    title = \"{MadFlow: automating Monte Carlo simulation on GPU for particle physics processes}\",\n    eprint = \"2106.10279\",\n    archivePrefix = \"arXiv\",\n    primaryClass = \"physics.comp-ph\",\n    reportNumber = \"TIF-UNIMI-2021-9\",\n    doi = \"10.1140/epjc/s10052-021-09443-8\",\n    journal = \"Eur. Phys. J. C\",\n    volume = \"81\",\n    number = \"7\",\n    pages = \"656\",\n    year = \"2021\"\n}\n\n```\n\n## Install `madflow`\n\n#### From PyPI\n\n```\n    pip install madflow\n```\n\n#### From the repository\n\n```bash\n  git clone https://github.com/N3PDF/madflow.git\n  cd madflow\n  pip install .\n```\n\n### External tools\n\n`madflow` relies in a number of external tools.\nSome of them are just used for convenience and are optional, some are necessary for the proper functioning of the program.\n\n#### MG5_aMC\n\nA valid installation of MG5_aMC (2.8+) is necessary in order to generate matrix elements.\nIf you already have a valid installation, please add the following environment variable pointing to the right directory: `MADGRAPH_PATH`.\nBelow are the instructions for MG5_aMC 3.1.0, for a more recent release please visit the MG5_aMC@NLO [site](https://launchpad.net/mg5amcnlo).\n\n```bash\nwget https://launchpad.net/mg5amcnlo/3.0/3.1.x/+download/MG5_aMC_v3.1.0.tar.gz\ntar xfz MG5_aMC_v3.1.0.tar.gz\nexport MADGRAPH_PATH=${PWD}/MG5_aMC_v3_1_0\n```\n\n#### PDF grids\n\nWhile `LHAPDF` is not strictly necessary to use the `madflow` library or run any of the scripts,\nhaving access to the `lhapdf` python wrapper can be convenient in order to manage the different PDFsets.\nPlease install the latest version from the LHAPDF [site](https://lhapdf.hepforge.org/).\n\nOtherwise, if your installed version of `pdfflow` is equal or greater than `1.2.2`,\nit includes the [lhapdf-management](https://github.com/scarlehoff/lhapdf_management) scripts suite and LHAPDF should not be needed.\nYou can also manually install the [PDF sets](https://lhapdf.hepforge.org/pdfsets.html) in a suitable directory\nand ensure that either the `PDFFLOW_DATA_PATH` or `LHAPDF_DATA_PATH` environment variables are pointing to it.\n\nYou can check your installed version of `pdfflow` with: `python -c 'import pdfflow ; print(pdfflow.__version__);'`\n\n## Install plugin in MG5_aMC\n\nIn order to install the `madflow` plugin in MG5_aMC@NLO, it is necessary to link the `madgraph_plugin` folder inside the `PLUGIN` directory of MG5_aMC@NLO.\nFor instance, if the environment variable `$MADGRAPH_PATH` is pointing to the MG5_aMC root and you are currently in the repository root.\n\n```bash\n    ln -s ${PWD}/madgraph_plugin ${MADGRAPH_PATH}/PLUGIN/pyout\n```\n\nThe link can be performed automagically with the `madflow --autolink` option.\n\n## Use `madflow`\n\nFor a more precise description of what `madflow` can do please visit the online documentation.\n\nFor convenience a script is provided which should have been installed alongside the library.\nUsing this script is possible to run any process at Leading Order, integrated with a `RAMBO`-like phasespace.\n\n```bash\n  madflow --help\n```\n```bash\n    [-h] [-v] [-p PDF] [--no_pdf] [-c] [--madgraph_process MADGRAPH_PROCESS] [-m MASSIVE_PARTICLES] [-g] [--pt_cut PT_CUT] [--histograms]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -v, --verbose         Print extra info\n      -p PDF, --pdf PDF     PDF set\n      --no_pdf              Don't use a PDF for the initial state\n      -c, --enable_cuts     Enable the cuts\n      --madgraph_process MADGRAPH_PROCESS\n                            Set the madgraph process to be run\n      -m MASSIVE_PARTICLES, --massive_particles MASSIVE_PARTICLES\n                            Number of massive particles\n      -g, --variable_g      Use variable g_s\n      --pt_cut PT_CUT       Minimum pt for the outgoint particles\n      --histograms          Generate LHE files/histograms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fmadflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3pdf%2Fmadflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fmadflow/lists"}