Understanding weights in analysis.local_env classes voronoiNN and crystallNN

Dear Pymatgen developpers, maintainers and/or users,

Being a new user of pymatgen I am trying to understand how to properly use the analysis.local_env voronoiNN and crystallNN libraries. I understand from the documentation that the nearest-neighbor weight is calculated based on the solid angle of the corresponding facet of the Voronoi polyhedron (modulated with additional “smooth distance cutoffs” and electronegativity differences in the CrystalNN class), but I haven’t been able to find in the source code the mathematical relation between the solid angle and the NN weight in VoronoiNN. Can someone explain this to me and/or help me locate this in the source code ?

Then (and maybe more importantly) I would like to understand how to properly use this weight (as defined in VoronoiNN or in CrystalNN) to characterize the local structural unit formed by a given atom in a crystalline or amorphous system.

Finally there appears to be some overlap between the possibilities of the local_env and chemenv subpackages (I have not yet looked at the latter in detail) and maybe someone can help me understand which subpackage should be considered in priority and for what usage. My goal would be to relate the type of local chemical environment (typically within the first and second coordination sphere) to local experimental probes such as NMR or total diffusion in systems (e.g. oxides, chalcogenides) ranging from crystalline to amorphous.

Thank you very much for your help.
All the best.

Sylvian

Hi @scadars,

First my apologies for the delay in responding. We have actually has had a manuscript published that provides a lot more information on CrystalNN and other co-ordination algorithms, please see here (doi: 10.1021/acs.inorgchem.0c02996) and maybe this answers your questions.

Finally there appears to be some overlap between the possibilities of the local_env and chemenv subpackages (I have not yet looked at the latter in detail) and maybe someone can help me understand which subpackage should be considered in priority and for what usage.

The chemenv and local_env packages are simply developed by different teams using slightly different approaches. The chemenv paper can be found here (doi: 10.1107/S2052520620007994).

I would note make a value judgement on which is best, except to say try both and see which is better for your application. The API for local_env is a bit simpler to get started, though there is a nice tutorial on chemenv here.

Best,

Matt

I had a relevant question w.r.t CrystalNN/VoronoiNN as well. Does either of these two methods uses the Voronoi Analysis based on the Qhull algorithm? If so, how is the Periodic Boundary Condition taken care of?