As an example, let us calculate a invariant of a 3D topological insulator BiSe [83].

**SCF calculation**

You can perform the SCF calculation using 'Bi2Se3-Z2.dat' stored in the directory 'work'
with the following keyword:

HS.fileout on #on|off, default=offAfter finishing the SCF calculation normally, the out file 'Bi2Se3-Z2.scfout' is generated.

**Calculation of Z invariant**

Before computing the invariant by using the code 'Z2FH.c', please
compile the code in directory 'source' as

% make Z2FHAfter the compilation, you may obtain the excutable file 'Z2FH' in the directory 'work'. Then, let us move on the calculation of the Z invariant as

% ./Z2FH Bi2Se3-Z2.scfout or % ./Z2FH Bi2Se3-Z2.scfout < Z2FH.in > Z2FH.out or % mpirun -np 4 ./Z2FH Bi2Se3-Z2.scfout < Z2FH.in > Z2FH.out

The file 'Z2FH.in' contains parameters which are requested by 'Z2FH' such as

5 1 1In the first case above, you will be interactively asked from the program as follows:

****************************************************************** ****************************************************************** Z2FH: code for calculating the Z2 invariant of bulk systems by Fukui-Hatsugai method. Copyright (C), 2019, Hikaru Sawahata, Naoya Yamaguchi, Fumiyuki Ishii and Taisuke Ozaki This is free software, and you are welcome to redistribute it under the constitution of the GNU-GPL. Please cite the following article: H. Sawahata, N. Yamaguchi, H. Kotaka and F. Ishii, Jpn. J. Appl. Phys. 57, 030309 (2018). ****************************************************************** ****************************************************************** Mesh1 Number(Half Direction):5 Calculate All plane?(0:No,1:Yes)1 Restart?[1:x0,2:xpi,3:y0....]1 Read the scfout file (Bi2Se3-Z2.scfout) *** The file format of the SCFOUT file: 3 And it supports the following functions: - jx - polB - kSpin - Z2FH - calB ***

**Parameters for Z2FH**

Let us explain the parameters in the input file 'Z2FH.in'.

- In the first line, you set the number of mesh on the half of integration interval,
in other words, on the space of quarter of the first Brillouin zone (please see the Fig. 75).
If you set as '5', the code performs the integrations on the square plaquettes
formed by 55 k-point mesh in the quarter Brillouin zone.
- In the second line, you can speficy a flag whether computing invariant
is performed or not on all the six k-planes on which the invariant is defined.
If you want to compute only four planes for
,
you can set as '0'. Otherwise, please set as '1', corresponding to all the calculations of
the six planes for (
).
- In the third line,
you can set the -plane on which you want to restart the calculation.
The numbers 1, 2, 3, 4, 5, and 6 correspond to
,
, ,
, ,
and
planes, respectively.

**Output files**

After the calculation by 'Z2FH', the following files are generated.

- Z2.dat
This file stores the computational result of invariant. In case of computing all the -plane (you set the second row parameter as '1'.), the invariants on the six -planes are on the first line, and four of invariant are on the second line as shown below:

Z2 invariant:(x0,xpi,y0,ypi,z0,zpi)=(1.000000,-0.000000,1.000000,-0.000000,1.000000,-0.000000) Z2 invariant:(nu0,nu1,nu2,nu3):(1,0,0,0)

- LCNum*.dat
Data files of integer-valued field . The '*' behind 'LCNum' is the index running from 1 to 6. The number (1,2,3,4,5,6) corresponds to , respectively. When you calculate only four planes, four files 'LCNum(2,4,5,6).dat' are generated, corresponding to .

- LCNum*.pl
Script files for gnuplot. The '*' behind 'LCNum' is the index running from 1 to 6. The number (1,2,3,4,5,6) corresponds to , respectively. When you calculate only four planes, four files 'LCNum(2,4,5,6).dat' are generated, corresponding to . You can visualize of integer-valued field by

% gnuplot LCNum1.pl

- temporal_12345.input
This is a copy of input file, which was used for the SCF calculation, reconstructed from the scfout file.

As an example, we show the integer-valued field on in Fig. 77, which can be obtained by the procedure explained above as 'gnuplot LCNum1.pl'. Since is the gauge dependent value, you may find a different result in your calculation, while the Z invariant should be reproduced.