For the Monte Carlo step, generate trial configurations by the Barker-Watts spin rotation [Chem. Phys. Lett. 3 , 144 (1969)] of randomly selected spins with a magnitude of the maximum spin rotation adjusted to ensure half of the trial configurations are rejected in the equilibrium state.
i and j are lattice indexes in 2D, stands for nearest neighbors.
See also: Physical Review B, 75, 014425 (2007). (*)
The parameters of the model are J-exchange interaction, A - anisotropy, and D - dipolar coupling. The boundary conditions shall be periodic.