Open MSallermann opened 5 years ago
It would maybe be better not to set mu_s=0
for a vacancy. In the most general case, one has to then store the previous mu_s
in case the vacancy is removed.
Setting mu_s=0
for a vacancy is, as far as I am aware, only needed for the DDI. But there one could also achieve the desired behaviour by checking for the atom_type
(like it is done for the other interactions). Overall this would likely be less cumbersome.
While I would not say this is a bug, as it was designed this way, I agree with your suggestion to change the behaviour. As far as I remember, something other than DDI was the reason, but I can currently not think of any reason to keep the current behaviour.
Note that the calculation of the magnetisation is another example where vacancies are not properly treated - especially if mu_s is nonzero. The topological charge could use a corresponding if
-statement as well.
When an atom type different from a vacancy is set the magnetic moment should be restored.