“解决一个又一个报错,计算路上的坑将越来越少

之前关于wannier90的更新:

《一文搞定VASP wannier90构建紧束缚模型》

《VASP wannier90 构建紧束缚模型(补充)》

《QE wannier90构建紧束缚模型》

《超越wannier90——构建紧束缚模型》

《wanniertools中表面能带投影问题与解决》

《确定wannier90能量窗口脚本》

《wanniertools中电子/声子的NumOccupied参数》

《[视频] SCDM: A unified approach to Wannier localisation》

开始之前先说一下wannier90能量窗口脚本一节中,engwin.py脚本运行报错的原因在于下面备注的地方。

def get_energies(xml_name): # VASP EIGENVAL format if xml_name == "EIGENVAL": with open("EIGENVAL", "r") as eigenval: raw_content = eigenval.readlines content = raw_content[7:] entries = for i, line in enumerate(content): if len(line.split) == 4: entries.append(i) eng_full = for i in entries: eng_ki = for line in content[i 1:]: #if len(line.split) == 2: # 之前的文件 if len(line.split) == 3: # 这里之前是2,修改为3即可。 eng_ki.append(float(line.split[1])) else: break eng_full.append(eng_ki)

wannier90常见报错汇总

wannacy利用的是系统的漏洞(wannier90常见报错汇总持续更新)(1)

1. wannier90.wout中出现:

Reading overlaps fromwannier90.mmn : File generated byVASP: unknown system

Error readingwannier90.mmn: 2 1 12 0 0 0 0

Exiting.......

Neighbour not found

原因:一般是因为wannier90.win是从其他地方拷贝的,不是vasp直接生成的,那么你的wannier90.win里面的k点网格可能不匹配(主要是k点的顺序,不是k点的数目)。

什么情况容易报这个错误?

同样的参数,不加soc运行正常,加soc以后报错,通常是因为在不加soc的时候没有设置ISYM=-1,k点简并比较高,生成的wannier90.win中的k-mesh与ISYM=-1时的k-mesh不同导致。

解决办法:删除wannier90.win里面的k-mesh部分,重新运行VASP程序。

wannier90.win中的k-mesh部分:

mp_grid = 12 12 1begin kpoints 0.000000000000 0.000000000000 0.000000000000 0.083333333333 0.000000000000 0.000000000000 0.166666666667 0.000000000000 0.000000000000 0.250000000000 0.000000000000 0.000000000000 0.333333333333 0.000000000000 0.000000000000 0.416666666667 0.000000000000 0.000000000000 0.500000000000 0.000000000000 0.000000000000end kpoints

2. wannier90.werr文件中出现:

Wannier90: Execution started on 2Jun2021 at09:02:24

Exiting.......

param_get_projection: too many projectionsdefined

原因:num_wann 与设置投影数不匹配。

解决办法:不加soc:num_wann 等于每种原子投影轨道数之和

soc:num_wann 等于两倍的每种原子投影轨道数之和

3. Wannier90.werr文件中出现:

Wannier90: Execution started on 2Jun2021 at09:06:32

Found a mismatch in wannier90.eig

Wanted band : 1 found band : 96

Wanted kpoint: 2 found kpoint: 1

A common cause of this error is using thewrong

number of bands. Check your input files.

If your pseudopotentials have shallow corestates remember

to account for these electrons.

Exiting.......

param_read: mismatch in wannier90.eig

原因:num_bands与vasp中NBANDS不匹配

解决办法:grep NBANDS OUTCAR 查看 NBANDS数,并且设置num_bands = NBANDS

另外,注意exclude_bands这个参数,num_bands = NBANDS – exclude_bands

4. Wannier90.werr中出现:

Wannier90: Execution started on 2Jun2021 at09:10:00

Exiting.......

Error: Restart requested but wannier90.chkfile not found

原因:你加了restart = plot 这个命令,但却没有wannier90.chk这个文件。Restart是需要读取wannier90.chk的。

解决办法:注释掉restart = plot,然后重新运行wannier90.x wannier90 &得到wannier90.chk.

5. wannier90.wout中出现:

Time to calculate interpolated bandstructure 0.604 (sec)

Exiting.......

wrong irdist_ws

Error: examine the output/error file fordetails

原因:目前不太清楚原因,可能是2.1版本的一个bug,因为1.2版本没问题。在write_hr = true 写出wannier90_hr.dat的时候会出现,不会影响wannier90_hr.dat的写出。

下面是找到的一个疑似官方回答:

On 23 Feb 2018, at12:21, Mohammed Ghadiyali <m786g at live.co.uk> wrote:

> Dear all,

>

> I 'mtrying to generate wannier centres for single, bi and tri layer graphene, touse willson's loop method to calculate Z2 invariant via wainner tools.

>

> Hence I 'mincluding spin orbital coupling, which prohibits plotting of the wanniercentres so the way I can check the accuracy is by comparing the band-structuresgenerated by wannier90 and Quantum ESPRESSO.

>

> Forgraphene I am able to reproduce the band structure with certain deavations, butfor bi and tri layer graphene the calcualtions are failing, gernally with theerror: wrong irdist_ws

We have madesome improvements to this area of the code since the last release (there isalso a new parameter (ws_distance_tol). So you might want to try taking thedevelopment version from github to see if that fixes your issue.

https://github.com/wannier-developers/wannier90

Note that the development version also plotsspinor wave functions (if you also patch pwscf with the version of pw2wannier90.f90supplied).

Jonathan

,