I am a newbie. I want to calculate the Curie temperature of some simple systems i.e. iron using the LAMMPS SPIN package. I need some help in preparing the input file. What I have understood is I have to equilibrate the system at different temperatures using magnetic exchange calculated from DFT. Is it correct? Is the example for Fe given in the examples for the SPIN package good to start with?
Thanks in advance.
Can you be more specific as to what kind of help you need exactly?
These are questions for @julient, the author of the SPIN package.
Basically, I want to calculate the magnetization at various temperatures e.g. 0 to 1500 K at an interval of 100 K. Taking the iron input file from examples, how should I modify it? Here is the input file from the examples folder.
boundary p p p
necessary for the serial algorithm (sametag)
atom_modify map array
lattice bcc 2.8665
region box block 0.0 5.0 0.0 5.0 0.0 5.0
create_box 1 box
create_atoms 1 box
setting mass, mag. moments, and interactions for bcc iron
mass 1 55.845
set group all spin 2.2 -1.0 0.0 0.0
velocity all create 100 4928459 rot yes dist gaussian
pair_style hybrid/overlay eam/alloy spin/exchange/biquadratic 3.5
pair_coeff * * eam/alloy Fe_Mishin2006.eam.alloy Fe
pair_coeff * * spin/exchange/biquadratic biquadratic 3.4 0.02726 0.2171 1.841 0.0 0.0 2.0 offset yes
neighbor 0.1 bin
neigh_modify every 10 check yes delay 20
fix 1 all precession/spin cubic 0.001 0.0005 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
fix_modify 1 energy yes
fix 2 all langevin/spin 0.0 0.0 21
fix 3 all nve/spin lattice moving
compute and output options
compute out_mag all spin
compute out_pe all pe
compute out_ke all ke
compute out_temp all temp
variable magx equal c_out_mag
variable magy equal c_out_mag
variable magz equal c_out_mag
variable magnorm equal c_out_mag
variable emag equal c_out_mag
variable tmag equal c_out_mag
thermo_style custom step time v_magx v_magy v_magz v_magnorm v_tmag v_emag pe etotal
compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 1 all custom 100 dump_iron.lammpstrj type x y z c_outsp c_outsp c_outsp
min_modify alpha_damp 1.0 discrete_factor 10
minimize 1.0e-16 1.0e-16 10000 10000
Thanks and regards
This should be rather straightforward. The easiest way is to run different simulations, each one of them at a different temperature.
To set the spin thermostat at a given temperature, you can have a look at the documentation of the fix Langevin/spin command:
If you want to also add lattice vibrations (and so, lattice temperature) to your calculation, you can add a simple fix Langevin to do that.
Once one of those simulations has been running for long enough, take the time average of the spin norm (the variable referred to as “magnorm” in your script) over a “long-enough” number of timesteps. Of course, you need to converge and determine what “long-enough” means for your system.
Repeat this operation for each temperature you need. Note that you can easily create scripts to run all those temperatures in parallel. Then, your last step is to plot the averages of the “magnorm” quantity as a function of temperature.
Note that you can find an example of this calculation (performed with the Spin package of Lammps) on the Figure 4a) of this manuscript:
Hope this helps! Let me know if you have additional questions!
All the best,
Thank you very much for your help @julient.