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
181 stars 58 forks source link

Implement LDOS calculation #61

Closed zerothi closed 6 years ago

zerothi commented 6 years ago

It would be nice to calculate LDOS contribution on real-space grids

zerothi commented 6 years ago

This will be enabled as soon as #58 is finished because one can "weigh" the eigenstates DM contributions with broadenings to construct the LDOS density matrix.

zerothi commented 6 years ago

As a side-note. The LDOS is enabled for TBtrans calculations since 4.1-b4.

zerothi commented 6 years ago

I regard this issue to be resolved as the thing that is missing is #58.

pfebrer commented 2 years ago

Couldn't one just calculate the LDOS as the STM util does? I.e. for each eigenstate calculate the wavefunction, multiply it by its conjugate and then weight according to its corresponding eigenvalue and whatever distribution the user chooses.

zerothi commented 2 years ago

Yes and no. :)

The STM utility uses the wavefunctions and calculating the LDOS from individual wavefunctions has been enabled in sisl since the sisl.physics.electron.wavefunction was implemented. This turns out to be somewhat impractical in sisl for some energies and systems. Say you have 100 states then you'll have to generate the wavefunctions for each of these 100 states and average the grid (converted as you say) values to get the LDOS. Now it is doable, but highly non-scalable ;) Note that this is what the STM utility is doing. But in fortran this is not as costly ;)

However, one generally wants to use the density matrix constructed from the weighted states around an energy window. And this is what I am referring to as missing in the implementation. Once the density matrix can be calculated efficiently in sisl, then the energy-range LDOS can be enabled.

Also note that my implementation in TBtrans allows efficient calculations of the density matrix since you get it for free when calculating the Green function. You can even plot the LDOS originating from a single electrode if this is your wish ;)

pfebrer commented 2 years ago

Oooh ok that's true :(

I want to calculate the LDOS for some systems that I calculate in SIESTA. Can I use TBtrans to get the LDOS even if there are no electrodes? Anyway it would be nice to be able to calculate it efficiently from sisl :)

zerothi commented 2 years ago

Oooh ok that's true :(

I want to calculate the LDOS for some systems that I calculate in SIESTA. Can I use TBtrans to get the LDOS even if there are no electrodes? Anyway it would be nice to be able to calculate it efficiently from sisl :)

Hmm, you can trick tbtrans to calculate the green function with a fictional electrode... Hmmm this might be a good code addition for tbtrans!