ABINIT WFK AFM NiO

Unfold type-II antiferromagnetic NiO from the 4-atom magnetic primitive cell onto the 2-atom rocksalt primitive cell. The magnetic cell doubles the rocksalt primitive cell along [111] and carries two Ni moments (+m and −m along z) and two O; the collinear WFK (nsppol 2) stores two spin channels, and the unfolding weight of a state is computed within its own spin channel — no spin mixing.

The bundle

Download abinit-nio.tar.gz and unpack it:

tar xf abinit-nio.tar.gz && cd abinit-nio

Shipped: the decks (inputs/nio_afm.abi dense 305-point path, inputs/nio_afm_corners.abi Γ/X/W/L corners), the pseudopotentials (pseudos/Ni.psp8, pseudos/O.psp8), unfold.toml, the primitive-cell POSCAR (data/nio_prim.vasp), and reproduce.py. Not shipped: the WFK itself (the dense nsppol-2 path WFK is ~1.1 GB) — regenerate it with ABINIT as below; this is the bundle’s one user-supplied input. Prerequisites: pip install unfolding; ABINIT ≥ 9 with netCDF support only for the regeneration step.

Structure and k-path

magnetic cellacell 3*7.8817 bohr (a = 4.171 Å) with fcc rprim; A_afm = M @ A_prim, M = [[1,0,1],[0,1,1],[1,1,0]]
atomsNi +m at (0,0,0), Ni −m at (.5,.5,.5), O at (.25,.25,.25) and (.75,.75,.75), spinat 0 0 2.0 / 0 0 -2.0 on the two Ni
primitive cell2-atom rocksalt (data/nio_prim.vasp), the path-points frame
k-pathΓ-X-W-Γ-L-W-X, the 305 deck points of the NSCF run (the rocksalt primitive cell is fcc)
spinthe two nsppol 2 channels coincide band-for-band here (AFM keeps inversion: time reversal × sublattice translation maps them onto each other), so one spin-up panel is plotted

Deck essentials: ecut 40 Ha, nband 40, nsppol 2/nspden 2, ixc 11; dataset 1 the AFM SCF on a 4×4×4 mesh, dataset 2 a frozen-density non-SCF path run (iscf -2, getden 2, kptopt 0, istwfk 1); plus the reader contract iomode 3, prtwf 1, chkprim 0. The 18-valence-electron Ni puts the Ni-3s semicore multiplet near −60 eV in the WFK, outside the plotted −16…8 eV window.

Run parameters and shared options (mode, spin, method, resolve_degenerate, supercell-matrix row convention, k-path coordinates and frames, energy-reference conventions) are explained together in the method, parameters, and k-path guide. Primitive cell input: optional for the abinit-wfk route — used only as the default path frame, never for the weights (this example ships data/nio_prim.vasp for the path frame).

Configuration

# ABINIT WFK AFM NiO: 4-atom magnetic cell -> 2-atom rocksalt primitive cell.
# Run from the unpacked bundle root AFTER generating the WFK (see README.txt):
#   unfolding --config unfold.toml
# or with explicit flags:
#   unfolding abinit-wfk --wfk data/nio_afm_patho_DS2_WFK.nc \
#     --unfold-mat 1 0 1 0 1 1 1 1 0 --primitive data/nio_prim.vasp \
#     --kpoints $(cat data/path_kpoints.txt) \
#     --xcoords $(cat data/path_xcoords.txt) \
#     --names G X W G L W X --xticks $(cat data/path_xticks.txt) \
#     --spin 0 --resolve-degenerate 0.001 --output nio_afm_unfolded_cli.png
route = "abinit-wfk"

[input]
wfk = "data/nio_afm_patho_DS2_WFK.nc"  # netCDF WFK: regenerate with ABINIT first

[structure]
supercell_matrix = [[1, 0, 1], [0, 1, 1], [1, 1, 0]]   # magnetic cell = M @ primitive
primitive = "data/nio_prim.vasp"       # 2-atom rocksalt primitive cell (path frame)

