Cannot read the structure file with full style correctly / Construct surface mesh

Hi. I have 2 structure files, which Ovito can read the 1st structure file (structure.dat) with full style correctly. However, for 2nd file (surface_layer.dat), it will ignore the column nx ny nz and cannot read the file. I can’t see the difference between the files and I’m just curious what is the reason causing this.

Thanks!

structure.dat (430.8 KB)
surface_layer.dat (104.8 KB)

In your second file, there are two empty lines between the Atoms section header and the contents:

Atoms 


1 1 1 0.0 1.25 1.25 19.9176    0 0 0 
2 2 1 0.0 1.25 3.58345 17.5842 0 0 0 
3 3 1 0.0 1.25 5.9169 15.2507 0 0 0 

This is what causes the trouble. OVITO’s data file parser expects only one empty line - as in your first file.

Here is what the LAMMPS documentation says about the format:

The body of the file contains zero or more sections. The first line of a section has only a keyword. […] The next line is always skipped. The remaining lines of the section contain values. The number of lines depends on the section keyword as described below. Zero or more blank lines can be used between sections.

I see… thanks for pointing out the mistake!

If you don’t mind, just curious is there any way Ovito can compute the surface area of the atom layer?

I actually plan to process the atoms, so that only the atom surface layer remains, and I will use a python script to form a mesh between the atoms coordinates (a triangular surface) to compute the surface area of the curvature surface.

However after some trial it doesn’t give a very good results and the surface area computed exceeds the flat surface area value ridiculously. Appreciate if you have some idea on this. Thanks!

Yes, please have a look at this very detailed chapter about the Construct Surface mesh modifier in OVITO.

Great. Thanks for pointing out the section! I try to use the modifier:

It seems to give a reasonable surface area when comparing to the flat surface. I’m actually interested at the upper surface layer but it seems that Ovito will always compute the whole structure surface area (which I will just divide by 2 as approximation…)

Thanks again!

Nice! Please bear in mind that the alpha-shape method is not designed for planar, sheet-like configurations of particles. It is only suitable for reconstructing the boundary of a cluster of particles that represents a true three-dimensional volume, i.e., a spatial region that has an interior and an exterior. That’s also why the surface manifold constructed by the algorithm is always fully closed. If you repeat the analysis for your bulk structure, subtracting the bottom surface is the right idea.

And as a general note of caution: The resulting surface area depends both on the probe sphere radius and the smoothing level parameters you have used. Therefore, it’s crucial to accurately record these parameters when presenting your results.

mesh_demo

In OVITO Pro, one would have more flexibility. You could e.g. write a custom Python Modifier that sums up the area of a selection of triangle faces only. Alternatively, the “Identify volumetric regions” option of the Construct Surface mesh modifier would also yield partial surface areas.

Thanks for the suggestion! So there’s no need to extract the top atom layer as bulk structure is even easier :slight_smile: . Yeah I notice the alpha-shape method will consider the interior atom space too. So in my case, do you think the gaussian density method is better (like in the previous picture but I will replace with bulk structure)?

I’d say either one works for your case. The key thing to consider is that the Gaussian density method explicitly considers the (display) radii of the particles. It’s totally your choice to decide what suits your needs best.

Ok. Thanks again for your help!