pyiron_atomistics icon indicating copy to clipboard operation
pyiron_atomistics copied to clipboard

What's the difference between `spins` and `initial_magmoms`?

Open samwaseda opened this issue 2 years ago • 1 comments

I see initial_magmoms in structure.arrays and spin in tags. In HDF, the one is stored in structure/spins and the other one in structure/tags/spin. And in structure attributes, the one is used in structure.spins, the other is used in structure.get_initial_magnetic_moments(). Is there a particular reason for this?

samwaseda avatar Dec 06 '22 08:12 samwaseda

If I remember correctly one is from default from ASE and then we bolted our own on top. I think the double storing comes from the fact that ASE already defines .spins as equivalent to {get,set}_initial_magnetic_moments(), but we overload getattr/setattr to go into the tag list. I recently changed this a bit here, but I don't remember the details. :|

pmrv avatar Dec 06 '22 09:12 pmrv