[path]
# Exact 305-point primitive-fractional path used by the ABINIT NSCF WFK.
# ASE bandpath(npoints=300/305) does not reproduce this segment grid.
kpoints = [
  [0, 0, 0],
  [0.00769230769231, 0, 0.00769230769231],
  [0.0153846153846, 0, 0.0153846153846],
  [0.0230769230769, 0, 0.0230769230769],
  [0.0307692307692, 0, 0.0307692307692],
  [0.0384615384615, 0, 0.0384615384615],
  [0.0461538461538, 0, 0.0461538461538],
  [0.0538461538462, 0, 0.0538461538462],
  [0.0615384615385, 0, 0.0615384615385],
  [0.0692307692308, 0, 0.0692307692308],
  [0.0769230769231, 0, 0.0769230769231],
  [0.0846153846154, 0, 0.0846153846154],
  [0.0923076923077, 0, 0.0923076923077],
  [0.1, 0, 0.1],
  [0.107692307692, 0, 0.107692307692],
  [0.115384615385, 0, 0.115384615385],
  [0.123076923077, 0, 0.123076923077],
  [0.130769230769, 0, 0.130769230769],
  [0.138461538462, 0, 0.138461538462],
  [0.146153846154, 0, 0.146153846154],
  [0.153846153846, 0, 0.153846153846],
  [0.161538461538, 0, 0.161538461538],
  [0.169230769231, 0, 0.169230769231],
  [0.176923076923, 0, 0.176923076923],
  [0.184615384615, 0, 0.184615384615],
  [0.192307692308, 0, 0.192307692308],
  [0.2, 0, 0.2],
  [0.207692307692, 0, 0.207692307692],
  [0.215384615385, 0, 0.215384615385],
  [0.223076923077, 0, 0.223076923077],
  [0.230769230769, 0, 0.230769230769],
  [0.238461538462, 0, 0.238461538462],
  [0.246153846154, 0, 0.246153846154],
  [0.253846153846, 0, 0.253846153846],
  [0.261538461538, 0, 0.261538461538],
  [0.269230769231, 0, 0.269230769231],
  [0.276923076923, 0, 0.276923076923],
  [0.284615384615, 0, 0.284615384615],
  [0.292307692308, 0, 0.292307692308],
  [0.3, 0, 0.3],
  [0.307692307692, 0, 0.307692307692],
  [0.315384615385, 0, 0.315384615385],
  [0.323076923077, 0, 0.323076923077],
  [0.330769230769, 0, 0.330769230769],
  [0.338461538462, 0, 0.338461538462],
  [0.346153846154, 0, 0.346153846154],
  [0.353846153846, 0, 0.353846153846],
  [0.361538461538, 0, 0.361538461538],
  [0.369230769231, 0, 0.369230769231],
  [0.376923076923, 0, 0.376923076923],
  [0.384615384615, 0, 0.384615384615],
  [0.392307692308, 0, 0.392307692308],
  [0.4, 0, 0.4],
  [0.407692307692, 0, 0.407692307692],
  [0.415384615385, 0, 0.415384615385],
  [0.423076923077, 0, 0.423076923077],
  [0.430769230769, 0, 0.430769230769],
  [0.438461538462, 0, 0.438461538462],
  [0.446153846154, 0, 0.446153846154],
  [0.453846153846, 0, 0.453846153846],
  [0.461538461538, 0, 0.461538461538],
  [0.469230769231, 0, 0.469230769231],
  [0.476923076923, 0, 0.476923076923],
  [0.484615384615, 0, 0.484615384615],
  [0.492307692308, 0, 0.492307692308],
  [0.5, 0, 0.5],
  [0.5, 0.00757575757576, 0.507575757576],
  [0.5, 0.0151515151515, 0.515151515152],
  [0.5, 0.0227272727273, 0.522727272727],
  [0.5, 0.030303030303, 0.530303030303],
  [0.5, 0.0378787878788, 0.537878787879],
  [0.5, 0.0454545454545, 0.545454545455],
  [0.5, 0.0530303030303, 0.55303030303],
  [0.5, 0.0606060606061, 0.560606060606],
  [0.5, 0.0681818181818, 0.568181818182],
  [0.5, 0.0757575757576, 0.575757575758],
  [0.5, 0.0833333333333, 0.583333333333],
  [0.5, 0.0909090909091, 0.590909090909],
  [0.5, 0.0984848484848, 0.598484848485],
  [0.5, 0.106060606061, 0.606060606061],
  [0.5, 0.113636363636, 0.613636363636],
  [0.5, 0.121212121212, 0.621212121212],
  [0.5, 0.128787878788, 0.628787878788],
  [0.5, 0.136363636364, 0.636363636364],
  [0.5, 0.143939393939, 0.643939393939],
  [0.5, 0.151515151515, 0.651515151515],
  [0.5, 0.159090909091, 0.659090909091],
  [0.5, 0.166666666667, 0.666666666667],
  [0.5, 0.174242424242, 0.674242424242],
  [0.5, 0.181818181818, 0.681818181818],
  [0.5, 0.189393939394, 0.689393939394],
  [0.5, 0.19696969697, 0.69696969697],
  [0.5, 0.204545454545, 0.704545454545],
  [0.5, 0.212121212121, 0.712121212121],
  [0.5, 0.219696969697, 0.719696969697],
  [0.5, 0.227272727273, 0.727272727273],
  [0.5, 0.234848484848, 0.734848484848],
  [0.5, 0.242424242424, 0.742424242424],
  [0.5, 0.25, 0.75],
  [0.493055555556, 0.246527777778, 0.739583333333],
  [0.486111111111, 0.243055555556, 0.729166666667],
  [0.479166666667, 0.239583333333, 0.71875],
  [0.472222222222, 0.236111111111, 0.708333333333],
  [0.465277777778, 0.232638888889, 0.697916666667],
  [0.458333333333, 0.229166666667, 0.6875],
  [0.451388888889, 0.225694444444, 0.677083333333],
  [0.444444444444, 0.222222222222, 0.666666666667],
  [0.4375, 0.21875, 0.65625],
  [0.430555555556, 0.215277777778, 0.645833333333],
  [0.423611111111, 0.211805555556, 0.635416666667],
  [0.416666666667, 0.208333333333, 0.625],
  [0.409722222222, 0.204861111111, 0.614583333333],
  [0.402777777778, 0.201388888889, 0.604166666667],
  [0.395833333333, 0.197916666667, 0.59375],
  [0.388888888889, 0.194444444444, 0.583333333333],
  [0.381944444444, 0.190972222222, 0.572916666667],
  [0.375, 0.1875, 0.5625],
  [0.368055555556, 0.184027777778, 0.552083333333],
  [0.361111111111, 0.180555555556, 0.541666666667],
  [0.354166666667, 0.177083333333, 0.53125],
  [0.347222222222, 0.173611111111, 0.520833333333],
  [0.340277777778, 0.170138888889, 0.510416666667],
  [0.333333333333, 0.166666666667, 0.5],
  [0.326388888889, 0.163194444444, 0.489583333333],
  [0.319444444444, 0.159722222222, 0.479166666667],
  [0.3125, 0.15625, 0.46875],
  [0.305555555556, 0.152777777778, 0.458333333333],
  [0.298611111111, 0.149305555556, 0.447916666667],
  [0.291666666667, 0.145833333333, 0.4375],
  [0.284722222222, 0.142361111111, 0.427083333333],
  [0.277777777778, 0.138888888889, 0.416666666667],
  [0.270833333333, 0.135416666667, 0.40625],
  [0.263888888889, 0.131944444444, 0.395833333333],
  [0.256944444444, 0.128472222222, 0.385416666667],
  [0.25, 0.125, 0.375],
  [0.243055555556, 0.121527777778, 0.364583333333],
  [0.236111111111, 0.118055555556, 0.354166666667],
  [0.229166666667, 0.114583333333, 0.34375],
  [0.222222222222, 0.111111111111, 0.333333333333],
  [0.215277777778, 0.107638888889, 0.322916666667],
  [0.208333333333, 0.104166666667, 0.3125],
  [0.201388888889, 0.100694444444, 0.302083333333],
  [0.194444444444, 0.0972222222222, 0.291666666667],
  [0.1875, 0.09375, 0.28125],
  [0.180555555556, 0.0902777777778, 0.270833333333],
  [0.173611111111, 0.0868055555556, 0.260416666667],
  [0.166666666667, 0.0833333333333, 0.25],
  [0.159722222222, 0.0798611111111, 0.239583333333],
  [0.152777777778, 0.0763888888889, 0.229166666667],
  [0.145833333333, 0.0729166666667, 0.21875],
  [0.138888888889, 0.0694444444444, 0.208333333333],
  [0.131944444444, 0.0659722222222, 0.197916666667],
  [0.125, 0.0625, 0.1875],
  [0.118055555556, 0.0590277777778, 0.177083333333],
  [0.111111111111, 0.0555555555556, 0.166666666667],
  [0.104166666667, 0.0520833333333, 0.15625],
  [0.0972222222222, 0.0486111111111, 0.145833333333],
  [0.0902777777778, 0.0451388888889, 0.135416666667],
  [0.0833333333333, 0.0416666666667, 0.125],
  [0.0763888888889, 0.0381944444444, 0.114583333333],
  [0.0694444444444, 0.0347222222222, 0.104166666667],
  [0.0625, 0.03125, 0.09375],
  [0.0555555555556, 0.0277777777778, 0.0833333333333],
  [0.0486111111111, 0.0243055555556, 0.0729166666667],
  [0.0416666666667, 0.0208333333333, 0.0625],
  [0.0347222222222, 0.0173611111111, 0.0520833333333],
  [0.0277777777778, 0.0138888888889, 0.0416666666667],
  [0.0208333333333, 0.0104166666667, 0.03125],
  [0.0138888888889, 0.00694444444444, 0.0208333333333],
  [0.00694444444444, 0.00347222222222, 0.0104166666667],
  [0, 0, 0],
  [0.00892857142857, 0.00892857142857, 0.00892857142857],
  [0.0178571428571, 0.0178571428571, 0.0178571428571],
  [0.0267857142857, 0.0267857142857, 0.0267857142857],
  [0.0357142857143, 0.0357142857143, 0.0357142857143],
  [0.0446428571429, 0.0446428571429, 0.0446428571429],
  [0.0535714285714, 0.0535714285714, 0.0535714285714],
  [0.0625, 0.0625, 0.0625],
  [0.0714285714286, 0.0714285714286, 0.0714285714286],
  [0.0803571428571, 0.0803571428571, 0.0803571428571],
  [0.0892857142857, 0.0892857142857, 0.0892857142857],
  [0.0982142857143, 0.0982142857143, 0.0982142857143],
  [0.107142857143, 0.107142857143, 0.107142857143],
  [0.116071428571, 0.116071428571, 0.116071428571],
  [0.125, 0.125, 0.125],
  [0.133928571429, 0.133928571429, 0.133928571429],
  [0.142857142857, 0.142857142857, 0.142857142857],
  [0.151785714286, 0.151785714286, 0.151785714286],
  [0.160714285714, 0.160714285714, 0.160714285714],
  [0.169642857143, 0.169642857143, 0.169642857143],
  [0.178571428571, 0.178571428571, 0.178571428571],
  [0.1875, 0.1875, 0.1875],
  [0.196428571429, 0.196428571429, 0.196428571429],
  [0.205357142857, 0.205357142857, 0.205357142857],
  [0.214285714286, 0.214285714286, 0.214285714286],
  [0.223214285714, 0.223214285714, 0.223214285714],
  [0.232142857143, 0.232142857143, 0.232142857143],
  [0.241071428571, 0.241071428571, 0.241071428571],
  [0.25, 0.25, 0.25],
  [0.258928571429, 0.258928571429, 0.258928571429],
  [0.267857142857, 0.267857142857, 0.267857142857],
  [0.276785714286, 0.276785714286, 0.276785714286],
  [0.285714285714, 0.285714285714, 0.285714285714],
  [0.294642857143, 0.294642857143, 0.294642857143],
  [0.303571428571, 0.303571428571, 0.303571428571],
  [0.3125, 0.3125, 0.3125],
  [0.321428571429, 0.321428571429, 0.321428571429],
  [0.330357142857, 0.330357142857, 0.330357142857],
  [0.339285714286, 0.339285714286, 0.339285714286],
  [0.348214285714, 0.348214285714, 0.348214285714],
  [0.357142857143, 0.357142857143, 0.357142857143],
  [0.366071428571, 0.366071428571, 0.366071428571],
  [0.375, 0.375, 0.375],
  [0.383928571429, 0.383928571429, 0.383928571429],
  [0.392857142857, 0.392857142857, 0.392857142857],
  [0.401785714286, 0.401785714286, 0.401785714286],
  [0.410714285714, 0.410714285714, 0.410714285714],
  [0.419642857143, 0.419642857143, 0.419642857143],
  [0.428571428571, 0.428571428571, 0.428571428571],
  [0.4375, 0.4375, 0.4375],
  [0.446428571429, 0.446428571429, 0.446428571429],
  [0.455357142857, 0.455357142857, 0.455357142857],
  [0.464285714286, 0.464285714286, 0.464285714286],
  [0.473214285714, 0.473214285714, 0.473214285714],
  [0.482142857143, 0.482142857143, 0.482142857143],
  [0.491071428571, 0.491071428571, 0.491071428571],
  [0.5, 0.5, 0.5],
  [0.5, 0.494565217391, 0.505434782609],
  [0.5, 0.489130434783, 0.510869565217],
  [0.5, 0.483695652174, 0.516304347826],
  [0.5, 0.478260869565, 0.521739130435],
  [0.5, 0.472826086957, 0.527173913043],
  [0.5, 0.467391304348, 0.532608695652],
  [0.5, 0.461956521739, 0.538043478261],
  [0.5, 0.45652173913, 0.54347826087],
  [0.5, 0.451086956522, 0.548913043478],
  [0.5, 0.445652173913, 0.554347826087],
  [0.5, 0.440217391304, 0.559782608696],
  [0.5, 0.434782608696, 0.565217391304],
  [0.5, 0.429347826087, 0.570652173913],
  [0.5, 0.423913043478, 0.576086956522],
  [0.5, 0.41847826087, 0.58152173913],
  [0.5, 0.413043478261, 0.586956521739],
  [0.5, 0.407608695652, 0.592391304348],
  [0.5, 0.402173913043, 0.597826086957],
  [0.5, 0.396739130435, 0.603260869565],
  [0.5, 0.391304347826, 0.608695652174],
  [0.5, 0.385869565217, 0.614130434783],
  [0.5, 0.380434782609, 0.619565217391],
  [0.5, 0.375, 0.625],
  [0.5, 0.369565217391, 0.630434782609],
  [0.5, 0.364130434783, 0.635869565217],
  [0.5, 0.358695652174, 0.641304347826],
  [0.5, 0.353260869565, 0.646739130435],
  [0.5, 0.347826086957, 0.652173913043],
  [0.5, 0.342391304348, 0.657608695652],
  [0.5, 0.336956521739, 0.663043478261],
  [0.5, 0.33152173913, 0.66847826087],
  [0.5, 0.326086956522, 0.673913043478],
  [0.5, 0.320652173913, 0.679347826087],
  [0.5, 0.315217391304, 0.684782608696],
  [0.5, 0.309782608696, 0.690217391304],
  [0.5, 0.304347826087, 0.695652173913],
  [0.5, 0.298913043478, 0.701086956522],
  [0.5, 0.29347826087, 0.70652173913],
  [0.5, 0.288043478261, 0.711956521739],
  [0.5, 0.282608695652, 0.717391304348],
  [0.5, 0.277173913043, 0.722826086957],
  [0.5, 0.271739130435, 0.728260869565],
  [0.5, 0.266304347826, 0.733695652174],
  [0.5, 0.260869565217, 0.739130434783],
  [0.5, 0.255434782609, 0.744565217391],
  [0.5, 0.25, 0.75],
  [0.5, 0.2421875, 0.7421875],
  [0.5, 0.234375, 0.734375],
  [0.5, 0.2265625, 0.7265625],
  [0.5, 0.21875, 0.71875],
  [0.5, 0.2109375, 0.7109375],
  [0.5, 0.203125, 0.703125],
  [0.5, 0.1953125, 0.6953125],
  [0.5, 0.1875, 0.6875],
  [0.5, 0.1796875, 0.6796875],
  [0.5, 0.171875, 0.671875],
  [0.5, 0.1640625, 0.6640625],
  [0.5, 0.15625, 0.65625],
  [0.5, 0.1484375, 0.6484375],
  [0.5, 0.140625, 0.640625],
  [0.5, 0.1328125, 0.6328125],
  [0.5, 0.125, 0.625],
  [0.5, 0.1171875, 0.6171875],
  [0.5, 0.109375, 0.609375],
  [0.5, 0.1015625, 0.6015625],
  [0.5, 0.09375, 0.59375],
  [0.5, 0.0859375, 0.5859375],
  [0.5, 0.078125, 0.578125],
  [0.5, 0.0703125, 0.5703125],
  [0.5, 0.0625, 0.5625],
  [0.5, 0.0546875, 0.5546875],
  [0.5, 0.046875, 0.546875],
  [0.5, 0.0390625, 0.5390625],
  [0.5, 0.03125, 0.53125],
  [0.5, 0.0234375, 0.5234375],
  [0.5, 0.015625, 0.515625],
  [0.5, 0.0078125, 0.5078125],
  [0.5, 0, 0.5],
]
xcoords = [0, 0.00942148044261, 0.0188429608852, 0.0282644413278, 0.0376859217705, 0.0471074022131, 0.0565288826557, 0.0659503630983, 0.0753718435409, 0.0847933239835, 0.0942148044261, 0.103636284869, 0.113057765311, 0.122479245754, 0.131900726197, 0.141322206639, 0.150743687082, 0.160165167524, 0.169586647967, 0.17900812841, 0.188429608852, 0.197851089295, 0.207272569738, 0.21669405018, 0.226115530623, 0.235537011065, 0.244958491508, 0.254379971951, 0.263801452393, 0.273222932836, 0.282644413278, 0.292065893721, 0.301487374164, 0.310908854606, 0.320330335049, 0.329751815492, 0.339173295934, 0.348594776377, 0.358016256819, 0.367437737262, 0.376859217705, 0.386280698147, 0.39570217859, 0.405123659032, 0.414545139475, 0.423966619918, 0.43338810036, 0.442809580803, 0.452231061245, 0.461652541688, 0.471074022131, 0.480495502573, 0.489916983016, 0.499338463459, 0.508759943901, 0.518181424344, 0.527602904786, 0.537024385229, 0.546445865672, 0.555867346114, 0.565288826557, 0.574710306999, 0.584131787442, 0.593553267885, 0.602974748327, 0.61239622877, 0.621674959509, 0.630953690248, 0.640232420987, 0.649511151726, 0.658789882465, 0.668068613204, 0.677347343943, 0.686626074681, 0.69590480542, 0.705183536159, 0.714462266898, 0.723740997637, 0.733019728376, 0.742298459115, 0.751577189854, 0.760855920593, 0.770134651332, 0.779413382071, 0.78869211281, 0.797970843549, 0.807249574288, 0.816528305027, 0.825807035766, 0.835085766504, 0.844364497243, 0.853643227982, 0.862921958721, 0.87220068946, 0.881479420199, 0.890758150938, 0.900036881677, 0.909315612416, 0.918594343155, 0.928103784799, 0.937613226442, 0.947122668086, 0.95663210973, 0.966141551373, 0.975650993017, 0.985160434661, 0.994669876305, 1.00417931795, 1.01368875959, 1.02319820124, 1.03270764288, 1.04221708452, 1.05172652617, 1.06123596781, 1.07074540945, 1.0802548511, 1.08976429274, 1.09927373439, 1.10878317603, 1.11829261767, 1.12780205932, 1.13731150096, 1.1468209426, 1.15633038425, 1.16583982589, 1.17534926754, 1.18485870918, 1.19436815082, 1.20387759247, 1.21338703411, 1.22289647575, 1.2324059174, 1.24191535904, 1.25142480068, 1.26093424233, 1.27044368397, 1.27995312562, 1.28946256726, 1.2989720089, 1.30848145055, 1.31799089219, 1.32750033383, 1.33700977548, 1.34651921712, 1.35602865877, 1.36553810041, 1.37504754205, 1.3845569837, 1.39406642534, 1.40357586698, 1.41308530863, 1.42259475027, 1.43210419192, 1.44161363356, 1.4511230752, 1.46063251685, 1.47014195849, 1.47965140013, 1.48916084178, 1.49867028342, 1.50817972506, 1.51768916671, 1.52719860835, 1.53670805, 1.54621749164, 1.55572693328, 1.56523637493, 1.57474581657, 1.58425525821, 1.59376469986, 1.6032741415, 1.61274468956, 1.62221523762, 1.63168578568, 1.64115633374, 1.6506268818, 1.66009742986, 1.66956797791, 1.67903852597, 1.68850907403, 1.69797962209, 1.70745017015, 1.71692071821, 1.72639126627, 1.73586181433, 1.74533236238, 1.75480291044, 1.7642734585, 1.77374400656, 1.78321455462, 1.79268510268, 1.80215565074, 1.8116261988, 1.82109674686, 1.83056729491, 1.84003784297, 1.84950839103, 1.85897893909, 1.86844948715, 1.87792003521, 1.88739058327, 1.89686113133, 1.90633167939, 1.91580222744, 1.9252727755, 1.93474332356, 1.94421387162, 1.95368441968, 1.96315496774, 1.9726255158, 1.98209606386, 1.99156661192, 2.00103715997, 2.01050770803, 2.01997825609, 2.02944880415, 2.03891935221, 2.04838990027, 2.05786044833, 2.06733099639, 2.07680154445, 2.0862720925, 2.09574264056, 2.10521318862, 2.11468373668, 2.12415428474, 2.1336248328, 2.14303851815, 2.1524522035, 2.16186588885, 2.1712795742, 2.18069325955, 2.1901069449, 2.19952063025, 2.2089343156, 2.21834800096, 2.22776168631, 2.23717537166, 2.24658905701, 2.25600274236, 2.26541642771, 2.27483011306, 2.28424379841, 2.29365748376, 2.30307116911, 2.31248485446, 2.32189853981, 2.33131222517, 2.34072591052, 2.35013959587, 2.35955328122, 2.36896696657, 2.37838065192, 2.38779433727, 2.39720802262, 2.40662170797, 2.41603539332, 2.42544907867, 2.43486276402, 2.44427644937, 2.45369013473, 2.46310382008, 2.47251750543, 2.48193119078, 2.49134487613, 2.50075856148, 2.51017224683, 2.51958593218, 2.52899961753, 2.53841330288, 2.54782698823, 2.55724067358, 2.56665435893, 2.57622305001, 2.58579174108, 2.59536043216, 2.60492912323, 2.61449781431, 2.62406650538, 2.63363519646, 2.64320388753, 2.65277257861, 2.66234126968, 2.67190996075, 2.68147865183, 2.6910473429, 2.70061603398, 2.71018472505, 2.71975341613, 2.7293221072, 2.73889079828, 2.74845948935, 2.75802818043, 2.7675968715, 2.77716556257, 2.78673425365, 2.79630294472, 2.8058716358, 2.81544032687, 2.82500901795, 2.83457770902, 2.8441464001, 2.85371509117, 2.86328378225, 2.87285247332]
xticks = [0, 0.61239622877, 0.918594343155, 1.6032741415, 2.1336248328, 2.56665435893, 2.87285247332]
names = ["G", "X", "W", "G", "L", "W", "X"]

