原子電荷・スピン

スピン分極計算 (bcc Fe)

強磁性体の bcc Fe でスピン分極計算を実行し、原子ごとのスピンと全磁気モーメントを取得します。

カテゴリ
原子電荷・スピン
使用する機能
spin_typeatoms.arrays["spin"]scf_styletotal_magmomabsolute_magmom
スクリプト
fe_spin.py

スピン分極計算 (collinear) を行うには、spin_type="polarized" を指定し、原子ごとの初期スピンを atoms.arrays["spin"] に設定します。SCF 計算が終わると、同じ atoms.arrays["spin"] に計算されたスピンが格納されます。

fe_spin.pyダウンロード
"""
Advance/OF-DFT example: spin-polarized calculation of bcc Fe.

Copyright (C) 2026 AdvanceSoft Corporation, All rights reserved.
"""

from ase.build import bulk
from ase.units import Hartree

from aofdft.calculator import AOFDFTCalculator

VPS_DIR = "path/to/DFT_DATA19_AS/VPS"  # edit these two paths for your environment
PAO_DIR = "path/to/DFT_DATA19_AS/PAO"

atoms = bulk("Fe", "bcc", a=2.87).repeat((3, 3, 3))  # 3x3x3 primitive cells, 27 atoms

# initial spin of each atom
atoms.arrays["spin"] = [1.0] * len(atoms)

atoms.calc = AOFDFTCalculator(
    console      = False,
    logging_file = "fe_spin.log",
    kin_type     = "AS26",
    kin_model    = "Crystal26",
    vps_dir      = VPS_DIR,
    pao_dir      = PAO_DIR,
    e_cut        = 180 * Hartree,
    spin_type    = "polarized",  # collinear spin-polarized calculation
    scf_style    = "magnetic",   # SCF preset for magnetic systems
)

atoms.get_potential_energy()
calc = atoms.calc

# after the SCF, atoms.arrays["spin"] holds the calculated spin of each atom
spins = atoms.arrays["spin"]
print(f"Spin of each atom         : {spins.min():.4f} ... {spins.max():.4f}")
print(f"Total magnetic moment     : {calc.total_magmom:.4f} ({calc.total_magmom / len(atoms):.4f} per atom)")
print(f"Absolute magnetic moment  : {calc.absolute_magmom:.4f}")

実行結果の例

v1.0.0 (Crystal26) の結果です。

text
Spin of each atom         : 1.8832 ... 1.8832
Total magnetic moment     : 50.8454 (1.8832 per atom)
Absolute magnetic moment  : 50.8454

27 個の原子のスピンは、すべて同じ値になっています。

ポイント

  • セルには、bcc の基本単位格子を 3×3×3 に繰り返したもの (27 原子) を使っています。v1.0.0 では、周期の短いセルで計算すると結果が変わるためです。
  • 初期スピンは全原子ぶんのリストで与えます。初期スピンを与えないとスピン分極のない解に収束することがあるため、磁性体では必ず設定してください。
  • 磁性体では scf_style="magnetic" の使用を推奨します。kin_model が結晶用で spin_type="polarized" の場合は、指定しなくても自動的に選ばれます。
  • calc.total_magmom は全磁気モーメント (スピン密度の積分)、calc.absolute_magmom は絶対磁気モーメント (スピン密度の絶対値の積分) です。反強磁性体では前者がゼロ、後者が有限になります。
  • 原子ごとのスピンは Mulliken 解析によるもので、アップスピンとダウンスピンの電子数の差です。
  • 解析事例 Fe の解析 では、smearing の幅を 0.01 Hartree とした計算で、原子あたりのスピン 2.00 が報告されています。この例とは smearing の幅が異なります (この例は既定の 0.02 Hartree)。
  • スピン密度の空間分布は スピン密度の可視化 をご覧ください。

バージョン 1.0 は collinear スピンのみに対応しています。non-collinear スピンとスピン軌道相互作用は今後のバージョンで対応予定です。