Author Topic: Voronoi analysis modifier doesn't seem to work?  (Read 1257 times)

DerekAP

  • Newbie
  • *
  • Posts: 2
Voronoi analysis modifier doesn't seem to work?
« on: September 29, 2017, 04:53:36 AM »
Hi,
  In windows version of Ovito, after loading file from VASP (XDATCAR or CONTCAR) and adding voronoi analysis modifier, I see "Voronoi anlysis" option panel shows up, but where could I find the result?
  Thanks a lot!

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Voronoi analysis modifier doesn't seem to work?
« Reply #1 on: September 29, 2017, 10:23:53 AM »
Hi,

The computation results are there, but they are not immediately visible. You need to take some actions.

After the Voronoi modifier has done its work (which should be the case, unless there was an error message), the computation results are stored as new per-atom properties and will be available for further processing or visualization steps.

To see what properties an atom currently has, position the mouse cursor on the atom and OVITO will displays the information in the status bar. Or better: Use the Particle Inspection Utility.

Now you have several ways to use the computed information. For example, you could use the Color Coding modifier of OVITO to visualize the atomic volume with a color that is assigned to each atom. Or you could use the Expression Select modifier to select certain atoms with a specific type of Voronoi index and highlight or count them. Or you could simply use the Export File function of OVITO to write the computed Voronoi information to an output file.

DerekAP

  • Newbie
  • *
  • Posts: 2
Re: Voronoi analysis modifier doesn't seem to work?
« Reply #2 on: October 02, 2017, 11:26:12 AM »
Dear Alex,

Thank you very much! I kept trying to export file as "calculation results text file", but it didn't give the information I need, after reading your reply, I tried export results as XYZ file, and it worked! With some simple Python script, I am able to get the statistical data I want. Thank you!

There is still something I can't figure out, though. Is it possible to use Expression Select to designate the content in "Export File"? For example, after voronoi analysis, I would like to export the voronoid indices of only "ParticleType==1", but it didn't seem to work that way.

Thanks a lot!


Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Voronoi analysis modifier doesn't seem to work?
« Reply #3 on: October 02, 2017, 05:18:35 PM »
The "Calculation results text file" format is only for exporting global quantities (e.g. the total count of some sort of atoms), but not for per-atom data. For the latter you need to use an atomistic file format such as XYZ.

You can export only a subset of atoms to an XYZ file. For this you need to do two things: First select atoms which you don't want to export (e.g. using the Expression Select modifier), then remove them by applying the Delete Selected Particles modifier. Only the remaining atoms will be exported.

Note that there is also a Invert Selection modifier in case it is easier for you to select the atoms you want to export.

The Expression Select modifier has another function: It outputs the number of selected particles (e.g. those fulfilling your criterion) as a global attribute. This value can be exported to a text table file using the "Calculation Results Text" format (typically as a function of simulation time).