[options]
spin = 0                               # nsppol-2 channel: 0 = up, 1 = down (identical here)
resolve_degenerate = 1e-3

[output]
output = "nio_afm_unfolded_cli.png"

Run it

Regenerate the WFK (reproduce.py prints this exact command; the corner deck gives a small WFK in minutes for a coarse figure):

mkdir -p run_nio && cd run_nio
cp ../inputs/nio_afm.abi ../pseudos/Ni.psp8 ../pseudos/O.psp8 .
abinit nio_afm.abi > nio_afm.abo 2>&1
cp nio_afmo_DS2_WFK.nc ../data/ && cd ..

then, from the bundle root, one command with the shipped config:

unfolding --config unfold.toml          # -> nio_afm_unfolded_cli.png

The same TOML can be passed as the only Python input:

from unfolding import load_config, run
run(load_config("unfold.toml"))

or with explicit flags:

unfolding abinit-wfk --wfk data/nio_afm_patho_DS2_WFK.nc \
    --unfold-mat 1 0 1 0 1 1 1 1 0 --primitive data/nio_prim.vasp \
    --kpoints $(cat data/path_kpoints.txt) \
    --xcoords $(cat data/path_xcoords.txt) \
    --names G X W G L W X --xticks $(cat data/path_xticks.txt) \
    --spin 0 --resolve-degenerate 0.001 --output nio_afm_unfolded_cli.png

