Issues with running TB2J calculation:"ValueError: Atom 0 is magnetic but has no orbitals assigned. Check Wannier function definitions."

32 views
Skip to first unread message

Peter Baker

unread,
Aug 18, 2025, 10:41:54 PMAug 18
to TB2J
Dear developers, thank you for providing tb2j. As a beginner, I have encountered a small problem.When trying to reproduce monolayer CrI₃ with vasp, I first performed the Wannier fitting, and the results looked very good.
67218D933FB027552D00A05505A4A7D8.png
However, when I executed “wann2J.py --elements Cr --efermi -3.4728 --kmesh 8 8 1”,the program returned the following error:
ValueError: Atom 0 is magnetic but has no orbitals assigned. Check Wannier function definitions.
I haven’t been able to figure out what went wrong. Could you please help me check? Thank you! I’ve attached all the files.
Kind regards.
Peter Baker

Peter Baker

unread,
Aug 18, 2025, 10:43:50 PMAug 18
to TB2J
wannier90.up.wout
wannier90.dn_centres.xyz
wannier90.dn.wout
POSCAR
wannier90.up_centres.xyz
wannier90.up.win
wannier90.dn_hr.dat
wannier90.up_hr.dat

Peter Baker

unread,
Aug 18, 2025, 10:51:38 PMAug 18
to TB2J
  I would like to add one more point. In the path TB2J_results, there will only be a file named assigned_basis.txt, and there is no information about the Cr atom.  

在2025年8月19日星期二 UTC+8 10:43:50<Peter Baker> 写道:
assigned_basis.txt

Xu He

unread,
Aug 19, 2025, 5:09:31 PMAug 19
to Peter Baker, TB2J
Hi, 
Which version did you use? I tried with the most recent version but cannot reproduce the issue. Attached is the TB2J output. 

Note that the wannier spread is huge (you can find them in  the .wout files) and you need to adjust the energy windows in Wannier90 to get more localized Wannier functions. 
Best regards, 
HeXu

On Tue, Aug 19, 2025 at 4:51 AM Peter Baker <pb13...@gmail.com> wrote:
  I would like to add one more point. In the path TB2J_results, there will only be a file named assigned_basis.txt, and there is no information about the Cr atom.  

在2025年8月19日星期二 UTC+8 10:43:50<Peter Baker> 写道:

--
You received this message because you are subscribed to the Google Groups "TB2J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tb2j+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tb2j/9f9830bf-e640-4725-a83d-3a47fc7100a0n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
exchange.out
Message has been deleted

Alice Toynbee

unread,
Aug 23, 2025, 7:06:00 AMAug 23
to TB2J

Dear Developer, thank you for your reply. I restarted the installation of tb2j from scratch in a separate Python environment. In the end, the results were computed successfully and worked well. It seems to have been a version issue or a conflict caused by the Python environment.

Thank you again for your reply.

Kind regards.
Peter Baker

Reply all
Reply to author
Forward
0 new messages