issue in generating EX parameters using wannier90 [ QE ]

41 views
Skip to first unread message

Mirali Jafari

unread,
Dec 22, 2023, 5:25:59 AM12/22/23
to TB2J
Hi.
I have used wannier90 [QE] to calculate the exchange parameters but after run I see the following error:

==> wann2J.py --spinor --posfile POSCAR --efermi 1.009 --kmesh 2 2 1 --elements Cr --prefix_spinor wannier90

TB2J version 0.7.4.3
Copyright (C) 2018-2020  TB2J group.
This software is distributed with the 2-Clause BSD License, without any warranty. For more details, see the LICENSE file delivered with this software.


Reading atomic structure from file ./POSCAR.
Reading Wannier90 hamiltonian: non-colinear spin.
Starting to calculate exchange.


Green's function Calculation started.
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:02<00:00, 42.47it/s]
Traceback (most recent call last):
  File "/share/apps/python/3.11.0/bin/wann2J.py", line 186, in <module>
    run_wann2J()
  File "/share/apps/python/3.11.0/bin/wann2J.py", line 156, in run_wann2J
    gen_exchange(path=args.path,
  File "/share/apps/python/3.11.0/lib/python3.11/site-packages/TB2J/manager.py", line 234, in gen_exchange
    exchange.run(path=output_path)
  File "/share/apps/python/3.11.0/lib/python3.11/site-packages/TB2J/exchange.py", line 775, in run
    self.calculate_all()
  File "/share/apps/python/3.11.0/lib/python3.11/site-packages/TB2J/exchange.py", line 727, in calculate_all
    self.get_rho_atom()
  File "/share/apps/python/3.11.0/lib/python3.11/site-packages/TB2J/exchange.py", line 583, in get_rho_atom
    [np.trace(x) * 2 for x in pauli_block_all(tmp)])
                              ^^^^^^^^^^^^^^^^^^^^
  File "/share/apps/python/3.11.0/lib/python3.11/site-packages/TB2J/pauli.py", line 131, in pauli_block_all
    MI = (M[::2, ::2] + M[1::2, 1::2]) / 2.0
          ~~~~~~~~~~~~^~~~~~~~~~~~~~~
ValueError: operands could not be broadcast together with shapes (3,3) (2,2)


I would be very thankful if someone help me to sole the issue.

Xu He

unread,
Dec 27, 2023, 9:12:42 AM12/27/23
to Mirali Jafari, TB2J
Hi, 
This is because there are 5 wannier functions found near one of the Cr atoms, which cannot be split into up/down spin with same number. You can check if the Wannierization is well converged to the "right" wanier center and the Wannier spreads are small enough. 
If you upgrade to the most recent version of TB2J, perhaps you'll find a more detailed error message with some information on how to solve the problem.

Best, 
HeXu

--
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 on the web visit https://groups.google.com/d/msgid/tb2j/e28d26c2-059c-40ff-a7b2-ba5e80f5ab9an%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages