chr1shr / voro

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

Questions when I import particles' infos #17

Closed zjufrcon closed 1 year ago

zjufrcon commented 3 years ago

Hi, I am new guy to voro++. When I import particle information based on the example/basic, I import 2000 particles' coordinate with box length 121212, but in pack_ten_cube_p.pov generated by import, it seems that file only contains less than 2000 particle(it should be 4000 rrows, but I got a 1300 rows' file).I have tried to change parameters in import.cc, but it doesn't work, could anyone give me some suggestions? Thanks.

chr1shr commented 3 years ago

There are two likely explanations:

You might also want to check the format of your input file—see here for more information.

zjufrcon commented 3 years ago

There are two likely explanations:

  • If particles are outside the container size that you specify, then they are ignored by the library. Hence they won't be present in the output file.
  • If the Voronoi cells fail to compute for some reason, then they are also omitted from the output file. That can sometimes happen if you have duplicate particles at the same position, since the Voronoi tessellation is mathematically undefined in that case.

You might also want to check the format of your input file—see here for more information.

HI, thanks for reply, I think I have solved the problem yesterday. I solve it as below:

But I still can't figure out the problem when I used import.cc, for you opinion:

Thanks again.

chr1shr commented 3 years ago

I'm not sure what is causing the issue with the import.cc example. It's possible it could be a new line issue. In the import.cc example, you could add the following line after the particles have been imported:

printf("Total imported: %d\n",con.total_particles());

That will tell you exactly how many particles were imported from your file. You could also use:

con.draw_particles("particles.dat");

This will output a text file of the particles that were successfully imported. This would give you an idea of why some appear to be missing.

zjufrcon commented 3 years ago

I'm not sure what is causing the issue with the import.cc example. It's possible it could be a new line issue. In the import.cc example, you could add the following line after the particles have been imported:

printf("Total imported: %d\n",con.total_particles());

That will tell you exactly how many particles were imported from your file. You could also use:

con.draw_particles("particles.dat");

This will output a text file of the particles that were successfully imported. This would give you an idea of why some appear to be missing.

Thank you very much, by the way, can voro++ computes which container is triclinic box like (xmin, xmax, ymin,ymax, zmin, zmax, xy, xz,yz), xy, xz yz are tilt values? Because I didn't find class to use for it.

chr1shr commented 3 years ago

Yes, Voro++ can work in triclinic boxes. There is a sequence of papers on this:

  1. Thomas F. Willems, Chris H. Rycroft, Michaeel Kazi, Juan C. Meza, and Maciej Haranczyk, Algorithms and tools for high-throughput geometry-based analysis of crystalline porous materials, Microporous and Mesoporous Materials 149, 134–141 (2012). doi:10.1016/j.micromeso.2011.08.020

  2. Marielle Pinheiro, Richard L. Martin, Chris H. Rycroft, Andrew Jones, Enrique Iglesia, and Maciej Haranczyk, Characterization and comparison of pore landscapes in crystalline porous materials, J. Mol. Graph. Model. 44, 208–219 (2013). doi:10.1016/j.jmgm.2013.05.007

  3. Marielle Pinheiro, Richard L. Martin, Chris H. Rycroft, and Maciej Haranczyk, High accuracy geometric analysis of crystalline porous materials, CrystEngComm 37, 7531–7538 (2013). doi:10.1039/c3ce41057a

See the zeo directory and the cp_test.cc example. One caveat is that you have to rotate your unit vectors to the form (bx,0,0), (bxy,by,0), (bxz,byz,bz) but this is always is possible via the polar decomposition. Currently, this functionality is not accessible via the command-line interface and that's something I plan to address in the next version.

zjufrcon commented 3 years ago

Yes, Voro++ can work in triclinic boxes. There is a sequence of papers on this:

  1. Thomas F. Willems, Chris H. Rycroft, Michaeel Kazi, Juan C. Meza, and Maciej Haranczyk, Algorithms and tools for high-throughput geometry-based analysis of crystalline porous materials, Microporous and Mesoporous Materials 149, 134–141 (2012). doi:10.1016/j.micromeso.2011.08.020
  2. Marielle Pinheiro, Richard L. Martin, Chris H. Rycroft, Andrew Jones, Enrique Iglesia, and Maciej Haranczyk, Characterization and comparison of pore landscapes in crystalline porous materials, J. Mol. Graph. Model. 44, 208–219 (2013). doi:10.1016/j.jmgm.2013.05.007
  3. Marielle Pinheiro, Richard L. Martin, Chris H. Rycroft, and Maciej Haranczyk, High accuracy geometric analysis of crystalline porous materials, CrystEngComm 37, 7531–7538 (2013). doi:10.1039/c3ce41057a

See the zeo directory and the cp_test.cc example. One caveat is that you have to rotate your unit vectors to the form (bx,0,0), (bxy,by,0), (bxz,byz,bz) but this is always is possible via the polar decomposition. Currently, this functionality is not accessible via the command-line interface and that's something I plan to address in the next version.

Thanks for reply, and now I have made some analysis with voro++, it helps a lot. When I calculate local fraction (particle_volume)/(cell_volume), some vaules will more than 1.I used command-line interface to calculate imported file with perioid boundary. I am not sure if it is normal in voro++.

chr1shr commented 3 years ago

That can only happen if the particles (when viewed as spheres) actually overlap with each other. If they don't overlap with each other, then each particle should be fully contained within its Voronoi cell and (particle_volume)/(cell_volume) should be less than 1.