Open SpiritSuperUser opened 5 years ago
Maybe a clear warning in the API documentation would be sufficient? Probably the local charge density is anyways only really useful in cases where the magnetisation varies slowly, such that the difference between triangulations is negligible.
Even in cases where the magnetization varies slowly the arbitrary choice of the triangulation has negative side effects. The main problem I see is the symmetry breaking. If one wants to use the local charge in some further postprocessing, this might be unfavorable. So I think it would be good to have a symmetrized version at least for the implemented lattice types when only one atom in the unit cell is used.
Besides that, I agree that a clear warning in the documentation could just state that one has to have the arbitrariness of the triangulation in mind when one uses more-atomic unit cells and/or arbitrarily shaped unit cells.
Maybe the mathematically well-defined charge density could be calculated without this dependence on the triangulation. In fact, I should hope so, as our spin current or micromagnetic implementations would otherwise suffer from the same problem.
It might be useful to be able to print the local topological charge
things to consider: the choice of the triangulation is kind of arbitrary. This results in an improper definition of the local charge. One might average over all triangulations. In the case of one atom per unit cell this would be two sets, in the case of more than one atom one might have to think about a reasonable way or just print the charge for one triangulation.