hamiltonian and overlap from python

Asked by Laszlo Oroszlany on 2017-06-13

I am working on a small project for which I would require H(k) and S(k) from a SIESTA run (not TRANSIESTA).
I was wondering which would be the most straightforward way to do this with with already existing solutions.
I have found both ASE and sisl but I am not quite sure if either of them have the capability to extract H(k) and S(k) from a HSX or an nc file. Could someone point me to a short example how this can be done it it is possible at all ?
Also due to the nature of the problem I am working on any solution should work for spin non-collinear systems.

Question information

Language:
English Edit question
Status:
Answered
For:
Siesta Edit question
Assignee:
No assignee Edit question
Last query:
2017-06-17
Last reply:
2017-06-18
Nick Papior (nickpapior) said : #1

sisl should be able to do this once you have generated the *.nc file.

Simply do something like this
<<<
import sisl

H = sisl.get_sile('syslabel.nc').read_hamiltonian()

H.Hk(k=[0.5, 0.5, 0.5])
<<<

Which returns the Hamiltonian at k edge of the Brillouinzone.

Note that the stored Hamiltonian in the *.nc file (and HSX for that matter) is the real-space Hamiltonian and H(k) can easily be generated from this.

Laszlo Oroszlany (oroszl) said : #2

Does this also return overlaps ?
Looking at the github repo this was not obvious for me.
Should I transfer my questions about sisl to github ?

Nick Papior (nickpapior) said : #3

Yes, the *.nc file also contains the overlap matrix, so both can be created.

Generally, you should ask sisl questions on github.

Can you help with this problem?

Provide an answer of your own, or ask Laszlo Oroszlany for more information if necessary.

To post a message you must log in.