0

I am using pymatgen to write .mcif files. My structures always have collinear magnetic moments of magnitude 4 along z, but before writing them to the file I noticed that pymatgen transforms them with the function Magmom.get_moment_relative_to_crystal_axes(). My questions are:

  • What does exactly this function do?
  • Why for some lattices my magnetic moments remain (0, 0, 4) and for some others I get three non-zero components and even the magnitudes are no more equal to 4?
Michele
  • 1
  • 1

1 Answers1

0

I'm actually responsible for that code so I hope I can answer your question :)

In brief, there are a few things to bear in mind:

• Assuming when you say "collinear magnetic moments always along z", you mean these are scalar collinear moments e.g. from a DFT calculation, it's worth bearing in mind that the current .mcif standard isn't really designed for representing scalar moments, which is why we arbitrarily choose the z axis. This is by convention however and has no physical meaning. I am told a future version of the .mcif standard will support scalar moments.

• We typically present magnetic moments relative in terms of the crystallographic lattice vectors because this is usually more scientifically meaningful. This means we need to have a conversion from the Cartesian x, y, z basis and into the lattice's a, b, c basis. This is what the Magmom.get_moment_relative_to_crystal_axes() method does.

• The magnitude of the resulting moment should be the same; if it is not this is a bug (please share if you have an example!) However, note that the lattice basis might not be orthogonal, which can make the math a bit trickier.

In regards to asking questions on pymatgen generally, note we also have a Google group, the Materials Project has a forum too, and in general we try to be responsive (I'm not sure anyone is currently monitoring stackoverflow however). You're also more than welcome to email myself directly. If you do find a bug, please do report it to the pymatgen GitHub Issues page, and we'll try and fix it asap.

Matthew
  • 1,366
  • 2
  • 15
  • 28