OVITO
raw JSON → 3.15.3 verified Mon Apr 27 auth: no python
OVITO (Open Visualization Tool) is a scientific data visualization and analysis software for atomistic and particle simulation data. Version 3.15.3 supports Python 3.10+. It provides a Python module for scripting data import, modification, visualization, and analysis. The library is under active development by OVITO GmbH.
pip install ovito Common errors
error ModuleNotFoundError: No module named 'ovito' ↓
cause OVITO Python package not installed in the current environment.
fix
Run 'pip install ovito' or install the OVITO conda package.
error AttributeError: module 'ovito' has no attribute 'import_file' ↓
cause Importing from the wrong module path: ovito.import_file is deprecated since OVITO 3.0.
fix
Use 'from ovito.io import import_file' instead.
error RuntimeError: This operation is not supported in the current interpreter mode ↓
cause Attempting to use ovito in a non-OVITO Python interpreter without a valid license or without installing the pip package.
fix
Ensure you have installed 'ovito' via pip and have a valid license if required for certain features.
Warnings
breaking OVITO 3.0+ uses a new Python API that is not backwards compatible with OVITO 2.x scripts. ↓
fix Rewrite scripts to use the new module structure (e.g., ovito.io instead of ovito.import_file). Refer to the migration guide.
gotcha The ovito Python module is only available in the OVITO Python interpreter or when installed via pip. Running 'import ovito' in a standard Python environment may fail if the OVITO conda/pip package is not installed. ↓
fix Install OVITO via 'pip install ovito' or use the bundled Python interpreter that comes with the OVITO desktop application.
gotcha Modifiers are applied lazily: calling pipeline.compute() is required to get the data. Reading data before compute returns an empty DataCollection. ↓
fix Always call pipeline.compute() before accessing data or attributes.
Imports
- ovito
import ovito - DataCollection
from ovito.data import DataCollection
Quickstart
import ovito
from ovito.io import import_file
from ovito.modifiers import SelectTypeModifier
pipeline = import_file('simulation.dump')
mod = SelectTypeModifier(types=['Atom'])
pipeline.modifiers.append(mod)
data = pipeline.compute()
print(data.attributes['SelectType.count'])