Closed Connor-Herring closed 1 year ago
Hi, thanks for reporting. Generally I would advice against using the HSX file format. It is incomplete is various ways. And if you are insisting on the exact same coordinates, then your only choice is to use the TSHS file format. Simply add TS.HS.Save
to your fdf file, and use that file (you shouldn't need to change your script as the fdf
file will prefer the TSHS file if present).
Lastly, some comments.
denseH_arr = H.Hk(format='array')
numpy.matrix
it is outdated.@Connor-Herring did it fix your problem?
@zerothi Yes, thank you! I had been trying to write the TSHS before but it was not working. I realized it's because it only gets written if the scf loop converges and I was previously just running 1 step. Anyway, using the TSHS file is working for me now (with all coordinates).
I am calculating the overlap matrix for simple systems (just 3 atoms) after running a single scf step with siesta. These simulations consist of N2 interacting with a single atom (either Cu, Ru, Re, Mo, Ti). I am able to read the Hamiltonian and calculate the overlap matrix for all cases except Ti. In this case I get the following error:
"sisl.io.SileError: hsxSileSiesta(siesta_1.HSX, base=.).read_hamiltonian could not read Hamiltonian sizes. (ierr=-1)"
I've found if I just slightly adjust the coordinates of the Ti atom and rereun the scf step then the python code runs fine; however, I need to get it working with the correct atomic coordinates. Below is my python code but in the cases where I get the above error it is stopping during the "read_hamiltonian()" call.
Reproducable code
Version details Run the below code and add to bug-report:
Output from above:
3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:58:50) [GCC 10.3.0] 0.0.0.dev+eacb8351ff416ad9f7f93732777c3d7931c5f711
I am using siesta version 4.1 and I believe sisl is finding the .HSX file.