interface to W90

Anything regarding the post-processing utility (e.g. excitonic wavefunction analysis) is dealt with in this forum.

Moderators: Davide Sangalli, andrea marini, Daniele Varsano

Post Reply
paguado
Posts: 2
Joined: Tue Oct 31, 2017 12:58 pm

interface to W90

Post by paguado » Tue Oct 31, 2017 8:00 pm

Dear all
I'm trying to use ypp to interface a GW calculattion with yambo 4.2.0 with wannier90 but so far I have failed and couldn't find anything in previous posts in the forum relevant to my case. Just for some context, I'm running a SO calculation using Vanderbilt (multiprojector) norm-conserving pseudos on a small unit cell with 2 atoms. I have managed to converge the GW calculation and I already have the QP energies on a symmetry-reduced BZ. What I do then is the following:

1) I use ypp to remove the symmetries. I use the input

Code: Select all

fixsyms                        # [R] Reduce Symmetries
#ExpandSymm                    # Add inv and magnetic symms if possible
RmAllSymm                     # Remove all symmetries
RmTimeRev                     # Remove Time Reversal
and run

Code: Select all

$ ypp -F ypp_sym.in

to get a FixSymm folder. When I initialise the FixSymm/SAVE folder everything runs smoothly and I confirm that now the number of k-points correspond to the full BZ.

2) I run

Code: Select all

$ wannier.x -pp SystemLabel
to generate the corresponding SystemLabel.nnkp file. [NOTE: I don't know how to make ypp to read a file with a given prefix, it only works if the nnkp file is called ".nnkp", which is inconvenient because that's a hidden file in linux. The same happens with the ".gw.unsorted.eig" output file]

3) Now, inside FixSymm I run ypp as

Code: Select all

$ ypp -F ypp_w90.in
with I simply

Code: Select all

wannier
in the input. The code runs without giving any error:

Code: Select all

  __ __  ____ ___ ___ ____   ___
 |  |  |/    |   |   |    \ /   \
 |  |  |  o  | _   _ |  o  )     |
 |  ~  |     |  \_/  |     |  O  |
 |___, |  _  |   |   |  O  |     |
 |     |  |  |   |   |     |     |
 |____/|__|__|___|___|_____|\___/


 <---> [01] CPU structure, Files & I/O Directories
 <---> [02] Y(ambo) P(ost)/(re) P(rocessor)
 <---> [03] Core DB
 <---> :: Electrons             : 30.00000
 <---> :: Temperature       [ev]: 0.000000
 <---> :: Lattice factors [a.u.]: 6.077950  6.077950  6.077950
 <---> :: K points              : 1728
 <---> :: Bands                 :  80
 <---> :: Symmetries            : 1
 <---> :: RL vectors            :  39237
 <---> [04] K-point grid
 <---> :: Q-points   (IBZ): 1728
 <---> :: X K-points (IBZ): 1728
 <---> [05] CORE Variables Setup
 <---> [05.01] Unit cells
 <---> [05.02] Symmetries
 <---> [WARNING]Spatial Inversion not found among the given symmetry list
 <---> [05.03] RL shells
 <---> [05.04] K-grid lattice
 <---> [05.05] Energies [ev] & Occupations
 <01s> [06] == Wannier 90 Interface ==
 <01s> K-table built correctly
 <01s> QP db read, writing QP corrections in the .eig Wannier90 format
 <01s> gw.unsorted.eig written
 <01s> [07] Game Over
however, the .eig file is empty. Does anyone have any idea why?
It may also be worth mentioning a couple of details:
- the program says that it has successfully read a QP file even when this is absent in the folder.
- If I try to use ypp to interpolate the band structure the calculation breaks (either with a segfault or producing an empty file). For the band interpolation I confirmed that the compilation that I'm using works for the examples in the tutorial.

Cheers,
Pablo

---------------------------------
Pablo Aguado-Puente
Queen's University Belfast

