# A Python package for fast GPU‐based proton pencil beam dose calculation

**Authors:** Mahasweta Bhattacharya, Calin Reamy, Heng Li, Junghoon Lee, William T. Hrinivich

PMC · DOI: 10.1002/acm2.70093 · 2025-04-09

## TL;DR

This paper introduces a fast, Python-based GPU tool for proton therapy dose calculations, balancing speed and accuracy for research and planning.

## Contribution

A new Python package implementing a GPU-based double Gaussian pencil beam algorithm for fast proton dose calculation in IMPT planning.

## Key findings

- The PB algorithm achieved sub-second computation times with high accuracy in dose metrics and gamma passing rates.
- Accuracy degraded in highly heterogeneous regions like bone and lung boundaries due to lateral proton scatter inaccuracies.
- The package simplifies integration for IMPT research with a single Python import statement.

## Abstract

Open‐source GPU‐based Monte Carlo (MC) proton dose calculation algorithms provide high speed and unparalleled accuracy but can be complex to integrate with new applications and remain slower than GPU‐based pencil beam (PB) methods, which sacrifice some physical accuracy for sub‐second plan calculation. We developed and validated a Python package implementing a GPU‐based double Gaussian PB algorithm for intensity‐modulated proton therapy (IMPT) planning research applications requiring a simple, widely compatible, and ultra‐fast proton dose calculation solution.

Beam parameters were derived from pristine Bragg peaks generated with MC for 98 energies in our clinical treatment planning system (TPS). We validated the PB approach against measurements by comparing lateral spot profiles (using single‐Gaussian sigma) and proton ranges (using R80) for pristine Bragg peaks, as well as spread‐out Bragg peaks (SOBPs) in water. Further comparisons of PB and MC from the TPS were performed in a heterogeneous digital phantom and patient plans for four cancer sites using 3D gamma passing rates and dose metrics.

The PB algorithm enabled dose calculation following a single Python import statement. Mean ± standard deviation (SD) errors in sigma, R80, and SOBP dose were 0.05 ± 0.01, 0.0 ± 0.1 mm, and 0.4 ± 1.1%, respectively. Mean ± SD patient plan computation time was 0.28 ± 0.07 s for PB versus 4.68 ± 2.68 s for MC. Mean ± SD gamma passing rate at 2%/2 mm criteria was 96.0 ± 5.1%, and the mean ± SD percent difference in dose metrics was 0.5 ± 3.6%. PB accuracy degraded beyond bone and lung boundaries, characterized by inaccuracies in lateral proton scatter.

We developed a GPU‐based proton PB algorithm compiled as a Python package, providing simple beam modeling, interface, and fast dose calculation for IMPT plan optimization research and development. Like other PB algorithms, accuracy is limited in highly heterogeneous regions such as the thorax.

## Full-text entities

- **Diseases:** cancer (MESH:D009369)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12148800/full.md

---
Source: https://tomesphere.com/paper/PMC12148800