or through the Python API with explicit parameters:

import numpy as np
from unfolding import unfold_abinit

kpts = np.loadtxt("data/path_kpoints.txt").reshape(-1, 3)
x = np.loadtxt("data/path_xcoords.txt")
X = np.loadtxt("data/path_xticks.txt")
m_afm = np.array([[1, 0, 1], [0, 1, 1], [1, 1, 0]])
ax = unfold_abinit(
    "data/nio_afm_patho_DS2_WFK.nc", m_afm, kpts,
    knames=[r"$\Gamma$", "X", "W", r"$\Gamma$", "L", "W", "X"],
    xqpts=x, Xqpts=X,
    spin=0,
    resolve_degenerate=1e-3,
)

python reproduce.py renders the published figure from the dense WFK (or a coarse map from the corner WFK, on the same path axis).

AFM NiO unfolded onto the 2-atom rocksalt primitive cell along Γ-X-W-Γ-L-W-X, spin-up channel: Gaussian-smeared spectral-weight map (Blues scale, opacity = weight), energies relative to the WFK Fermi level
AFM NiO unfolded onto the 2-atom rocksalt primitive cell along Γ-X-W-Γ-L-W-X, spin-up channel: Gaussian-smeared spectral-weight map (Blues scale, opacity = weight), energies relative to the WFK Fermi level

Systems whose spin channels genuinely differ are handled by the same call with spin=1 for the partner panel.