wannier90 bugs

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Locked
Message
Author
guyohad
Newbie
Newbie
Posts: 14
Joined: Mon Feb 15, 2021 9:42 am

wannier90 bugs

#1 Post by guyohad » Sun May 07, 2023 1:21 pm

Dear VASP developers,

I am using VASP 6.4.1 in interface with wannier90 3.1.0, and I have encountered some issues.

1. The UNK file is written only if exclude_bands is not specified and projections are used. The UNK file is not written unless the two conditions are met.

2. Even when the two conditions are met, I get the following error regarding the projections:

Code: Select all

 -----------------------------------------------------------------------------
|                                                                             |
|           W    W    AA    RRRRR   N    N  II  N    N   GGGG   !!!           |
|           W    W   A  A   R    R  NN   N  II  NN   N  G    G  !!!           |
|           W    W  A    A  R    R  N N  N  II  N N  N  G       !!!           |
|           W WW W  AAAAAA  RRRRR   N  N N  II  N  N N  G  GGG   !            |
|           WW  WW  A    A  R   R   N   NN  II  N   NN  G    G                |
|           W    W  A    A  R    R  N    N  II  N    N   GGGG   !!!           |
|                                                                             |
|     The wannier interface is returning 12 projections while NUM_WANN is     |
|     8. I will continue by using NUM_WANN but you should probably change     |
|     NUM_WANN or the wannier90 input file.                                   |
|                                                                             |
 -----------------------------------------------------------------------------
even though my NUM_WANN is 12. Wannier90 then outputs the error:

Code: Select all

wannier90.amn has not the right number of projections
I attach the input and main output files.

I appreciate any help.
Best,
Guy
You do not have the required permissions to view the files attached to this post.

manuel_engel1
Global Moderator
Global Moderator
Posts: 125
Joined: Mon May 08, 2023 4:08 pm

Re: wannier90 bugs

#2 Post by manuel_engel1 » Tue May 09, 2023 8:58 am

Dear Guy,

Thank you for posting on the forum. I have examined and run the system you provided.

Unfortunately, I am unable to reproduce the first issue. After specifying exclude_bands and the projections block, VASP still generates the UNK file. Could you provide additional information or input files regarding this first issue?

The second issue is due to a limitation in VASP's wannier90 interface (see num_wann). I suggest to specify

Code: Select all

num_wann = 12
in the INCAR file instead of the wannier90.win file. This always overwrites the setting in wannier90. Not specifying num_wann in the INCAR file allows VASP to generate a default value, which in your case equals 8.

The recommended way of providing the wannier90 input parameters is via the wannier90_win tag.

I hope this information is helpful.

Best,
Manuel
Manuel
VASP developer

guyohad
Newbie
Newbie
Posts: 14
Joined: Mon Feb 15, 2021 9:42 am

Re: wannier90 bugs

#3 Post by guyohad » Tue May 09, 2023 10:48 am

Dear Manuel,

Thank you for your reply. I have ran some more tests and have encountered 3 issues:

1. If no projections are specified, the UNK file is not generated. See problem01.tar.

2. As you said, the UNK file is indeed generated when specifying NUM_WANN in INCAR, and using projections. However, I get an error when running wannier90:

Code: Select all

wannier90.amn has not the right number of projections
See problem02.tar.

3. If I specify projections for the UNK file to be generated, and then remove them in the wannier90 run to avoid problem number 2, I get a system error when I run wannier90:

Code: Select all

end-of-file during read, unit 11, file UNK00001.1
See problem03.tar.

None of the above problems is solved upon using the tag WANNIER90_WIN.

Best wishes,
Guy
You do not have the required permissions to view the files attached to this post.

manuel_engel1
Global Moderator
Global Moderator
Posts: 125
Joined: Mon May 08, 2023 4:08 pm

Re: wannier90 bugs

#4 Post by manuel_engel1 » Tue May 09, 2023 3:26 pm

Dear Guy,

Thank you for providing more details. I will try my best to address the issues you have listed.
  1. problem01 is indeed an issue that can be traced back to a bug in VASP. Not specifying the projections causes VASP to crash (or silently fail), which happens before the UNK files are written. Unfortunately, there is currently no way to only write UNK files.
  2. problem02 is related to the projections block in wannier90. By specifying

    Code: Select all

    begin projections
    Si:sp3
    end projections
    
    wannier90 expects 8 local functions (4 for each Si atom). This is incompatible with num_wann = 4,
    resulting in the error you observe. You can adjust the number of projection functions, for example by specifying

    Code: Select all

    begin projections
    Si:s,px
    end projections
    
    Unfortunately, this will still not run without error due to problem03.
  3. problem03 is due to the use of the gamma-only version of VASP. It is likely there is a bug in VASP that causes the UNK files to be incorrect in this case. This causes the error message you reported when wannier90 tries to read the file. This issue definitely requires further investigation on our end. As a workaround, I suggest to use the standard (complex) version of both codes.

Here is a modified INCAR that generates the wannier90.win input file and runs without errors using the standard version of VASP:

Code: Select all

# comment
System = Si
ISTART = 1
ENCUT = 300

ALGO = N; EDIFF = 1.e-6
ISMEAR = 0; SIGMA = 0.01

NBANDS = 12
NUM_WANN = 4

LWANNIER90 = .TRUE.
LWRITE_UNK = .TRUE.

WANNIER90_WIN = "
  exclude_bands = 5-12

  wannier_plot = true
  wannier_plot_list = 1
  wannier_plot_supercell = 1

  begin projections
    Si:s,px
  end projections
"
Best,
Manuel
Manuel
VASP developer

guyohad
Newbie
Newbie
Posts: 14
Joined: Mon Feb 15, 2021 9:42 am

Re: wannier90 bugs

#5 Post by guyohad » Tue May 09, 2023 5:20 pm

Dear Manuel,

I highly appreciate your help and your quick replies, and hope that this report will contribute to future bug fix in VASP.

All the best,
Guy

Locked