AntimoMarrazzo
Posts: 20
Joined: Fri Jan 22, 2016 2:46 pm

Re: interface to W90

Post by AntimoMarrazzo » Wed Nov 01, 2017 1:56 pm

Dear Pablo,
paguado wrote: 1) I use ypp to remove the symmetries. I use the input
I do not think this is necessary, ypp does the unfolding for you from the IBZ to the full BZ when it writes the gw.unsorted.eig file for W90.
2) [NOTE: I don't know how to make ypp to read a file with a given prefix, it only works if the nnkp file is called ".nnkp", which is inconvenient because that's a hidden file in linux. The same happens with the ".gw.unsorted.eig" output file]
You can specify the seedname in the input file for ypp through

Code: Select all

 Seed="seedname" 
3) The code runs without giving any error:
- the program says that it has successfully read a QP file even when this is absent in the folder.
Indeed, at the moment the subroutine does not complain often enough:-)
Try to run it again 1)without removing the symmetries 2)using the right seedname, let us know if it works then.
Anyway, some time ago I prepared a small tutorial on this that you can find in the Wannier90 examples section (https://github.com/wannier-developers/w ... /example23, https://github.com/wannier-developers/w ... c/tutorial).
Once you get the QP corrections in a "W90-style" format, there is a small utility gw2wannier90.py to create the right .eig file (ordered in energy) and updated all the matrices you give as input to W90.
HTH.
Antimo
Antimo Marrazzo
SISSA
Trieste (Italy)

paguado
Posts: 2
Joined: Tue Oct 31, 2017 12:58 pm

Re: interface to W90

Post by paguado » Mon Nov 06, 2017 9:34 pm

Hi Antimo,
Thank you so much for pointing me in the right direction! The tutorial was actually really helpful.

Just one note: ypp always outputs the bands starting from 1 to number of bands for which the GW corrections are calculated, but then, naturally, the tool gw2wannier.py assumes that the corrections are for the first n bands. That works fine in the tutorial because the corrections are calculated from 1 to 4 or 8, but if one is interested in bands x to x+n the corrections are added to the wrong bands. For this reason I believe that in WANNIER_driver.F (from ypp) the line

Code: Select all

write(10,*) (qp%table(i_qp,1)-qp%table(1,1)+1),ik,real(qp%E(i_qp)-qp%E_bare(i_qp))*HA2EV
should actually read

Code: Select all

write(10,*) qp%table(i_qp,1),ik,real(qp%E(i_qp)-qp%E_bare(i_qp))*HA2EV
Regards,
Pablo

---------------------------------------
Pablo Aguado-Puente
Queen's University Belfast

AntimoMarrazzo
Posts: 20
Joined: Fri Jan 22, 2016 2:46 pm

Re: interface to W90

Post by AntimoMarrazzo » Sat Nov 18, 2017 11:47 am

paguado wrote:Hi Antimo,
Just one note: ypp always outputs the bands starting from 1 to number of bands for which the GW corrections are calculated, but then, naturally, the tool gw2wannier.py assumes that the corrections are for the first n bands. That works fine in the tutorial because the corrections are calculated from 1 to 4 or 8, but if one is interested in bands x to x+n the corrections are added to the wrong bands. For this reason I believe that in WANNIER_driver.F (from ypp) the line
paguado wrote:Hi Antimo,
Thank you so much for pointing me in the right direction! The tutorial was actually really helpful.
Actually that was done on purpose: when you use exclude bands Wannier90 always starts from 1, no matter how many bands you excluded. So in practice you can never do what you suggest with Wannier90 as you always need a complete .eig file, either at the DFT or at the GW level. Actually gw2wannier90 prints you a warning in that case "Exclude bands option is used: be careful to be consistent with the choice of bands for the GW QP corrections."
Is it clear now?

Antimo
Antimo Marrazzo
SISSA
Trieste (Italy)

Post Reply