Code examples

This page presents complete example scripts and extensions, which you can use as starting points for your own work. The OVITO Extensions Directory contains many more Python extensions shared by other users.

Python scripts

Python scripts

Python scripts that use OVITO as a library to perform analysis or visualization tasks non-interactively (see Two ways of using OVITO’s Python API). You run them with a Python interpreter or ovitos.

User-defined modifiers

OVITO Pro Python scripts

User-defined modifiers written in Python, which you can use in OVITO Pro or insert into a pipeline in a Python script.

User-defined viewport layers

OVITO Pro Python scripts

User-defined viewport layers, which enrich rendered images and movies with text or graphics, e.g. data plots computed from the simulation data. In OVITO Pro, they also appear in the interactive viewports.

User-defined file readers

OVITO Pro Python scripts

User-defined file readers for importing data from new file formats. Once installed, they take part in the automatic format detection of OVITO Pro’s file import function and of the import_file() function.