zerothi / sisl

Electronic structure Python package for post analysis and large scale tight-binding DFT/NEGF calculations
https://zerothi.github.io/sisl
Mozilla Public License 2.0
201 stars 60 forks source link

read_fermi_level function on .HSX sile returns inf with siesta-rel-5.0 #828

Closed AleksBL closed 1 month ago

AleksBL commented 1 month ago

I am trying to use sisl v15.1 to read a .HSX file generated by siesta-rel-5.0. However, when reading the file using the read_hamiltonian function

Hload = sisl.get_sile('siesta.HSX').read_hamiltonian()

returns a matrix with inf values throughout. It seems to come down to the read_fermi_level function returning an inf value.

Should I try another siesta version, or is it a problem with sisl?

image

image

zerothi commented 1 month ago

Hmm.. how was the HSX file created? I.e. if you only stored HSX just after initialization, the fermi-level is not defined, and hence it will be inf.

AleksBL commented 1 month ago

Hi, It is created using the "HSetupOnly True", which the siesta seems to accept image But yes, I guess it actually doesnt determine the Fermi level at any point... Is there any way to avoid making the read_hamiltonian use the Fermi-level?

zerothi commented 1 month ago

its a good point, I'll fix it...

zerothi commented 1 month ago

Fixed in 0f589e94d

zerothi commented 1 month ago

@AleksBL try latest commit!

AleksBL commented 1 month ago

Thanks, I'll try!

zerothi commented 1 month ago

I'll close so I don't forget... ;)