The implemented equation including the thermal fluctuation effects is
$$\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times (\vec{H}+\vec{\xi}) + \alpha \vec{m} \times \frac{\partial \vec{m}}{\partial t}$$
where ξ⃗ is the thermal fluctuation field and is assumed to have the following properties,
$$\left< \vec{\xi} \right> = 0, \;\;\; \left< \vec{\xi}_i^u,\vec{\xi}_j^v \right> = 2 D \delta_{ij} \delta_{uv}$$
and
$$D = \frac{\alpha k_B T}{\gamma \mu_s}$$
Spin transfer torque (Zhang-Li model)
The extended equation with current is,
$$\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} + \alpha \vec{m} \times \frac{\partial \vec{m}}{\partial t} + u_0 (\vec{j}_s \cdot \nabla) \vec{m} - \beta u_0 [\vec{m}\times (\vec{j}_s \cdot \nabla)\vec{m}]$$
Where
$$u_0=\frac{p g \mu_B}{2 |e| M_s}=\frac{p g \mu_B a^3}{2 |e| \mu_s}$$
and μ B = |e |ℏ/(2m ) is the Bohr magneton. Notice that ∂x m⃗ ⋅ m⃗ = 0 so u 0 (j⃗ s ⋅ ∇)m⃗ = − u 0 m⃗ × [m⃗ × (j⃗ s ⋅ ∇)m⃗ ] . Besides, we can change the equation to atomistic one by introducing s⃗ = − S⃗ where S⃗ is the local spin such that
$$\vec{M}=-\frac{g \mu_B}{a^3}\vec{S} =\frac{g \mu_B}{a^3}\vec{s}$$
so u 0 = p a 3 /(2|e |s ) , furthermore,
$$\frac{\partial \vec{s}}{\partial t} = - \gamma \vec{s} \times \vec{H} + \frac{\alpha}{s} \vec{s} \times \frac{\partial \vec{s}}{\partial t} + \frac{p a^3}{2|e|s} (\vec{j}_s \cdot \nabla) \vec{s} - \frac{p a^3 \beta}{2|e|s^2} [\vec{s}\times (\vec{j}_s \cdot \nabla)\vec{s}]$$
However, we perfer the normalised equaiton here, after changing it to LL form, we obtain,
$$(1+\alpha^2)\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} - \alpha \gamma \vec{m} \times (\vec{m} \times \vec{H}) + (1+\alpha\beta) u_0 (\vec{j}_s \cdot \nabla) \vec{m} - (\beta-\alpha) u_0 [\vec{m}\times (\vec{j}_s \cdot \nabla)\vec{m}]$$
although in principle ∂x m⃗ is always perpendicular to m⃗ , it's better to take an extra step to remove its longitudinal component, therefore, the real equation written in codes is,
$$(1+\alpha^2)\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H}_{\perp} + \alpha \gamma \vec{H}_{\perp} + (1+\alpha \beta) u_0 \vec{\tau}_{\perp} - (\beta-\alpha) u_0 (\vec{m}\times \vec{\tau}_{\perp})$$
where τ⃗ = (j⃗ s ⋅ ∇)m⃗ is the effective torque generated by current.
Nonlocal spin transfer torque (full version of Zhang-li model)
The LLG equation with STT is given by,
$$\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} + \alpha \vec{m} \times \frac{\partial \vec{m}}{\partial t} + \vec{T}$$
where T⃗ is the spin transfer torque. In the local form the STT is given by,
T⃗ l o c = u 0 (j⃗ s ⋅ ∇)m⃗ − β u 0 [m⃗ × (j⃗ s ⋅ ∇)m⃗ ]
And in general case, the spin transfer torque could be computed by,
$$\vec{T}=-\frac{\vec{m} \times \delta \vec{m}}{\tau_{sd}}$$
where τ s d is the s-d exchange time and δ m⃗ is the nonequilibrium spin density governed by
$$\frac{\partial \delta \vec{m}}{\partial t} = D \nabla^2 \delta \vec{m} + \frac{\vec{m} \times \delta \vec{m}}{\tau_{sd}} - \frac{\delta \vec{m}}{\tau_{sf}} +u_0 (\vec{j}_s \cdot \nabla) \vec{m}$$
By changing the LLG equation to LL form, we obtain,
$$(1+\alpha^2)\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} - \alpha \gamma \vec{m} \times (\vec{m} \times \vec{H}) + \vec{T} + \alpha \vec{m} \times \vec{T}$$
i.e.,
$$(1+\alpha^2)\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} - \alpha \gamma \vec{H}_{\perp} - \frac{\vec{m} \times \delta \vec{m}}{\tau_{sd}} + \alpha \frac{\delta \vec{m}}{\tau_{sd}}$$
Spin transfer torque (Slonczewski type)
We consider the LLG equation with a Slonczewski-type extension [PRB 91 064423 (2015)],
$$\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H} + \alpha \vec{m} \times \frac{\partial \vec{m}}{\partial t} + u \vec{m} \times (\vec{p}\times \vec{m})$$
where p⃗ is the unit vector in the direction of the spin polarization. Similar to the Zhang-Li case, the implemented equation in the code is,
$$(1+\alpha^2)\frac{\partial \vec{m}}{\partial t} = - \gamma \vec{m} \times \vec{H}_{\perp} + \alpha \gamma \vec{H}_{\perp} + u \vec{p}_{\perp} + \alpha u \vec{m} \times \vec{p}_{\perp}$$
where p⃗ ⊥ = p⃗ − (m⃗ ⋅ p⃗ )m⃗ .