OTS — the Optical Tweezers Software

OTS — the Optical Tweezers Software covers both the theory and the practice of optical trapping and manipulation. For the theoretical part, we have developed packages to calculate optical forces within the geometrical optics approximation, the dipole approximation and the full electromagnetic theory; furthermore, we provide some code to perform Brownian dynamics simulations of optically trapped particles. For the practical part, we provide codes to perform digital video microscopy, optical tweezers calibration and force measurement, and holographic optical tweezers. All these codes are based on our research experience and are developed to the point where they can be readily used in research.

OTS is fully documented, accompanied by code examples and ready to be employed to explore more complex situations in learning, teaching and research. In fact, we have implemented OTS using an object-oriented approach so that it can easily be extended and adapted to the specific needs of users; for example, it is possible to create more complex optically trappable particles in the geometrical optics approximation by extending the objects provided for spherical, cylindrical and ellipsoidal particles. In particular, we have used OTS to prepare most of the original figures in this book.

In order to run OTS follow these steps:
1. Download OTS from the link below.
2. Unzip the downloaded file into the desired directory.
3. Launch MatLab and change the current folder to the directory chosen in step 2.
4. Execute ots.m by typing ots in the command line panel of MatLab. This loads all the files necessary to use OTS.

The OTS package contains the following subpackages:

  • OTS.m – (file) : Load the software packages
  • utility – (directory) : General utility functions
  • tools – (directory) : Common tools
  • shapes – (directory) : 3D geometrical shapes
  • beams – (directory) : Optical beams
  • go – (directory) : Geometrical optics
  • da – (directory) : Dipole approximation
  • mie – (directory) : Mie particles
  • emt – (directory) : Electromagnetic theory
  • bm – (directory) : Brownian motion
  • dvm – (directory) : Digital video microscopy
  • pfm – (directory) : Photonic force microscopy
  • hot – (directory) : Holographic optical tweezers



You can leave comments or signal bugs in the comment form below.

Previous versions and revision history.

8 thoughts on “OTS — the Optical Tweezers Software”

  1. Hi,

    Thanks a lot for your useful book and software.
    Is there any manual for this toolbox?

    Best regards,

    Vahid Shahabadi
    MSc of Physics,
    Institute for Advaced Studies in Basic Sciences,
    Zanjan, Iran.

    1. Hi,

      There is no separate manual for the toolbox because all the documentation is available within the code itself.

      You can start by modifying the examples corresponding to the exercises in the various chapters of the book. See Code Examples

      You can then gain a deeper understanding of the code by using the example files available within each code package (files example_***) and by perusing the documentation available for each function and object in OTS (help ***).

  2. Hi,

    I suspect a bug at line 65 in the class “InducedDipole.m” within version 1.0.1.
    At the assignment of id.rd, if a custom rd is given, the code assign it to lambda0.

  3. I think it is better for people to know that to install the ots software in MATLAB, they need to go to the extracted path and run OTS for the library of functions to install

  4. Hi,

    I have a question about the autocorrelation calibration program OTCalibACF. It ask me to enter the value of Sx which is the conversion factor. That means that I have to calculate Sx before I use the program?. Also which is the difference between Sx and au2m in OTCalibACF methods?

    1. Hi,

      > That means that I have to calculate Sx before I use the program?

      You don’t need to know Sx in advance. This can be fitted using OTCalibACF twice as shown in example_otcalibacf.m

      > which is the difference between Sx and au2m in OTCalibACF methods?

      Sx is an input parameter of the constructor and au2m() is a method which returns the input signal multiplied by Sx.

Leave a Reply