Click here to

Session: Novel Imaging and Therapy Solutions [Return to Session]

TopasOpt: An Open-Source Library for Optimization with Topas Monte Carlo

B Whelan1,2*, B Loo2, P Keall1, (1) University of Sydney, Sydney, NSW, AU (2) Stanford University, Stanford, CA


MO-F-BRC-6 (Monday, 7/11/2022) 1:45 PM - 2:45 PM [Eastern Time (GMT-4)]

Ballroom C

Purpose: Monte Carlo simulation of radiation transport is ubiquitous across many fields and industries and is considered the most accurate mechanism of calculating dose. Models are defined by parameters, and a very common problem is to find the optimal parameter set for some application - for example; to optimize the design of a new medical device, or to match experimental data. There is currently no simple way to handle these situations with any mathematical rigour. In this work, an open-source optimization library for Topas Monte Carlo termed TopasOpt is presented. TopasOpt allows end users to apply optimisation algorithms to any parameter of any existing topas model.

Methods: TopasOpt requires several components: a) Parameters to be optimised and allowed ranges b) a function which generates a topas model as a function of these parameters, and c) an objective function which analyses the results from (b) and returns a number to the optimiser. TopasOpt includes code to automatically generate Part b) from an existing topas model. These user defined components are passed to a TopasOpt optimzer. Currently two algorithms are implemented, Bayesian Optimisation and Nelder-Mead method. To demonstrate TopasOpt, a worked example using a simple collimator was developed. Three geometric parameters were randomized, and Bayesian optimisation used to attempt to recover the starting (ground truth) values. The objective function was based on the absolute differences between depth-dose curve and iso-profile between a given model and the starting (ground-truth) model, and 40 iterations were run.

Results: The average difference between the ground-truth and optimised parameters was 3.3% (10% max). To achieve this accuracy using an approach such as grid-search would take >500 iterations, versus the 40 iterations used here.

Conclusion: An open-source library bringing the power of inverse optimization to Monte Carlo modelling has been developed and demonstrated.

Funding Support, Disclosures, and Conflict of Interest: NCI grant 2R44CA217607, NHMRC grant 5284296, NHMRC grant APP1132471.


Not Applicable / None Entered.


Not Applicable / None Entered.

Contact Email