Preprint of: Timo A. Nieminen, Vincent L. Y. Loke, Alexander B. Stilgoe, Gregor Kn¨oner, Agata M. Bra´ nczyk, Norman R. Heckenberg and Halina Rubinsztein-Dunlop “Optical tweezers computational toolbox” Journal of Optics A 9, S196-S203 (2007) Optical tweezers computational toolbox Timo A Nieminen, Vincent L Y Loke, Alexander B Stilgoe, Gregor Kn¨oner, Agata M Bra´ nczyk, Norman R Heckenberg and Halina Rubinsztein-Dunlop Centre for Biophotonics and Laser Science, School of Physical Sciences, The University of Queensland, Brisbane QLD 4072, Australia Abstract. We describe a toolbox, implemented in Matlab, for the computational modelling of optical tweezers. The toolbox is designed for the calculation of optical forces and torques, and can be used for both spherical and nonspherical particles, in both Gaussian and other beams. The toolbox might also be useful for light scattering using either Lorenz–Mie theory or the T -matrix method. 1. Introduction Computational modelling provides an important bridge between theory and experiment—apart from the simplest cases, computational methods must be used to obtain quantitative results from theory for comparison with experimental results. This is very much the case for optical trapping, where the size range of typical particles trapped and manipulated in optical tweezers occupies the gap between the geometric optics and Rayleigh scattering regimes, necessitating the application of electromagnetic theory. Although, in principle, the simplest cases—the trapping and manipulation of homogeneous and isotropic microspheres—has an analytical solution— generalised Lorenz–Mie theory—significant computational effort is still required to obtain quantitative results. Unfortunately, the mathematical complexity of Lorenz– Mie theory presents a significant barrier to entry for the novice, and is likely to be a major contributor to the lagging of rigorous computational modelling of optical tweezers compared to experiment. If we further consider the calculation of optical forces and torques on non- spherical particles—for example, if we wish to consider optical torques on and rotational alignment of non-spherical microparticles, the mathematical difficulty is considerably greater. Interestingly, one of the most efficient methods for calculating optical forces