Units of "mag_z" in SPIN PACKAGE

Dear LAMMPS users,

I’m currently working on a spin-lattice system and have calculated the “total magnetization in the z-direction” using the following commands:

compute out_mag all spin
variable mag_z equal c_out_mag[3]

I’m trying to understand the physical meaning and units of the quantity “v_mag_z”, but I can’t find the information in the LAMMPS manual. Specifically, I’d like to know:

  1. Does “v_mag_z” represent the magnetic moment of the spin, or is it related to the spin itself?
  2. What are the units of “v_mag_z”?

My goal is to calculate the spin angular momentum.

Any clarification on this would be greatly appreciated!

As mentioned before, when asking specific details about a contributed package in LAMMPS you have the best chance of a response if contact the author, e.g. by using an “at mention” like @julient or sending a personal email.

Thank you so much for your quick response! As someone new to LAMMPS, I truly appreciate your experience and advice.

All the best!

Hello,

In your script, the ‘v_mag_z’ quantity has no unit. It represents the average magnetization along the z axis, taken over all spins present in the box.
In other words, you compute ‘v_mag_z’ by summing the z components of all normalized spins in your systems, and dividing that number by the number of spins.

More generally, the compute_spin command can output 6 quantities:

  • the average magnetization along the x axis (no dimension),
  • the average magnetization along the y axis (no dimension),
  • the average magnetization along the z axis (no dimension),
  • the total average magnetization (which is the norm of the three components stated above, so also without dimension),
  • the magnetic energy (in eV),
  • the spin temperature (in K).

Hope this helps!
Best,
Julien.

Dear Julient,

Thank you for your prompt and detailed reply. Your explanation is extremely clear and thorough, and it has been very helpful to me.

Wishing you all the best!
Best regards,
Xin Nie