five

A python API and graphical plugin for the penRed Monte Carlo code: Enhancing usability and workflow integration

收藏
DataCite Commons2026-03-20 更新2026-05-04 收录
下载链接:
https://data.mendeley.com/datasets/4c4zvgm2r6/1
下载链接
链接失效反馈
官方服务:
资源简介:
Monte Carlo (MC) simulations are a cornerstone of scientific computing in fields like medical physics, but their complexity often poses significant usability challenges. Setting up simulations requires intricate configuration and 3D geometry definition, which are error-prone and time-consuming tasks. Furthermore, the integration of MC tools into modern, Python-centric scientific workflows for analysis and AI can be difficult. This work addresses these challenges for the penRed MC code by introducing a comprehensive framework designed to enhance its accessibility, usability, and integration. We present pyPenred, a high-performance Python module that exposes the complete capabilities of penRed within the Python ecosystem. Built with pybind11, it allows computationally intensive particle transport to be handled by optimized C++ binaries while enabling seamless control and analysis in Python. Performance benchmarks show a minimal overhead of only 1–2% for locally compiled versions compared to native C++ execution. To simplify geometry creation and simulation setup, we developed a dedicated Blender plug-in. This integrated graphical environment supports constructing models with both quadric surfaces and triangular meshes, and provides an intuitive interface for defining materials, sources, and tallies. Finally, we have established robust cross-platform compatibility through continuous integration, automatically distributing pre-compiled binaries and pip-installable Python wheels for Linux, Windows, and macOS. Collectively, these contributions transform penRed from a specialized code-centric tool into an integrated and user-friendly simulation platform, lowering the barrier to advanced MC simulations and fostering tighter integration with contemporary data science workflows.

蒙特卡洛(Monte Carlo, MC)模拟是医学物理等领域科学计算的基石,但其复杂性往往带来显著的易用性挑战。开展模拟需要复杂的配置与三维几何定义,这类工作极易出错且耗时冗长。此外,将MC工具集成到以Python为核心的现代科学分析与人工智能(Artificial Intelligence)工作流中也颇具难度。本研究针对penRed这款MC代码的上述痛点,提出了一套全面的框架以提升其可访问性、易用性与集成性。 本文介绍了pyPenred:一款高性能Python模块,可在Python生态系统中完整调用penRed的全部功能。该模块基于pybind11开发,可将计算密集型的粒子输运任务交由优化后的C++二进制程序执行,同时支持在Python环境中实现无缝的控制与分析操作。性能基准测试结果显示,本地编译版本相较于原生C++执行仅存在1%~2%的极小性能开销。 为简化几何构建与模拟配置流程,我们开发了专属的布伦德(Blender)插件。该集成化图形环境支持通过二次曲面与三角网格构建模型,并提供直观的界面用于定义材料、粒子源与计数(tally)。最后,我们通过持续集成实现了可靠的跨平台兼容性,可为Linux、Windows与macOS系统自动分发预编译二进制程序与可通过pip安装的Python wheel包(Python wheels)。 综上,这些改进将penRed从一款以代码为核心的专用工具,转变为集成化且易用的模拟平台,降低了开展高级MC模拟的门槛,并推动其与当代数据科学工作流实现更紧密的集成。
提供机构:
Mendeley Data
创建时间:
2026-03-20
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作