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:
Does “v_mag_z” represent the magnetic moment of the spin, or is it related to the spin itself?
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.
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),