# Spin-Orbit matrix elements

**URL:** <https://discourse.abinit.org/t/spin-orbit-matrix-elements/3771>\
**Category:** Ground state\
**Tags:** testing\
**Created:** [October 20, 2025, 9:48am UTC](https://discourse.abinit.org/t/spin-orbit-matrix-elements/3771 "2025-10-20T09:48:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bibek\_Samal](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/b/e9bcb4/32.png) [@Bibek\_Samal](https://discourse.abinit.org/u/Bibek_Samal)\
**Post date:** [October 20, 2025, 9:48am UTC](https://discourse.abinit.org/t/spin-orbit-matrix-elements/3771/1 "2025-10-20T09:48:45Z")

</div>

Dear all,

I want to print the spin-orbit (SO) matrix elements in abinit for testing purposes. I am running SO calculations using HGH pseudopotentials. Kindly let me know which part of the code gives me all required matrix elements.

Thanks,  
Bibek

---

<div class="post-metadata">

**Author:** ![Antonius](https://discourse.abinit.org/user_avatar/discourse.abinit.org/antonius/32/888_2.png) [@Antonius](https://discourse.abinit.org/u/Antonius)\
**Post date:** [October 27, 2025, 9:03am UTC](https://discourse.abinit.org/t/spin-orbit-matrix-elements/3771/2 "2025-10-27T09:03:19Z")

</div>

Hello,

Certain DFT codes will compute the SO corrections perturbatively, by computing the wavefunctions without SO, then calculating SO matrix elements as corrections to the eigenvalues. In Abinit, you include SO by doing a fully relativistic calculation.

So I think the closest thing you can do is computing the eigenvalues with SO (so\_psp=2) and without SO (so\_psp=0), and taking the difference in the eigenvalues, which should correspond to the SO matrix elements.

---

<div class="post-metadata">

**Author:** ![Bibek\_Samal](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/b/e9bcb4/32.png) [@Bibek\_Samal](https://discourse.abinit.org/u/Bibek_Samal)\
**Post date:** [October 28, 2025, 11:08am UTC](https://discourse.abinit.org/t/spin-orbit-matrix-elements/3771/3 "2025-10-28T11:08:31Z")

</div>

Thanks for the reply. But I want to print the SO matrix elements in the orbital basis (if possible) from the code.
