I am wondering, in Elk, if there's some routine that I can project some bands (around fermi level) onto the maximally localized wannier functions (MLWFs), which can be used to construct a many-body tight-binding model.
Some DFT package based on the pseudopotential scheme have interface to the Wannier90 package, which can construct the MLWFs. Do we have such interface in Elk?
best regards
Simon Li
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to write an interface for ELK, but of course I need the help from you. I think it is not difficult at all for you developers, who knows very well the structure of ELK. It would be great helpful that you could stay with me from the very beginning.
best regards
Simon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it is right, I am working on it. Right now only the random initialization for the Wannier functions have been implemented. Of course, this is not optimal in many cases, I will implement the case of projecting out the wavefunctions into a set of atomic or hybridized orbitals. This is a project I need to discuss with Kay for details but expect to be ready in one of two months.
-aldo.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Aldo has moved to US and is very busy setting up a new group. So this project has been abandoned by us. So if you are interested in working on it, please do so as you will not be stepping on any ones toes.
Also I feel it is good if more than one person implements such things. It is always very good to have a confirmation.
Best
Sangeeta
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think I might have something now. It's taken a bit longer than I thought, partly because I first started by trying to port the FLEUR implementation and got horridly lost in the FLEUR code. I then decided to start again from the equations in the paper of Freimuth et al. which described the FLEUR-wannier90 interface ( http://dx.doi.org/10.1103/PhysRevB.78.035120 ). The current implementation seems to work (I've just tested it for Si and get an interpolated bandstructure which closely matches what ELK calculates using task 20), but is quite sub-optimal as it does the radial integrals again for each (k,k+b) pairs. This is because I chose to use the second variational wavefunctions calculated by genwfsv. The reason behind this is so that the implementation is more transparent, matches the equations in the Freimuth paper more closely and so is a bit easier to debug, but a better method would be to use the second variation eigenvectors in the LAPW+lo basis so the radial integrals would only need to be calculated once. I guess I need to look more closely at genwfsv to see how to do this though.
Anyway, a patch against elk-2.3.22 is here: http://pastebin.com/Aa09SJfd and a bziped tarball of tests with ELK+wannier90 and also FLEUR+w90 on the bandstructure of Si and Ge is here: https://www.dropbox.com/s/s28wok8dpct0ivj/elk-w90_tests.tbz - there's a script to run all the tests. They took ~30min on my desktop. You need the usual unix utilities and also gnuplot, ELK, FLEUR and Wannier90.
One peculiar results is that when I used the default elk.in for Si from the examples with the following positions:
Then I get: https://www.dropbox.com/s/my5l9c0pr0gq86g/Si_bands_FLEURcoords.png which fits pretty well. It seems the problem might be in the way which ELK symmetrises the coordinates in the first case, shifting the atoms to (0.375,0.375,0.375) and (-0.375,-0.375,-0.375). No atomic shift is applied in the second case. Wannier90 seems to have a problem finding MLWF with the ELK-symmetrised coordinates. I've got no idea why this is though.
Finally, a few comments on the current implementation:
a) the Wannier90 library is not linked in, so calculations have to be done in 2 steps: 1) run a ground state ELK calculation and output a model .win file for Wannier90 [task 0 or 1, and task 601 (I've appropriated task numbers 601 and 602 for this interface!)]. 2) run "wannier90.x -pp" to generate a .nnkp file with the (k,k+b) list of neighbouring k-points, and also a parsed list of projectors. 3) run ELK again with task 602 to generate the .eig, .mmn and .amn files. I guess we can decide if an option to link the wannier90 library (like libxc) to ELK should be offered so everything can be done in one invokation of ELK in future.
b) the projections are a bit basic at the moment: atom-centred [rather muffin-tin-centred] projections are treated with the overlap calculated according to equation 25 of Freimuth, but everything else is treated as "random" - e.g. the corresponding column in the Amn matrix is filled with normalised random numbers. I think of a few ways to put non-atom centred projections in, but they also seem to involve a lot of conversions from spherical coordinates to Cartesians to spherical harmonics or some such... do you have any ideas?
Anyway, I think the next step is to make the code more efficient by reducing the number of radial integrals that is calculated, and then I'll try to add a routine to produce the .unk files for plotting in Wannier90. These two steps are related, so hopefully won't take too long. But maybe I'll wait until ELK-v3 comes out first.
All the best and have a good weekend,
Duc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for this detailed description. Is it possible you write a mail to me personally so that we can discuss details not here on the forum? My email id is sharma@mpi-halle.mpg.de
Best
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, all
I am wondering, in Elk, if there's some routine that I can project some bands (around fermi level) onto the maximally localized wannier functions (MLWFs), which can be used to construct a many-body tight-binding model.
Some DFT package based on the pseudopotential scheme have interface to the Wannier90 package, which can construct the MLWFs. Do we have such interface in Elk?
best regards
Simon Li
Hi Simon!
There is no interface at the moment, although I remember an attempt by someone to write one once.
Would you like to do it? I'm sure it will be very useful for many people.
Regards,
Kay.
Hi, Kay
I would like to write an interface for ELK, but of course I need the help from you. I think it is not difficult at all for you developers, who knows very well the structure of ELK. It would be great helpful that you could stay with me from the very beginning.
best regards
Simon
Hi,
how is that about Wannier90 interface? Has anyone done it?
Regards,
Alfonso.
One of the users of ELK, Aldo Romero Castro, is trying to implement wanier functions into ELK.
Yes, it is right, I am working on it. Right now only the random initialization for the Wannier functions have been implemented. Of course, this is not optimal in many cases, I will implement the case of projecting out the wavefunctions into a set of atomic or hybridized orbitals. This is a project I need to discuss with Kay for details but expect to be ready in one of two months.
-aldo.
wish can be included in the next release
Hi Aldo,
did you ever finish the Wannier90 interface code? Is it planned to include it in a future version of ELK?
If not, I can try to hack something together, but I'd rather not repeat something that someone has already written (and debugged!).
Regards,
Duc.
Hi Duc,
Aldo has moved to US and is very busy setting up a new group. So this project has been abandoned by us. So if you are interested in working on it, please do so as you will not be stepping on any ones toes.
Also I feel it is good if more than one person implements such things. It is always very good to have a confirmation.
Best
Sangeeta
Hi Sangeeta,
I think I might have something now. It's taken a bit longer than I thought, partly because I first started by trying to port the FLEUR implementation and got horridly lost in the FLEUR code. I then decided to start again from the equations in the paper of Freimuth et al. which described the FLEUR-wannier90 interface ( http://dx.doi.org/10.1103/PhysRevB.78.035120 ). The current implementation seems to work (I've just tested it for Si and get an interpolated bandstructure which closely matches what ELK calculates using task 20), but is quite sub-optimal as it does the radial integrals again for each (k,k+b) pairs. This is because I chose to use the second variational wavefunctions calculated by genwfsv. The reason behind this is so that the implementation is more transparent, matches the equations in the Freimuth paper more closely and so is a bit easier to debug, but a better method would be to use the second variation eigenvectors in the LAPW+lo basis so the radial integrals would only need to be calculated once. I guess I need to look more closely at genwfsv to see how to do this though.
Anyway, a patch against elk-2.3.22 is here: http://pastebin.com/Aa09SJfd and a bziped tarball of tests with ELK+wannier90 and also FLEUR+w90 on the bandstructure of Si and Ge is here: https://www.dropbox.com/s/s28wok8dpct0ivj/elk-w90_tests.tbz - there's a script to run all the tests. They took ~30min on my desktop. You need the usual unix utilities and also gnuplot, ELK, FLEUR and Wannier90.
One peculiar results is that when I used the default elk.in for Si from the examples with the following positions:
I get the interpolated bandstructure shown here: https://www.dropbox.com/s/5my3shuae2asgrb/Si_bands_ELKsymmetrised.png which is badly matched to the direct calculation. However, if I use the positions in the FLEUR input files which are equivalent as far as I can tell,
Then I get: https://www.dropbox.com/s/my5l9c0pr0gq86g/Si_bands_FLEURcoords.png which fits pretty well. It seems the problem might be in the way which ELK symmetrises the coordinates in the first case, shifting the atoms to (0.375,0.375,0.375) and (-0.375,-0.375,-0.375). No atomic shift is applied in the second case. Wannier90 seems to have a problem finding MLWF with the ELK-symmetrised coordinates. I've got no idea why this is though.
Finally, a few comments on the current implementation:
a) the Wannier90 library is not linked in, so calculations have to be done in 2 steps: 1) run a ground state ELK calculation and output a model .win file for Wannier90 [task 0 or 1, and task 601 (I've appropriated task numbers 601 and 602 for this interface!)]. 2) run "wannier90.x -pp" to generate a .nnkp file with the (k,k+b) list of neighbouring k-points, and also a parsed list of projectors. 3) run ELK again with task 602 to generate the .eig, .mmn and .amn files. I guess we can decide if an option to link the wannier90 library (like libxc) to ELK should be offered so everything can be done in one invokation of ELK in future.
b) the projections are a bit basic at the moment: atom-centred [rather muffin-tin-centred] projections are treated with the overlap calculated according to equation 25 of Freimuth, but everything else is treated as "random" - e.g. the corresponding column in the Amn matrix is filled with normalised random numbers. I think of a few ways to put non-atom centred projections in, but they also seem to involve a lot of conversions from spherical coordinates to Cartesians to spherical harmonics or some such... do you have any ideas?
Anyway, I think the next step is to make the code more efficient by reducing the number of radial integrals that is calculated, and then I'll try to add a routine to produce the .unk files for plotting in Wannier90. These two steps are related, so hopefully won't take too long. But maybe I'll wait until ELK-v3 comes out first.
All the best and have a good weekend,
Duc.
Hi Duc,
Thanks for this detailed description. Is it possible you write a mail to me personally so that we can discuss details not here on the forum? My email id is sharma@mpi-halle.mpg.de
Best