Happy Holidays! Your help is greatly appreciated.

I followed the link before to run some topo invariant using z2pack and got some issues. Z2pack postprocessor - abinit

I created one similar abinit input file (see attached tw90_1.abi) and it appears to work well with regular abinit run. However, when I plug it into z2pack run using z2.py (see attached z2.py), I see weird issues. Could you please shed some light?

also, I would like to know how to create .msgpack file required in the abinit tutorial. Is it supposed to come from z2pack.surface.run directly?

|=================== |
|=================== |
|starting at 2022-12-26 00:09:16,715 |
|running Z2Pack version 2.2.0 |
| |
|gap_tol: 0.3 |
|init_result: None |
|iterator: range(8, 27, 2) |
|load: True |
|load_quiet: True |
|min_neighbour_dist: 0.01 |
|move_tol: 0.3 |
|num_lines: 20 |
|pos_tol: 0.01 |
|save_file: ./results_tz2_3/BiTeI_0.msgpack |
|serializer: auto |
|surface: <function at 0x7ff1f5484040> |
|system: <z2pack.fp._first_prin<…>ject at 0x7ff1f5293eb0>|

INFO: Adding lines required by ‘num_lines’.
INFO: Adding line at t = 0.0
INFO: Calculating line for N = 8
Traceback (most recent call last):
File “/home/mlin/abinit-9.6.2/tests/tutorial/Input/Al2B2/z2pack/./z2.py”, line 39, in
result_0 = z2pack.surface.run(system=BiTeI_0gpa, surface=lambda s, t: [s / 2, t,0.0], num_lines=20, save_file = ‘./results_tz2_3/BiTeI_0.msgpack’, load=True)
File “/home/mlin/anaconda3/lib/python3.9/site-packages/decorator.py”, line 232, in fun
return caller(func, *(extras + args), **kw)
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/_run_utils.py”, line 21, in inner
result = fct(**kwargs)
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/surface/_run.py”, line 123, in run_surface
return _run_surface_impl(
File “/home/mlin/anaconda3/lib/python3.9/contextlib.py”, line 79, in inner
return func(*args, **kwds)
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/surface/_run.py”, line 269, in _run_surface_impl
result = add_line(t)
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/surface/_run.py”, line 207, in add_line
data.add_line(t, get_line(t))
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/surface/_run.py”, line 167, in get_line
return _line_run._run_line_impl(
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/line/_run.py”, line 190, in _run_line_impl
File “/home/mlin/.local/lib/python3.9/site-packages/z2pack/fp/_first_principles.py”, line 151, in get_mmn
raise ValueError(
ValueError: The number of overlap matrices found is 12, but should be 7. Maybe check search_shells in wannier90.win
tw90_1.abi (2.1 KB)

Any idea how to fix this issue:

ValueError: The number of overlap matrices found is 12, but should be 7. Maybe check search_shells in wannier90.win

Hi e3uydl,

The .msgpack files are generated by z2pack. They are used in the tutorial to accelerate the process, allowing the tutorial to be performed in a reasonable time. You should not provide them.

Can you explain what you are trying to do? Are you trying to compute the Z2 invariant of silicium? Does the tutorial for BiTeI works for you?

In the official tutorial for BiTeI, the .win file used is different. In particular, it includes the keyword skip_B1_tests : true. Try adding that. Your error code mentions search_shells and when I look on the Wannier90 user guide, it says this about the keyword:

Specifies the number of shells of neighbours over which to search in attempting to determine an automatic solution to the B1 condition Eq. 2.1.