Closed zjufrcon closed 1 year ago
There are two likely explanations:
You might also want to check the format of your input file—see here for more information.
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:
I use matlab to transfer lammps.dump file to voro++ imported file by fprintf(file, '%d %g %g %g\n',particleID(i),x(i),y(i),z(i)), and got a file then imported into voro++ based on example/basic/import. Then I meet problem as below I described. Then I guess if there was a problem in space or New line. So I deleted particles to only number of 2 particles. But voro++ only read 1particle. And to make sure if it is problem of file format, I read example file 'pac_ten_cube' and printed it again in matlab by fprintf, however, it works correctly. So it seems that problem isn't caused by file format.
Then I wrote a new import.cc which as same as the example/basic/import.cc, then complied it and the problem was solved.
Finally I also tried with example/custom/radical.cc, I found it also works for me.
But I still can't figure out the problem when I used import.cc, for you opinion:
Thanks again.
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.
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.
Yes, Voro++ can work in triclinic boxes. There is a sequence of papers on this:
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
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
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.
Yes, Voro++ can work in triclinic boxes. There is a sequence of papers on this:
- 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
- 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
- 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++.
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.
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.