Python scripting

OVITO provides a scripting interface that lets you automate analysis and visualization tasks. This can be useful, for example, when a large number of input files needs to be batch-processed. The scripting interface provides programmatic access to most program features such as input and output of data files, modifiers, and rendering of images and movies.

Scripts for OVITO are written in the Python programming language. If you are not familiar with Python, you can find several tutorials and books online that cover this subject. Note that OVITO is based on the Python 3.x language standard.

OVITO's scripting interface is documented in a separate Scripting Reference manual. You can accessed it directly from OVITO's help menu.

In addition to automating tasks, the scripting interface allows you to extend OVITO. For example, the Python script modifier provides a mechanism for you to write your own data manipulation function and integrate it into OVITO's modification pipeline system. Furthermore, the Python script overlay lets you write your own Python function to add arbitrary 2D graphics to rendered images or movies, for example to enrich the visualization with additional information like a scale bar.