Skip to main navigation Skip to search Skip to main content

Spinss: Accelerating the four-state method for spin Hamiltonian via appropriate initial spin densities

  • Xinlong Yang
  • , Menglei Li*
  • , Fawei Zheng
  • *Corresponding author for this work
  • Beijing Institute of Technology
  • Capital Normal University

Research output: Contribution to journalArticlepeer-review

Abstract

The four-state method [{ Phys. Rev. B 84, 224,429 (2011)}] is a reliable approach for calculating parameters of spin Hamiltonian in magnetic materials. However, the conventional self-consistent implementations often suffer from convergence difficulty and high computational costs. Here, we propose a method to generate appropriate initial spin densities that significantly reduces the number of the required self-consistent iterations. Remarkably, we find that this initial distribution even enables the non-self-consistent calculations to yield reasonable results. To facilitate the application of this method, we have developed Spinss, an open-source code that creates the initial spin densities and other necessary files for both self-consistent and non-self-consistent density functional theory calculations. We provide a detailed description of the algorithm, input and output files, and application examples which demonstrate the effectiveness of Spinss for both bulk and low-dimensional systems. PROGRAM SUMMARY Program title: Spinss CPC Library link to program files: https://doi.org/10.17632/9z8drdc7pm.1 Licensing provisions: MIT Programming language: Fortran 90 Nature of problem: The spin Hamiltonian is the foundation of computational studies of magnetic materials. While the conventional four-state method for extracting spin Hamiltonians is reliable, it often suffers from convergence difficulties and high computational costs. These challenges arise from constrained self-consistent ab initio calculations involving non-collinear spins and unnatural spin configurations. As a result, applying the four-state method to complex magnetic materials is difficult, hindering the theoretical design of novel magnetic materials and the study of magnetic phenomena. Solution method: The proposed solutions are: (1) using appropriate initial spin densities for self-consistent calculations in the four-state method to accelerate convergence and improve stability, and (2) performing non-self-consistent calculations based on these spin densities to completely avoid convergence problems. The Spinss code rotates local magnetic moments to target directions, generating initial spin densities for specific spin configurations. These densities serve as input for constrained self-consistent ab initio calculations, reducing the number of self-consistent iterations needed and improving computational efficiency. Spinss also enables non-self-consistent calculations using the generated spin densities, yielding reasonable magnetic exchange parameters without the need for computationally expensive constrained self-consistent cycles.

Original languageEnglish
Article number110297
JournalComputer Physics Communications
Volume327
DOIs
Publication statusPublished - Oct 2026
Externally publishedYes

Keywords

  • Four-state method
  • Non-self-consistent calculation
  • Spin-exchange constants

Fingerprint

Dive into the research topics of 'Spinss: Accelerating the four-state method for spin Hamiltonian via appropriate initial spin densities'. Together they form a unique fingerprint.

Cite this