A Python package for fast GPU‐based proton pencil beam dose calculation - Bhattacharya, Mahasweta; Reamy, Calin; Li, Heng; Lee, Junghoon; Hrinivich, William T. (Journal of applied clinical medical physics, 2025)
Purpose 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. Methods 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. Results 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. Conclusion 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.