pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
44 stars 15 forks source link

Why isn't `centrosymmetry` not 0? #267

Closed samwaseda closed 3 years ago

samwaseda commented 3 years ago

The following lines

from pyiron import Project
Project('.').create.structure.bulk('Fe', cubic=True).analyse.pyscal_centro_symmetry()

produce array([0. , 6.177675]). Why aren't they both 0?

samwaseda commented 3 years ago

By the way with Ovito I get the same values.

srmnitc commented 3 years ago

@samwaseda I remember this issue came up before, but I cannot find the thread now. In any case, it is because of the number of neighbours selected for the calculation. Here it is N=12; so for bcc, it is atoms of the first shell, and some atoms from the second shell. The CSP calculated then depends on how these extra neighbours are chosen, and it is different for ovito and pyscal. None of these values are correct anyway. For bcc, N=8 or N=14 would be the correct choices, which would give a CSP of 0.

samwaseda commented 3 years ago

Ah brilliant! But why doesn't pyscal choose the number of neighbours automatically? (Especially given the fact that it does a great job when it comes to CNA?)

srmnitc commented 3 years ago

N is sort of an input parameter; and you can get different information based on the choice of N. So I left it as such :) The default is set to 12, similar to ovito.

samwaseda commented 3 years ago

But wouldn't it be more attractive for the user (and possibly demonstrate the full power of pyscal) if the default is N=None and pyscal chooses the proper value when the number of neighbours is not specified?

srmnitc commented 3 years ago

That is great idea. Also could be done without much trouble. I will have it in one of the future releases!