chr1shr / voro

Voro++: a three-dimensional Voronoi cell library in C++
Other
154 stars 44 forks source link

Voronoi tesselation #16

Closed lindasheila closed 3 years ago

lindasheila commented 3 years ago

Hi,

I have just discovered the Voro++ package,

I would like to use is to do the VORONOI TESSALATION of a cell made of 336 atoms.

I have an input file from DFT calculations (GeSe.xyz).

The GeSe.xyz contains x y z.

Follows what you wrote in the example, I have replaced the first column of the GeSe.xyz by numbers from 1 to 336(total number of atoms)

and I ran a set of command

voro++ -y 0 21.436602 0 22.928693 0 22.683096

voro++ -g 0 21.436602 0 22.928693 0 22.683096

I used gnuplot to visualize the result

splot 'GeSe.xyz.gnu' u 1:2:3 with lines

Now my questions:

It is the way to proceed?

How to visualize the data in GeSe.xyz_p.pov and GeSe.xyz_v.pov?

I have tried the following

povray +H640 +W640 +Oimport.png GeSe.xyz_v.pov

The error message 'undeclared identifier 's' found instead or 'undeclared identifier 'r' found instead

Please how to visualized those and extract useful information?

I would like to know the number of faces with certain number of edges. Please how to extract that information.

Thank you!

chr1shr commented 3 years ago

The POV-Ray files that Voro++ generates only contain the shapes to draw the Voronoi cells. Specifically, the _p.pov file contains the particles (drawn as spheres) and the _v.pov file contains the Voronoi cells (drawn with cylinders and spheres).

They cannot be passed directly to POV-Ray. You need to create a POV-Ray header file that provides additional information such as the positions of the camera and lights, as well as the textures of the objects. In addition, that file should set the variable r to be the radius of the spheres to draw the particles, and it should the variable s to be the radius of the cylinders for the Voronoi cells. The header file should then include the _p.pov and _v.pov files as components.

If you look in the examples/basic directory, you will find an example POV-Ray header file called import.pov. See also this example on the website for more information. Several other POV-Ray header files are provided as examples.