### Fortran Namelist Example Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/input.md Illustrates the basic syntax for Fortran 90 namelists, showing how to set variables and use comments. ```default &NAMELIST needed_variable2=XX, needed_variable1=YY, character_variable1='a suitable string' / ``` -------------------------------- ### Minimal wt.in Structure Example Source: https://context7.com/quanshengwu/wannier_tools/llms.txt A minimal wt.in file structure demonstrating NAMELISTS and INPUT_CARDs. All parameters have defaults; only set what you need. ```fortran ! ── TB_FILE namelist ────────────────────────────────────────────────────────── &TB_FILE Hrfile = 'wannier90_hr.dat' ! tight-binding Hamiltonian file Package = 'VASP' ! 'VASP', 'QE', 'Wien2k', 'OpenMx', 'Abinit' / ! ── CONTROL namelist: activate calculations ─────────────────────────────────── &CONTROL BulkBand_calc = T SlabSS_calc = T Z2_3D_calc = T / ! ── SYSTEM namelist ─────────────────────────────────────────────────────────── &SYSTEM NumOccupied = 18 ! Number of occupied Wannier bands (not electrons) SOC = 1 ! 0 = no SOC, 1 = SOC included in hr.dat E_FERMI = 4.4195 ! Fermi energy in eV (from first-principles output) NSLAB = 10 ! Slab thickness for surface calculations / ! ── PARAMETERS namelist ─────────────────────────────────────────────────────── &PARAMETERS Nk1 = 101 ! k-points along 1st direction Nk2 = 101 ! k-points along 2nd direction Nk3 = 21 ! k-points along 3rd direction OmegaMin = -0.6 ! Energy window minimum (eV) OmegaMax = 0.5 ! Energy window maximum (eV) OmegaNum = 401 ! Energy slices in [OmegaMin, OmegaMax] Eta_Arc = 0.001 ! Broadening η for Green's function (eV) E_arc = 0.0 ! Fixed energy for Fermi arc / QPI (eV) NP = 2 ! Number of principal layers (iterative GF) Gap_threshold = 1.0 ! Print k-points with gap < this value / ! ── LATTICE card ────────────────────────────────────────────────────────────── LATTICE Angstrom -2.069 -3.583614 0.000000 2.069 -3.583614 0.000000 0.000 2.389075 9.546667 ! ── ATOM_POSITIONS card ─────────────────────────────────────────────────────── ATOM_POSITIONS 5 ! number of atoms with projectors Direct Bi 0.3990 0.3990 0.6970 Bi 0.6010 0.6010 0.3030 Se 0.0000 0.0000 0.5000 Se 0.2060 0.2060 0.1180 Se 0.7940 0.7940 0.8820 ! ── PROJECTORS card ─────────────────────────────────────────────────────────── PROJECTORS 3 3 3 3 3 ! projectors per atom (orbital only, no spin) Bi pz px py Bi pz px py Se pz px py Se pz px py Se pz px py ! ── SURFACE card ────────────────────────────────────────────────────────────── SURFACE ! two lattice vectors spanning the surface 1 0 0 0 1 0 ! ── k-path cards ────────────────────────────────────────────────────────────── KPATH_BULK 4 G 0.00000 0.00000 0.0000 Z 0.00000 0.00000 0.5000 Z 0.00000 0.00000 0.5000 F 0.50000 0.50000 0.0000 F 0.50000 0.50000 0.0000 G 0.00000 0.00000 0.0000 G 0.00000 0.00000 0.0000 L 0.50000 0.00000 0.0000 KPATH_SLAB 2 K 0.33 0.67 G 0.0 0.0 G 0.0 0.0 M 0.5 0.5 KPLANE_SLAB -0.1 -0.1 0.2 0.0 0.0 0.2 KPLANE_BULK 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.50 0.00 KCUBE_BULK -0.50 -0.50 -0.50 1.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 1.00 ``` -------------------------------- ### Bi2Se3 Bulk Band Calculation Example Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/features.md Steps to perform a bulk band calculation for Bi2Se3, including copying input files and running the executable. ```shell $ cd examples/Bi2Se3 $ cp wt.in-bands wt.in $ ../../bin/wt.x $ gnuplot bulkek.gnu ``` -------------------------------- ### Graphene Bulk Band Calculation Example Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/features.md Steps to perform a bulk band calculation for Graphene, including copying input files and running the executable. ```shell $ cd examples/Graphene $ cp wt.in-bands wt.in $ ../../bin/wt.x $ gnuplot bulkek.gnu ``` -------------------------------- ### Setup Input Files for Wilson Loop Calculation Source: https://github.com/quanshengwu/wannier_tools/blob/master/examples/TBG-2.44degree/readme.txt Copies the base input file and extracts the Hamiltonian data required for the Wilson loop and flat band calculations. ```bash cp wt.in-wilsonloop-flatbands wt.in ``` ```bash tar xzvf TBG_hr.dat.tar.gz ``` -------------------------------- ### Dense Format TB Parameters Example Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/input.md This example shows the typical structure of a dense format file containing TB parameters. It includes a comment line, the number of Wannier orbitals, the number of R lattice vectors, and the TB parameters themselves. ```default written on 8May2016 at 13:57:00 30 547 2 2 1 1 1 1 1 1 1 1 2 2 2 2 2 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 2 2 2 2 2 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1 2 2 -6 2 -3 1 1 -0.000002 0.000003 -6 2 -3 2 1 0.000002 0.000017 -6 2 -3 3 1 -0.000053 0.000002 -6 2 -3 4 1 -0.000031 0.000002 -6 2 -3 5 1 0.000001 -0.000000 -6 2 -3 6 1 -0.000003 0.000002 -6 2 -3 7 1 0.000037 -0.000001 -6 2 -3 8 1 -0.000001 -0.000003 -6 2 -3 9 1 -0.000005 -0.000003 -6 2 -3 10 1 -0.000062 -0.000001 -6 2 -3 11 1 -0.000001 0.000001 -6 2 -3 12 1 -0.000031 0.000002 -6 2 -3 13 1 0.000011 -0.000000 -6 2 -3 14 1 -0.000001 0.000001 -6 2 -3 15 1 0.000003 0.000003 -6 2 -3 16 1 0.000000 -0.000010 -6 2 -3 17 1 -0.000010 -0.000001 -6 2 -3 18 1 -0.000000 -0.000008 -6 2 -3 19 1 0.000000 0.000000 -6 2 -3 20 1 0.000012 -0.000002 ...... ``` -------------------------------- ### Run Bulk Spin Texture Calculation Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/features.md Steps to run a bulk spin texture calculation. Ensure you are in the example directory and have copied the input file. ```bash $ cd examples/TiB2/ $ cp wt.in-fs_kplane wt.in $ mpiexec -np 8 ../../bin/wt.x $ gnuplot fs_kplane.gnu ``` -------------------------------- ### Bi2Se3 Strong Topological Insulator Workflow Source: https://context7.com/quanshengwu/wannier_tools/llms.txt End-to-end workflow for Bi2Se3, calculating bulk band structure, Z2 index, and surface states. This example demonstrates the typical steps for analyzing topological insulators. ```bash cd examples/Bi2Se3 # ── Step 1: Bulk band structure ─────────────────────────────────────────────── cp wt.in-bands wt.in ../../bin/wt.x gnuplot bulkek.gnu # → bulkek.eps # ── Step 2: Z2 topological index ───────────────────────────────────────────── cp wt.in-z2 wt.in # sets Z2_3D_calc = T, NumOccupied=18, Nk1=Nk2=41 ../../bin/wt.x gnuplot wanniercenter3D_Z2.gnu # → 6 WCC panels grep "z2 number" WT.out # Expected output: z2 number for 6 planes: 1 0 1 0 1 0 # → Z2 index (v0;v1v2v3) = (1;000) → strong topological insulator # ── Step 3: Surface states (ARPES) + Fermi arcs ─────────────────────────────── cp wt.in-surfacestates wt.in # sets SlabSS_calc=T, SlabArc_calc=T mpirun -np 4 ../../bin/wt.x gnuplot surfdos_l.gnu # → surface ARPES spectrum (top surface, (0001)) gnuplot arc_l.gnu # → Fermi arc at E=0 (Dirac surface cone ``` -------------------------------- ### CONTROL Namelist for Task Setup Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/input.md Enables or disables various calculation tasks. Multiple tasks can be set to true simultaneously to perform combined analyses. ```default &CONTROL BulkBand_calc = T ! bulk band structure calculation flag BulkFS_calc = F BulkGap_cube_calc = F BulkGap_plane_calc = F SlabBand_calc = T WireBand_calc = F SlabSS_calc = T SlabArc_calc = F SlabSpintexture_calc = T wanniercenter_calc = F BerryCurvature_calc = F / ``` -------------------------------- ### Configure 3D Fermi Surface Calculation Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/features.md Input namelist and k-point grid configuration for a 3D Fermi surface calculation. Ensure KCUBE_BULK starts at (0,0,0) for standard visualization. ```fortran &CONTROL BulkFS_calc = T / &PARAMETERS Nk1 = 101 ! No. of slices for the 1st reciprocal vector Nk2 = 101 ! No. of slices for the 2nd reciprocal vector Nk3 = 101 ! No. of slices for the 3rd reciprocal vector / KCUBE_BULK 0.00 0.00 0.00 ! Original point for 3D k plane, For BulkFS_calc, this should be always be 0 0 0 1.00 0.00 0.00 ! The first vector to define 3d k space plane 0.00 1.00 0.00 ! The second vector to define 3d k space plane 0.00 0.00 1.00 ! The third vector to define 3d k cube ``` -------------------------------- ### Prepare System Input File Source: https://github.com/quanshengwu/wannier_tools/blob/master/utility/twisted_graphene_system_tight_binding/readme.md Configure the system parameters by creating a 'system.in' file. This file specifies details like the number of layers, twist angle, stacking sequences, and parameters for generating the tight-binding Hamiltonian. ```fortran ! an example for Twisted A-AB system &PARAMETERS number_layers = 3 ! number of layers twisted_index_m= 1 ! twisted index m, the twist angle theta= acos((3d0*m*m + 3d0*m + 0.5d0)/(3d0*m*m + 3d0*m + 1d0)); twisted_angle_array_input = 0 1 1 ! twisted angle array, unit is theta; Number_of_layers numbers stacking_sequences_input = "A" "A" "B" ! AB stacking sequences, only three values "A", "B", "C"; Number_of_layers numbers use_poscar = F ! use POSCAR or not, "=F" we will generate POSCAR, "=T" we will use the provided POSCAR to generate hr.dat. hr_generate = T ! Generate hr.dat or not, "=T" we will generate hr.dat gen_sparse_hr = T ! Choose sparse or dense stored hr.dat, "=T" we will generate hr.dat in sparse format hr_cutoff=0.00010 ! set HmnR=0 if HmnR The following 5 matrices are for backup using, will not affect the main input for WannierTools 0.00 0.00 0.00 ! Original point for 3D k plane k3=0.0, bar{a}, along k1 1.00 0.00 0.00 ! The first vector to define 3d k space plane 0.00 0.50 0.00 ! The second vector to define 3d k space plane ``` -------------------------------- ### KPATH_SLAB for Slab Material k-point Path Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/input.md Defines the high-symmetry k-point path for 2D slab calculations. Specify the number of k-lines and then the start and end points for each line using fractional coordinates. ```default KPATH_SLAB 2 ! numker of k line for 2D case K 0.33 0.67 G 0.0 0.0 ! k path for 2D case G 0.0 0.0 M 0.5 0.5 ``` -------------------------------- ### Phonon System Configuration Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/input.md Configure WannierTools to use phonon data. Specify the tight-binding Hamiltonian file and set the particle type to 'phonon'. ```fortran &TB_FILE Hrfile = 'phonopyTB_hr.dat' Particle = 'phonon' / ``` -------------------------------- ### Bulk Band Calculation (Points Mode) Input Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/features.md Configure WannierTools for bulk band structure calculations using discrete k-points. Ensure the KPOINTS_3D card is correctly formatted with the number of k-points and their coordinates. ```default &CONTROL BulkBand_points_calc = T / KPOINTS_3D 4 ! number of k points Direct ! Direct or Cartesian 0.00000 0.00000 0.0000 0.00000 0.00000 0.5000 0.50000 0.50000 0.0000 0.00000 0.00000 0.0000 ``` -------------------------------- ### Calculate Bulk Band Structure with WannierTools Source: https://github.com/quanshengwu/wannier_tools/blob/master/doc/source/tutorials/Bi2Se3.html Configure WannierTools to calculate the bulk band structure. Ensure SOC is enabled and set the Fermi energy. An odd number of k-points is recommended for Nk1. ```in &CONTROL BulkBand_calc = T / &SYSTEM SOC = 1 ! soc E_FERMI = 4.4195 ! e-fermi / &PARAMETERS Nk1 = 41 ! number k points odd number would be better / KPATH_BULK ! k point path 4 ! number of k line only for bulk band G 0.00000 0.00000 0.0000 Z 0.00000 0.00000 0.5000 Z 0.00000 0.00000 0.5000 F 0.50000 0.50000 0.0000 F 0.50000 0.50000 0.0000 G 0.00000 0.00000 0.0000 G 0.00000 0.00000 0.0000 L 0.50000 0.00000 0.0000 ```