Author Topic: Bug: Isosurfaces and Show Periodic Images  (Read 1329 times)

harivyasi

  • Newbie
  • *
  • Posts: 1
Bug: Isosurfaces and Show Periodic Images
« on: July 28, 2017, 12:04:16 PM »
There is a bug (program version 2.9.0 when using 'Create isosurfaces' and 'Show periodic images' modifiers together. If my work pipeline involves creating an isosurface (from a VASP CHGCAR file) and then using the 'Show periodic images' modifier, the isosurface does not get repeated over the newly created periodic images but is limited by the (original) simulation cell size (see image 1). If then I readjust the unitcell size by ticking 'Adjust simulation cell size', the isosurface blows up to cover the entire volume (see image 2). I guess the correct program behavior would be to repeat isosurfaces even for the extended cell. An option to switch on/off the isosurface repetition independent of simulation cell repetition would be even better :)

Thanks for including the isosurfaces utility in the first place, it was much required by the electronic structure community that uses OVITO.

Best,
Shashank
« Last Edit: July 31, 2017, 11:42:23 AM by harivyasi »

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Bug: Isosurfaces and Show Periodic Images
« Reply #1 on: July 28, 2017, 02:31:31 PM »
Hi Shashank,

Unlike other visualization programs, OVITO works with surface meshes that live in a truly periodic domain as defined by the simulation cell. As a consequence, a surface mesh cannot exist outside of the periodic box. Furthermore, if you change the box size and, with that, the periodicity length after the isosurface has been constructed, then things do not match anymore and you get strange results.

The advantage of a truly periodic surface description as employed by OVITO is that it is possible to translate the surface freely (e.g. using the Affine Transformation modifier) and the program will display the correct cuts at the simulation cell boundaries. Think of the simulation box as a "window" into the periodic domain which can be moved around.
The downside of this is that is not possible to change the box size. It must stay consistent with the periodicity length for which the surface has been computed.

The correct solution in your case would be to first apply the Show Periodic Images modifier and then construct the isosurface for the extended domain. However, the bad news is that the Show Periodic Images modifier is still incomplete. It doesn't replicate the grid data, only the atoms. I will have to take care of this and an issue in our bug tracker system has been created:

https://gitlab.com/stuko/ovito/issues/39

Anyway, I understand what the problem is that you are facing and I will think about better ways to deal with this limitation. There are several options that come to my mind. I suggest we continue this discussion in the issue thread linked above.

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Bug: Isosurfaces and Show Periodic Images
« Reply #2 on: September 23, 2017, 08:04:10 PM »
Here is a quick update on this topic:

The new development version of OVITO provides improved handling of periodic images. The Show Periodic Images modifier has been renamed to Replicate modifier and can now replicate (iso)surfaces as well as voxel data grids (e.g. charge density grids) in addition to particles/bonds. Furthermore, surfaces now carry their own periodic domain information, which is independent of the master simulation cell. So changing the cell dimensions no longer screws up the surface.

http://ovito.org/index.php/about/version-history
http://ovito.org/manual_testing/python/modules/ovito_data.html#ovito.data.SurfaceMesh