{"id":32176852,"url":"https://github.com/g4edge/pyg4ometry","last_synced_at":"2026-02-21T03:31:41.168Z","repository":{"id":62580475,"uuid":"523091227","full_name":"g4edge/pyg4ometry","owner":"g4edge","description":"Python code for rapid creation and conversion of radiation transport Monte Carlo (Geant4 and Fluka) geometries","archived":false,"fork":false,"pushed_at":"2026-02-14T23:04:14.000Z","size":22153,"stargazers_count":42,"open_issues_count":32,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-15T05:19:21.054Z","etag":null,"topics":["cad","fluka","gdml","geant4"],"latest_commit_sha":null,"homepage":"https://pyg4ometry.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g4edge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-09T19:58:09.000Z","updated_at":"2026-01-14T17:49:44.000Z","dependencies_parsed_at":"2023-02-17T03:46:04.546Z","dependency_job_id":"bce39e74-e553-43e7-8c7f-5d405c8d5ab4","html_url":"https://github.com/g4edge/pyg4ometry","commit_stats":null,"previous_names":["g4edge/pyg4ometry","gipert/pyg4ometry"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/g4edge/pyg4ometry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4edge%2Fpyg4ometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4edge%2Fpyg4ometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4edge%2Fpyg4ometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4edge%2Fpyg4ometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g4edge","download_url":"https://codeload.github.com/g4edge/pyg4ometry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g4edge%2Fpyg4ometry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cad","fluka","gdml","geant4"],"created_at":"2025-10-21T20:01:11.977Z","updated_at":"2026-02-21T03:31:41.160Z","avatar_url":"https://github.com/g4edge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyg4ometry\n\nPython code for rapid creation and conversion of radiation transport Monte\nCarlo (Geant4 and Fluka) geometries.\n\n[![PyPI](https://img.shields.io/pypi/v/pyg4ometry?logo=pypi)](https://pypi.org/project/pyg4ometry/)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/g4edge/pyg4ometry?logo=git)\n[![GitHub Workflow Status](https://img.shields.io/github/checks-status/g4edge/pyg4ometry/main?label=main%20branch\u0026logo=github)](https://github.com/g4edge/pyg4ometry/actions)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Codecov](https://img.shields.io/codecov/c/github/g4edge/pyg4ometry?logo=codecov)](https://app.codecov.io/gh/g4edge/pyg4ometry)\n![GitHub issues](https://img.shields.io/github/issues/g4edge/pyg4ometry?logo=github)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/g4edge/pyg4ometry?logo=github)\n![License](https://img.shields.io/github/license/g4edge/pyg4ometry)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10449301.svg)](https://doi.org/10.5281/zenodo.10449301)\n[![Read the Docs](https://img.shields.io/readthedocs/pyg4ometry?logo=readthedocs)](https://pyg4ometry.readthedocs.io)\n\n## Quick start\n\n_pyg4ometry_ is a very capable package to do many tasks related\nto Geant4/Fluka/MCNP geometry:\n\n- Python scripting to create and assemble geometries\n- Loading, editing and writing GDML\n- Load and tessellate CAD geometry and export to GDML\n- Load ROOT geometry and convert to GDML\n- Powerful VTK viewer of geometries\n- Converting from GDML to FLUKA and MCNP\n- Exporting mesh geometries from GDML to VTP, OBJ, VRML etc.\n- Python bindings to CGAL allowing complex mesh manipulation (e.g. hole filling, remeshing)\n\nAll with few lines of Python code!\n\n```py\nimport pyg4ometry as pg4\nfrom g4edgetestdata import G4EdgeTestData\n\ng4data = G4EdgeTestData()\n# define a geometry registry\nreg = pg4.geant4.Registry()\n\n# build the world volume\nworld_s = pg4.geant4.solid.Orb(\"WorldAir\", 1.5, reg, lunit=\"cm\")\nworld_l = pg4.geant4.LogicalVolume(world_s, \"G4_AIR\", \"WorldAir\", reg)\nreg.setWorld(world_l)\n\n# import an STL file\nreader = pg4.stl.Reader(g4data[\"stl/utah_teapot.stl\"], registry=reg)\nteapot_s = reader.getSolid()\n\n# place the teapot in the world\nteapot_l = pg4.geant4.LogicalVolume(teapot_s, \"G4_Cu\", \"UtahTeapot\", reg)\npg4.geant4.PhysicalVolume([0, 0, 0], [0, 0, 0], teapot_l, \"UtahTeapot\", world_l, reg)\n\n# export to GDML file \"geometry.gdml\"\nwriter = pg4.gdml.Writer()\nwriter.addDetector(reg)\nwriter.write(\"./geometry.gdml\")\n\n# start an interactive VTK viewer instance\nviewer = pg4.visualisation.VtkViewer()\nviewer.addLogicalVolume(reg.getWorldVolume())\nviewer.view()\n```\n\nCheck out our video tutorial for more:\n\n[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/OPvQFZsFvhs/0.jpg)](https://www.youtube.com/watch?v=OPvQFZsFvhs)\n\n## How to Install\n\nPre-built _pyg4ometry_ wheels can be installed [from PyPI](https://pypi.org/project/pyg4ometry)\nusing pip:\n\n```\npip install pyg4ometry\n```\n\nIf you cannot find wheels for your operating system / architecture,\nplease [open an issue](https://github.com/g4edge/pyg4ometry/issues).\nBuilding from source requires some non-Python software dependencies.\nMore documentation can be found in the\n[installation guide](https://pyg4ometry.readthedocs.io/en/stable/manual/installation.html) in the manual.\n\n## Many people and groups are using _pyg4ometry_\n\n- Geometries for BDSIM Geant4 simulation of accelerators\n- [LEGEND experiment](https://indico.cern.ch/event/1252095/contributions/5592424/attachments/2730430/4746429/202310-PyHEP.pdf)\n- [FASER2 detector](https://cds.cern.ch/record/2893550)\n- CERN North area\n- [Moller](https://www.lucbarrett.info/Poster.pdf)\n- Proton therapy beam lines\n\n## Referencing and Citation\n\nTo support the development and maintenance of _pyg4ometry_, please cite it!\nAny publications including simulations made using this software must cite\nthe _pyg4ometry_ paper:\n\n\u003e S.D. Walker, A. Abramov, L.J. Nevay, W. Shields, S.T. Boogert,\n\u003e “pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries”,\n\u003e Computer Physics Communications 272 108228 (2022). DOI: [10.1016/j.cpc.2021.108228](https://doi.org/10.1016/j.cpc.2021.108228)\n\nand the Zenodo release: [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10449301.svg)](https://doi.org/10.5281/zenodo.10449301)\n\nCitation information can be also obtained on GitHub by selecting “Cite this repository” in the sidebar on the right.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4edge%2Fpyg4ometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg4edge%2Fpyg4ometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg4edge%2Fpyg4ometry/lists"}