Author Topic: Can ovito scripting work in Jupyter notebooks?  (Read 274 times)


  • Newbie
  • *
  • Posts: 5
Can ovito scripting work in Jupyter notebooks?
« on: May 14, 2019, 07:28:03 PM »
I was about to add this to the end of my previous post, but I figured this might be a separate post. Is there currently any way to get ovito scripting working in a Jupyter notebook? That would make it easier to combine with the rest of my analysis workflow. The ideal would be if the ovito module could be imported and used while running an arbitrary python executable, or if the it could be pip/conda installed separately from the standard Ovito app. Alternatively, if an ovito-specific jupyter kernel could be made, that would be nice too. If none of this is feasible that's fine, I just want to find out one way or another whether things like this are possible at the moment.

Thanks in advance!

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Can ovito scripting work in Jupyter notebooks?
« Reply #1 on: May 15, 2019, 09:51:49 AM »

Please take a look at this section of the user manual:

We don't have any first-hand experience here with using the Ovito Python modules within Jupyter. But in general there are two possible strategies you can try: Either you keep using the Python interpreter that ships with Ovito ("ovitos") and use pip to install whatever third-party modules you need (e.g. jupyter). Or you build Ovito from source. Then you should be able to use its Python modules from other interpreters. This path is a bit more tricky, because the critical step here is to make sure that Ovito gets built against the right Python interpreter and against the right version of the Qt libraries. It must be same version that is used by the PyQt5 module installed in the same Python interpreter.

Note also that a colleague from Max-Planck-Institute in Düsseldorf has created a Conda package for Ovito 2.9.0:
« Last Edit: May 15, 2019, 09:54:17 AM by Alexander Stukowski »