mailhexu / TB2J

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

assigned_basis.txt #24

Closed adrybakov closed 1 year ago

adrybakov commented 1 year ago

In every run of wann2J.py a file "assigned_basis.txt" is created outside of the TB2J_results directory (in the directory of the script`s execution to be exact). It comes from the function auto_assign_basis_name() defined in utils.py.

I tracked down calls of this function and it is called in several places, in particular: manager.py (1) manager.py (2) manager.py (3) manager.py (4) manager.py (5) Oiju.py myTB.py utest.py

And in every case it seems to me that appearance of the file itself is not desired.

Therefore, since appearance of this file is confusing, I suggest to change the behaviour of the code in that sense.

I see two simple solutions:

I can open a pull request for either first or second solution, so the question is: which one do you prefer? Or do you plan to address this issue in a different way?

P.S. One more question, which came from this investigation: there is a number of unused imports in the code, do you keep them with a reason, or are they just left there historically?

mailhexu commented 1 year ago

Hi, Thank you! Sorry for this very late reply. I don't know why I didn't see this issue. Now I moved the assigned_basis.txt to the TB2J output directory instead of the current working directory. (your solution 2). Indeed I need to clean the unsued import too. Will do it soon. Best wishes, HeXu

adrybakov commented 1 year ago

Hello, Thank you! Best, Andrey