deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
163 stars 128 forks source link

The interface to warnnier90 is incorrect. #3418

Closed pxlxingliang closed 3 months ago

pxlxingliang commented 8 months ago

Describe the bug

I try to run the example in examples/interface_wannier90 in code, and when I execute the last step: wannier90.x diamond.win, the wannier90 program will throw the error message:

 plot_wannier: file UNK00001.1  not found
Error: examine the output/error file for details

And files UNK00001.* are not generated in OUT.ABACUS.

Should add some extra parameter to generate these files?

Expected behavior

No response

To Reproduce

No response

Environment

No response

Additional Context

No response

Task list for Issue attackers (only for developers)

jingan-181 commented 8 months ago
  1. In ABACUS 3.5.0, since the default parameter of out_wannier_unk is changed to 0, "UNK.*" files related to wave functions will not be output. out_wannier_unk 1 needs to be added manually in examples/interface_wannier90.
  2. In ABACUS 3.5.0, when the basis set used is numerical atomic orbitals and wannier_method 2, the out_wannier_unk parameter will be invalid. This will be added in future version.
Liu-RX commented 8 months ago

The UNK files are only necessary if you want to plot the Wannier function isosurface. Only the mmn file is indispensable in case of maximally localization of Wannier.

pxlxingliang commented 8 months ago

Hi @jingan-181, I use the latest codes to run example ABACUS_towannier90_lcao, the final WF centre and spread are much different with that by v3.4.2. Is it reasonable?

by v3.4.2 image

by latest codes: image

jingan-181 commented 8 months ago

It is incorrect for spread to be a negative number. I will check the interface for bugs as soon as possible.

dyzheng commented 7 months ago

The latest report is band structure calculated by ABACUS-wannier90-interface differ from which calculated by ABACUS. It is a severe bug.

Liu-RX commented 7 months ago

OK. I will first try to solve this.

---- Replied Message ---- From dyzheng @.> Date 01/31/2024 11:11 To deepmodeling/abacus-develop @.> Cc Liu Renxi @.>, Comment @.> Subject Re: [deepmodeling/abacus-develop] The interface to warnnier90 is incorrect. (Issue #3418)

The latest report is band structure calculated by ABACUS-wannier90-interface differ from which calculated by ABACUS. It is a severe bug. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Liu-RX commented 7 months ago

Is it due to the change of the LCAO mmn calculation method? The implementation of LCAO basis mmn in 3.4.2 is still the old method, while 3.5.0 implements the new method. @jingan-181

shiruosong commented 6 months ago

Has the problem been solved?

When I used version 3.5.3 to calculate wannier center based on lcao, the spread calculated by many structures would be too large, even tens. Therefore, bands calculated by wannier are also different from those calculated directly by ABACUS. There is no problem with vasp or qe for the same structure.

I reproduced the problem in this issue when testing examples, so it feels like it may be the same problem I encountered.