mailhexu / TB2J

a python package for computing magnetic interaction parameters
BSD 2-Clause "Simplified" License
67 stars 29 forks source link

[BUG] Atoms named not as chemical symbols (ase crash) #46

Closed adrybakov closed 6 months ago

adrybakov commented 6 months ago

When a wannier90 calculations are done with the atom labels, that are different from the chemical symbols (i.e. Fe1 and not Fe), the wann2J.py crashes. The deep source of the error with code examples is described here: https://gitlab.com/ase/ase/-/issues/1448

Apparently, ASE does not consider this to be a bug, so I am writing about it here. Unfortunately, I can not share the input and output files at the moment. I may add a toy example this week, if necessary. To reproduce, one should name atoms in .win files as described here.

TB2J version: 0.8.1 and 0.7.7

mailhexu commented 6 months ago

Thanks. I will try to fix it.

mailhexu commented 6 months ago

Hi, Could you send a toy example. I tried to do a calculation with atom labels but I didn't find how to do that. Thanks! HeXu

adrybakov commented 6 months ago

Hello,

Yes, I will do so later this week.

Best, Andrey

adrybakov commented 6 months ago

Hello!

Sorry for the delayed response, here is the example of the bug: https://github.com/adrybakov/TB2J-issue-46

There are two folders one runs perfectly, the other one crashes.

Best, Andrey

adrybakov commented 6 months ago

Here is the absolute minimum set of input files that are required to reproduce the bug in case the example repository is not available (.txt extensions are artificial, remove them once the files are downloaded).

iron_dn.pw2wan.txt iron_dn.win.txt iron_up.pw2wan.txt iron_up.win.txt iron.nscf.txt iron.scf.txt run.sh.txt TB2J_CRASH.txt

mailhexu commented 6 months ago

Thanks a lot! I fixed it in the latest version (0.8.2.3). Could you try with that? see https://github.com/mailhexu/TB2J/commit/3b923db6ab998fc8ec4ca367f4a4085704cf8b6f Best, HeXu

adrybakov commented 6 months ago

Yes, It works now, thanks!

Best, Andrey