Author Topic: Reading Particle Orientation from GSD File  (Read 122 times)

NutsandBoltz

  • Newbie
  • *
  • Posts: 4
Reading Particle Orientation from GSD File
« on: April 03, 2018, 04:30:28 PM »
Hello!

I have run a hpmc simulation in HOOMD-blue and dumped particle trajectories (including individual particle orientations) to a .gsd file. I have successfully imported the .gsd file into Ovito, but when I play the animation the particle orientations are remain aligned with the simulation's global axes. I would like to get Ovito to include changing particle orientation in the animation, but I am unsure of how to do this.

I think what I might need to do is adjust Ovito's column mapping for my .gsd file, but I'm unsure of how to do this. I have read about how this problem can be addressed for LAMMPS files, both through the UI (https://www.ovito.org/manual/usage.particle_properties.html) and through scripting (https://ovito.org/manual/python/modules/ovito_io.html). However, it's not clear to me how I could do this for a .gsd file format.

I've attached my data file below. My version of Ovito is 2.9.0. Any help or advice would be appreciated. Thank you!

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 409
Re: Reading Particle Orientation from GSD File
« Reply #1 on: April 03, 2018, 06:39:16 PM »
Hi,

Ovito reads in the orientation information from the GSD file. But since particles are rendered as spheres by default, you cannot see the orientations. To make them visible, all you need to do is switch the particle display shape from the default "Sphere/Ellipsoid" setting to "Cube/Box". This is shown in the attached screenshot.

You didn't mention what shape the particles in your HPMC simulation actually have. If they are not cubes, you might need to take additional steps. For example, to render ellipsoids, switch the particle shape back to "Sphere/Ellipsoid" in Ovito and use the Compute property modifier to assign the "Aspherical Shape" particle property. This will turn the spherical particles into ellipsoids and you will see their orientation again.

-Alex
« Last Edit: April 03, 2018, 06:42:27 PM by Alexander Stukowski »

NutsandBoltz

  • Newbie
  • *
  • Posts: 4
Re: Reading Particle Orientation from GSD File
« Reply #2 on: April 03, 2018, 11:09:21 PM »
That works!

The particles were treated as 2D squares in HOOMD-blue, and when I tried to rendering them as squares in Ovito they did not change orientation. Rendering them as cubes does the trick, though. Thank you!

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 409
Re: Reading Particle Orientation from GSD File
« Reply #3 on: April 03, 2018, 11:15:51 PM »
Yes, it's a pitfall: In "square" mode, the orientations are ignored.

In this mode, the particle squares always face toward the viewer. In other words, the camera orientation already dictates the orientation of the squares in the three-dimensional space. There is no way to combine this scheme with the orientations loaded from the GSD file.