write_hsx not backwards compatible

Asked by marc barbry on 2019-05-12

For post processing, I need to read the Hamiltonian from the .HSX file.
I just installed siesat-4.1-b4 and my script to read the Hamiltonian returned an error. Looking at the Siesta code, I see the comment

Note because of the new more compact method of storing H and S
this routine is NOT backwards compatible

in the subroutine write_hsx (m_hsx.F). Could I get a description of the changes between the new version and the old one that I can adapt my code to the new version?

Out of curiosity, I see that the variable gamma is always False in this new version. Why is it so?

Best regards,
Marc Barbry

Question information

English Edit question
Siesta Edit question
No assignee Edit question
Solved by:
marc barbry
Last query:
Last reply:
Alberto Garcia (albertog) said : #1

Hi Marc,

The 'more compact way of storing' was introduced a very long time ago, so that is probably not the cause of your problems.

The more recent change is to always output the 'indxuo' table for orbital-indexing mapping between the auxiliary supercell and the
unit cell. In the previous version (i.e., 4.0), indxuo was only written if 'gamma' was '.false.' (that is, the calculation used BZ sampling beyond Gamma). Now, to match the fact that indxuo is always written, gamma is set to .false. by default.

So it seems that (assuming that your code worked well with 4.0):

* Your analysis code is meant for Gamma-point calculations.
* Your code is assuming that indxuo is not there without actually ckecking the value of 'gamma'.

Just modify it to read 'indxuo' in the appropriate place and it should work.

  Best regards,


marc barbry (mbarbry) said : #2

Dear Alberto,

Thanks a lot for your explanation. Effectively, I have issue when I do Gamma point calculations. It should not be too complex to correct the problem as you state.

Thanks again,