LAMMPS自旋晶格耦合与阻尼
实际演示移动晶格的交换力、固定自旋的阻尼与随机热浴,说明当前版本严格零温和正温度的时间口径。
阅读本篇目录
单自旋进动只涉及固定格点上的方向。本篇增加两个操作:让交换相互作用驱动原子移动,以及给方向引入阻尼和随机热浴。
下载五篇共用的完整输入、科学数据与绘图包。先按照多电子波包篇的共用运行步骤提交一次,后续四篇读取同一批结果,不需要重复提交。
1. 两个移动格点的完整输入#
cat inputs/spin-lattice-moving/input.lammps
head -n 12 inputs/spin-lattice-moving/atoms.dump
units metal
atom_style spin
atom_modify map array
boundary p p p
region box block -8 8 -8 8 -8 8 units box
create_box 1 box
create_atoms 1 single 0.0 0 0 units box
create_atoms 1 single 3 0 0 units box
mass 1 55.845
set atom 1 spin 1 0 0 1
set atom 2 spin 1 0.8660254037844386 0 0.5
pair_style spin/exchange 4.0
pair_coeff * * exchange 4.0 0.01 0.2 2.0 offset no
fix integrator all nve/spin lattice moving
compute magnetic all property/atom sp spx spy spz fmx fmy fmz
thermo 1
thermo_style custom step time pe ke etotal
thermo_modify norm no format float %.17g
timestep 0.00001
dump atoms all custom 10 atoms.dump id type x y z vx vy vz fx fy fz c_magnetic[*]
dump_modify atoms sort id format float %.17g
run 1000
write_dump all custom final.dump id type x y z vx vy vz fx fy fz c_magnetic[*] modify sort id format float %.17g
单位metal,即Å/eV/ps。两个55.845u模型格点初距3Å,自旋方向夹角60°;该质量并不意味着这两个参数已经拟合实际铁。lattice moving同时积分位置与自旋,不能再给同一粒子额外重复加普通nve积分器。
本例交换函数 J(r)=4a u(1−b u) exp(−u),u=(r/d)²,a=0.01eV、b=0.2、d=2Å,offset关闭。全体系交换能为 −J(r) s1·s2,机械力来自其距离导数。
步长1e−5ps,共1000步=0.01ps。实际最大格点移动3.10713e−5Å,总能最大变化约9.41e−17eV;这是两格点短模型,不用于材料热输运或磁相变。
包内还实际运行初始x坐标±1e−5Å的两个单点,用能量差分检查机械fx,并检查全部帧总自旋向量、单位方向、质量速度动能与交换能。
2. 固定自旋阻尼的完整输入#
cat inputs/spin-damped-zeroT/input.lammps
cat inputs/spin-damped-300K/input.lammps
units metal
atom_style spin
atom_modify map array
boundary p p p
region box block -5 5 -5 5 -5 5 units box
create_box 1 box
create_atoms 1 single 0 0 0 units box
mass 1 1
set atom 1 spin 1 1 0 0
pair_style spin/exchange 3
pair_coeff * * exchange 3 0 0 1
fix external all precession/spin zeeman 5 0 0 1
fix_modify external energy yes
fix bath all langevin/spin 0 0.2 47031
fix integrator all nve/spin lattice frozen
compute magnetic all property/atom sp spx spy spz fmx fmy fmz
thermo 500
thermo_style custom step time pe
thermo_modify norm no format float %.17g
timestep 0.0001
dump atoms all custom 500 atoms.dump id type x y z c_magnetic[*]
dump_modify atoms sort id format float %.17g
run 50000
先定义外磁场,再定义 langevin/spin,最后 nve/spin。阻尼参数0.2是无量纲值,不是fs/ps;5T沿z,初始方向沿x。时间步1e−4ps、50000步=5ps。300K条件只把温度改为300,另有1e−12K对照专门辨认当前构建的时间归一化。

3. 当前构建的零温与正温时间口径#
LAMMPS22Jul2025 Update6当前实现中,严格0K不进入带Gilbert因子的温度分支:严格0K轨迹按Ω归一化;正温分支按 Ω/(1+alpha²) 归一化。这里alpha=0.2,Ω由外场与当前构建常数确定。
| 实算条件 | 适用比较 | 5ps内方向向量最大差 |
|---|---|---|
| 严格0K | 当前零温LL分支 | 2.673e−6 |
| 1e−12K分支对照 | 正温Gilbert归一化的近零噪声参考 | 2.168e−6 |
| 300K | 随机热浴轨迹、单位方向和Zeeman能检查 | 不与无噪声解做精度比较 |
若把严格0K直接套到后一种时间公式,方向差约0.118,不能解释为达到同一公式的精度。这里保留两种口径的比较;极小正温度只是辨认版本分支的数值对照,不是建议用户把它作为生产温度设置。更新构建后,应重新检查这个时间约定。
300K单条短轨迹受随机转矩影响,不能据它估计平衡磁化、临界温度或普遍弛豫常数。Zeeman能按 −2*muB*B*sz核对,不能拿与无噪声方向的距离当随机积分准确性误差。
4. 重新提取与画图#
已有原生结果时,只重新提取和画图:
module load sisl/0.16.4
python analyze.py
python plot.py
这一步读取实际结果,不重新运行原生模拟。
改变自旋、场强、交换参数或随机过程前,先用有限模型核对输入顺序、机械力和方向单位长度,再做体系及时间收敛。参考LAMMPS自旋阻尼与定义顺序。