Author Topic: Two bugs with ovito?  (Read 1550 times)

trvsst

  • Newbie
  • *
  • Posts: 2
Two bugs with ovito?
« on: November 02, 2016, 07:11:42 PM »
I am new to Ovito, and first of all, thanks to the developer for creating such software. It definitely fills a very important need!!

I am experiencing two problems:

1) I am using Ovito to visualize lattices. Right now I am using the extended xyz format. The problem is exemplified in the attached two files. Both files visualize a 3d hexagonal lattice. MgZn2.xyz works perfectly. However, CaCu5.xyz somehow assumes that positions are rendered in relative positions instead of cartesian, and the plot is not correct. Both files are generated with the same program, and I cannot spot a difference. I would very much appreciate what could be the reason, and whether this is a bug.

2) In the calculation of Voronoi for MgZn2.xyz (and other similar scripts), I get the following error:
"The volume sum of all Voronoi cells does not match the simulation box volume. This may be a result of particles being located outside of the simulation box boundaries. See user manual for more information.
Simulation box volume: 6.1584
Voronoi cell volume sum: 6.1584"
which I cannot make sense.

I appreciate any help in resolving these two issues asap and thanks again for Ovito!

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 435
Re: Two bugs with ovito?
« Reply #1 on: November 03, 2016, 09:06:54 AM »
I'm happy seeing the first question being posted on this board.

1) Some MD codes store the atomic positions in reduced coordinates in XYZ files. OVITO tries to detect this case by analyzing the range of the XYZ coordinates. If XYZ coordinates of all atoms fall into the range [-0.01, 1.01], then OVITO assumes they are given in reduced units and will rescale them to absolute coordinates while reading the file. Unfortunately, in your dataset CaCu5.xyz, the absolutes coordinates are all within this range, so OVITO is doing the wrong thing. I will think about how to improve this defection heuristic for reduced XYZ coordinates. But it may be that the only solution is to introduce an explicit user option that suppresses the automatic rescaling of coordinates.

For the time being you can work around the issue by making sure some of the coordinates in your XYZ file are outside the [-0.01,1.01] range. For example, you can shift all Z coordinates by one box length, which is 1.0. Then apply the Wrap at Periodic Boundaries modifier within OVITO to map the atoms back into the box. I have attached a modified version of your file to demonstrate this.

2) First: There is no apparent difference between the two numbers in the error message because not enough decimal places are shown. The difference is <1e-4 but still large enough for OVITO to complain about it. I will make sure that more decimal places are printed in the error message in the future.

Regarding the cause of the message: As a sanity check, OVITO computes the sum of all Voronoi cells and compares it to the volume of the simulation cell. The two numbers should always match unless some atoms are located outside of a (non-periodic) simulation cell. In this case the Voronoi cells computed for atoms not inside the cell are invalid and OVITO warns you about this. However, even if the calculation is correct, due to numeric errors the sum of Voronoi cells might not exactly match the cell volume. So OVITO works with a threshold to tolerate a small deviation. This threshold was chosen too small in OVITO 2.7.1 and previous versions, which could led to false alarms like in your case. In the current development version the threshold has been raised and the error message goes away. So please download the current development version of OVITO from the website.

trvsst

  • Newbie
  • *
  • Posts: 2
Re: Two bugs with ovito?
« Reply #2 on: November 03, 2016, 04:06:39 PM »
Thanks a lot for the prompt response!

Everything works perfectly. In my case, because I am using arbitrary units, I can also rescale coordnates by a constant so that numbers are larger than 1.

I also downloaded the development version, and Voronoi works beatifuly. One follow up question, Is there a simple way to draw the Voronoi polyhedra, instead (or in addition) to the actual bonds?

Thanks again for ovito!

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 435
Re: Two bugs with ovito?
« Reply #3 on: November 03, 2016, 04:50:17 PM »
No, I'm sorry. The Voronoi polyhedra are not permanently stored by OVITO after computing their volume and counting their faces. And there is no function for visualizing the polyhedra.