Closed adrybakov closed 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
Hello, Thank you! Best, Andrey
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:
write_basis_file
from 'assigned_basis.txt' to None, then the file will appear only if it is desired, but not as a side effect.auto_assign_basis_name()
and it`s calls in a particular way.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?