diff --git a/src/plot.F90 b/src/plot.F90 index ed866601..9a58a6d0 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -534,7 +534,7 @@ subroutine plot_interpolate_bands(mp_grid, real_lattice, band_plot, kpoint_path, if ((SUM((kpoint_path%points(:, (i - 1)*2) - & kpoint_path%points(:, (i - 1)*2 + 1))**2) > 1.e-6) .or. & (TRIM(kpoint_path%labels((i - 1)*2)) .ne. & - TRIM(kpoint_path%labels((i - 1)*2 + 1)))) then + TRIM(kpoint_path%labels((i - 1)*2 + 1)))) then kpath_print_first_point(i) = .true. end if enddo @@ -634,10 +634,12 @@ subroutine plot_interpolate_bands(mp_grid, real_lattice, band_plot, kpoint_path, idx_special_points(counter) = i label_idx_special_points(counter) = j xval_special_points(counter) = xval(i) - if (counter > 1 .and. idx_special_points(counter) == idx_special_points(counter - 1)+1) then - ! If the two points are consecutive, it means that the x coordinate should be the same - xval(i) = xval(i - 1) - xval_special_points(counter) = xval(i) + if (counter > 1) then + if (idx_special_points(counter) == idx_special_points(counter - 1) + 1) then + ! If the two points are consecutive, it means that the x coordinate should be the same + xval(i) = xval(i - 1) + xval_special_points(counter) = xval(i) + end if end if exit end if @@ -677,7 +679,7 @@ subroutine plot_interpolate_bands(mp_grid, real_lattice, band_plot, kpoint_path, endif plot_kpoint(:, counter) = kpoint_path%points(:, 2*loop_spts - 1) + & (kpoint_path%points(:, 2*loop_spts) & - - kpoint_path%points(:, 2*loop_spts - 1))* & + - kpoint_path%points(:, 2*loop_spts - 1))* & (real(loop_i, dp)/real(kpath_pts(loop_spts), dp)) end do idx_special_points(2*loop_spts) = counter @@ -1154,11 +1156,13 @@ subroutine plot_interpolate_gnuplot(band_plot, kpoint_path, bands_num_spec_point ! Axis labels if (kpoint_path%bands_kpt_explicit) then do i = 1, num_spts - if (i > 1 .and. idx_special_points(i) .eq. idx_special_points(i - 1)+1 .and. & - kpoint_path%labels(label_idx_special_points(i)) .ne. kpoint_path%labels(label_idx_special_points(i-1))) then - ! If two different point indeces are consecutive, the label should be combined - glabel(i) = TRIM(kpoint_path%labels(label_idx_special_points(i - 1)))//'|'// & - TRIM(kpoint_path%labels(label_idx_special_points(i))) + if (i > 1) then + if (idx_special_points(i) .eq. idx_special_points(i - 1) + 1 .and. & + kpoint_path%labels(label_idx_special_points(i)) .ne. kpoint_path%labels(label_idx_special_points(i - 1))) then + ! If two different point indeces are consecutive, the label should be combined + glabel(i) = TRIM(kpoint_path%labels(label_idx_special_points(i - 1)))//'|'// & + TRIM(kpoint_path%labels(label_idx_special_points(i))) + end if else glabel(i) = TRIM(kpoint_path%labels(label_idx_special_points(i))) end if diff --git a/src/readwrite.F90 b/src/readwrite.F90 index def9374f..a1ca8025 100644 --- a/src/readwrite.F90 +++ b/src/readwrite.F90 @@ -488,7 +488,7 @@ subroutine w90_readwrite_read_explicit_kpath(settings, kpoint_path, ok, bands_pl call w90_readwrite_get_keyword_explicit_kpath(settings, kpoint_path, error, comm) if (allocated(error)) return call w90_readwrite_read_explicit_kpath_points(settings, kpoint_path%bands_kpt_frac, bohr, & - error, comm) + error, comm) if (allocated(error)) return else ok = .false. @@ -926,8 +926,8 @@ subroutine w90_readwrite_read_kpoints(settings, pw90_effective_model, kpt_latt, endif end subroutine w90_readwrite_read_kpoints -subroutine w90_readwrite_read_explicit_kpath_points(settings, kpt_latt, bohr, & - error, comm) + subroutine w90_readwrite_read_explicit_kpath_points(settings, kpt_latt, bohr, & + error, comm) use w90_error, only: w90_error_type, set_error_input, set_error_alloc, set_error_dealloc implicit none @@ -956,7 +956,6 @@ subroutine w90_readwrite_read_explicit_kpath_points(settings, kpt_latt, bohr, & return endif - allocate (kpt_cart(3, num_kpts), stat=ierr) if (ierr /= 0) then call set_error_alloc(error, 'Error allocating kpt_cart in w90_readwrite_read_explicit_kpath', comm) @@ -964,20 +963,20 @@ subroutine w90_readwrite_read_explicit_kpath_points(settings, kpt_latt, bohr, & endif call w90_readwrite_get_keyword_block(settings, 'explicit_kpath', found, num_kpts, 3, bohr, error, & - comm, r_value=kpt_cart) + comm, r_value=kpt_cart) if (allocated(error)) return - if (.not. found) then - call set_error_input(error, 'Error: Found explicit_kpath_labels but there is no explicit_kpath block', comm) - return - endif - kpt_latt = kpt_cart + if (.not. found) then + call set_error_input(error, 'Error: Found explicit_kpath_labels but there is no explicit_kpath block', comm) + return + endif + kpt_latt = kpt_cart - deallocate (kpt_cart, stat=ierr) - if (ierr /= 0) then - call set_error_dealloc(error, 'Error deallocating kpt_cart in w90_readwrite_read_explicit_kpath', comm) - return - endif -end subroutine w90_readwrite_read_explicit_kpath_points + deallocate (kpt_cart, stat=ierr) + if (ierr /= 0) then + call set_error_dealloc(error, 'Error deallocating kpt_cart in w90_readwrite_read_explicit_kpath', comm) + return + endif + end subroutine w90_readwrite_read_explicit_kpath_points subroutine w90_readwrite_read_lattice(settings, real_lattice, bohr, error, comm) use w90_error, only: w90_error_type, set_error_input diff --git a/src/wannier90_readwrite.F90 b/src/wannier90_readwrite.F90 index 5da600bf..8bf54842 100644 --- a/src/wannier90_readwrite.F90 +++ b/src/wannier90_readwrite.F90 @@ -1130,8 +1130,9 @@ subroutine w90_wannier90_readwrite_read_band_plot(settings, band_plot, num_wann, endif endif - if ((.not. has_kpath) .and. (.not. has_explicit_kpath) .and. bands_plot) then - call set_error_input(error, 'A bandstructure plot has been requested but there is no kpoint_path or explicit_kpath block', comm) + if ((.not. has_kpath) .and. (.not. has_explicit_kpath) .and. bands_plot) then + call set_error_input(error, & + 'A bandstructure plot has been requested but there is no kpoint_path or explicit_kpath block', comm) return endif diff --git a/test-suite/tests/jobconfig b/test-suite/tests/jobconfig index 24c7da45..91cfd4c1 100644 --- a/test-suite/tests/jobconfig +++ b/test-suite/tests/jobconfig @@ -34,6 +34,27 @@ program = WANNIER90_BANDS_PLOT inputs_args = ('silicon.win', '') output = silicon_band.dat +# Silicon, 4 valence bands + 4 conduction bands; interpolated bandstructure on the explicitly set kpath, +# checking the labelinfo.dat file +[testw90_example03_explicit_kpath_labelinfo] +program = WANNIER90_LABELINFO +inputs_args = ('silicon.win', '') +output = silicon_band.labelinfo.dat + +# Silicon, 4 valence bands + 4 conduction bands; interpolated bandstructure on the explicitly set kpath, +# checking the band.dat file +[testw90_example03_explicit_kpath_bands_plot] +program = WANNIER90_BANDS_PLOT +inputs_args = ('silicon.win', '') +output = silicon_band.dat + +# Silicon, 4 valence bands + 4 conduction bands; interpolated bandstructure on the explicitly set kpath, +# checking the band.kpt file +[testw90_example03_explicit_kpath_band_kpt] +program = WANNIER90_BAND_KPT +inputs_args = ('silicon.win', '') +output = silicon_band.kpt + # Copper, states around the Fermi level; Fermi surface [testw90_example04] program = WANNIER90_WOUT_OK diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/.gitignore b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/.gitignore new file mode 100644 index 00000000..55fb5a0a --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/.gitignore @@ -0,0 +1,7 @@ +silicon_band.dat +silicon_band.kpt +silicon_band.labelinfo.dat +silicon_band.gnu +silicon.wout +*.mmn +*.chk diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/Makefile b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/Makefile new file mode 100644 index 00000000..c1fbf97a --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/Makefile @@ -0,0 +1,14 @@ +all: $(patsubst %.chk.fmt.bz2, %.chk, $(wildcard *.chk.fmt.bz2)) $(patsubst %.mmn.bz2, %.mmn, $(wildcard *.mmn.bz2)) + +%.chk: %.chk.fmt.bz2 + $(eval SEEDNAME:=$(patsubst %.chk.fmt.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).chk.fmt && ../../../w90chk2chk.x -f2u $(SEEDNAME) && rm $(SEEDNAME).chk.fmt + +%.mmn: %.mmn.bz2 + $(eval SEEDNAME:=$(patsubst %.mmn.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).mmn + + +.PHONY: all diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/benchmark.out.default.inp=silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/benchmark.out.default.inp=silicon.win new file mode 100644 index 00000000..1ce3c57b --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/benchmark.out.default.inp=silicon.win @@ -0,0 +1,52 @@ + 51 + 0.500000 0.500000 0.500000 1.0 + 0.450000 0.450000 0.450000 1.0 + 0.400000 0.400000 0.400000 1.0 + 0.350000 0.350000 0.350000 1.0 + 0.300000 0.300000 0.300000 1.0 + 0.250000 0.250000 0.250000 1.0 + 0.200000 0.200000 0.200000 1.0 + 0.150000 0.150000 0.150000 1.0 + 0.100000 0.100000 0.100000 1.0 + 0.050000 0.050000 0.050000 1.0 + 0.000000 0.000000 0.000000 1.0 + 0.041667 0.000000 0.041667 1.0 + 0.083333 0.000000 0.083333 1.0 + 0.125000 0.000000 0.125000 1.0 + 0.166667 0.000000 0.166667 1.0 + 0.208333 0.000000 0.208333 1.0 + 0.250000 0.000000 0.250000 1.0 + 0.291667 0.000000 0.291667 1.0 + 0.333333 0.000000 0.333333 1.0 + 0.375000 0.000000 0.375000 1.0 + 0.416667 0.000000 0.416667 1.0 + 0.458333 0.000000 0.458333 1.0 + 0.500000 0.000000 0.500000 1.0 + 0.500000 -0.500000 0.000000 1.0 + 0.468750 -0.468750 0.000000 1.0 + 0.437500 -0.437500 0.000000 1.0 + 0.406250 -0.406250 0.000000 1.0 + 0.375000 -0.375000 0.000000 1.0 + 0.343750 -0.343750 0.000000 1.0 + 0.312500 -0.312500 0.000000 1.0 + 0.281250 -0.281250 0.000000 1.0 + 0.250000 -0.250000 0.000000 1.0 + 0.218750 -0.218750 0.000000 1.0 + 0.187500 -0.187500 0.000000 1.0 + 0.156250 -0.156250 0.000000 1.0 + 0.125000 -0.125000 0.000000 1.0 + 0.093750 -0.093750 0.000000 1.0 + 0.062500 -0.062500 0.000000 1.0 + 0.031250 -0.031250 0.000000 1.0 + 0.000000 0.000000 0.000000 1.0 + 0.500000 0.000000 0.500000 1.0 + 0.500000 0.050000 0.500000 1.0 + 0.500000 0.100000 0.500000 1.0 + 0.500000 0.150000 0.500000 1.0 + 0.500000 0.200000 0.500000 1.0 + 0.500000 0.250000 0.500000 1.0 + 0.500000 0.300000 0.500000 1.0 + 0.500000 0.350000 0.500000 1.0 + 0.500000 0.400000 0.500000 1.0 + 0.500000 0.450000 0.500000 1.0 + 0.500000 0.500000 0.500000 1.0 diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.chk.fmt.bz2 b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.chk.fmt.bz2 new file mode 120000 index 00000000..866d98db --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.chk.fmt.bz2 @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.chk.fmt.bz2 \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.eig b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.eig new file mode 120000 index 00000000..d62b363b --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.eig @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.eig \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.win new file mode 100644 index 00000000..09f9677c --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_band_kpt/silicon.win @@ -0,0 +1,170 @@ +restart = plot +bands_plot = true +bands_num_points = 10 + +num_bands = 12 +num_wann = 8 +use_ws_distance = .false. +search_shells=12 + +dis_win_max = 17.0d0 +dis_froz_max = 6.4d0 +dis_num_iter = 120 +dis_mix_ratio = 1.d0 + +num_iter = 50 +num_print_cycles = 10 + +Begin Atoms_Frac +Si -0.25 0.75 -0.25 +Si 0.00 0.00 0.00 +End Atoms_Frac + +Begin Projections +Si : sp3 +End Projections + +begin explicit_kpath + 0.500000 0.500000 0.500000 + 0.450000 0.450000 0.450000 + 0.400000 0.400000 0.400000 + 0.350000 0.350000 0.350000 + 0.300000 0.300000 0.300000 + 0.250000 0.250000 0.250000 + 0.200000 0.200000 0.200000 + 0.150000 0.150000 0.150000 + 0.100000 0.100000 0.100000 + 0.050000 0.050000 0.050000 + 0.000000 0.000000 0.000000 + 0.041667 0.000000 0.041667 + 0.083333 0.000000 0.083333 + 0.125000 0.000000 0.125000 + 0.166667 0.000000 0.166667 + 0.208333 0.000000 0.208333 + 0.250000 0.000000 0.250000 + 0.291667 0.000000 0.291667 + 0.333333 0.000000 0.333333 + 0.375000 0.000000 0.375000 + 0.416667 0.000000 0.416667 + 0.458333 0.000000 0.458333 + 0.500000 0.000000 0.500000 + 0.500000 -0.500000 0.000000 + 0.468750 -0.468750 0.000000 + 0.437500 -0.437500 0.000000 + 0.406250 -0.406250 0.000000 + 0.375000 -0.375000 0.000000 + 0.343750 -0.343750 0.000000 + 0.312500 -0.312500 0.000000 + 0.281250 -0.281250 0.000000 + 0.250000 -0.250000 0.000000 + 0.218750 -0.218750 0.000000 + 0.187500 -0.187500 0.000000 + 0.156250 -0.156250 0.000000 + 0.125000 -0.125000 0.000000 + 0.093750 -0.093750 0.000000 + 0.062500 -0.062500 0.000000 + 0.031250 -0.031250 0.000000 + 0.000000 0.000000 0.000000 + 0.500000 0.000000 0.500000 + 0.500000 0.050000 0.500000 + 0.500000 0.100000 0.500000 + 0.500000 0.150000 0.500000 + 0.500000 0.200000 0.500000 + 0.500000 0.250000 0.500000 + 0.500000 0.300000 0.500000 + 0.500000 0.350000 0.500000 + 0.500000 0.400000 0.500000 + 0.500000 0.450000 0.500000 + 0.500000 0.500000 0.500000 +end explicit_kpath + +begin explicit_kpath_labels +L 0.50000 0.50000 0.5000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +X 0.50000 -0.50000 0.0000 +K 0.37500 -0.37500 0.0000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +L 0.50000 0.50000 0.5000 +end explicit_kpath_labels + + +Begin Unit_Cell_Cart +-2.6988 0.0000 2.6988 + 0.0000 2.6988 2.6988 +-2.6988 2.6988 0.0000 +End Unit_Cell_Cart + + +mp_grid = 4 4 4 + + +begin kpoints +0.0000 0.0000 0.0000 +0.0000 0.2500 0.0000 +0.0000 0.5000 0.0000 +0.0000 0.7500 0.0000 +0.2500 0.0000 0.0000 +0.2500 0.2500 0.0000 +0.2500 0.5000 0.0000 +0.2500 0.7500 0.0000 +0.5000 0.0000 0.0000 +0.5000 0.2500 0.0000 +0.5000 0.5000 0.0000 +0.5000 0.7500 0.0000 +0.7500 0.0000 0.0000 +0.7500 0.2500 0.0000 +0.7500 0.5000 0.0000 +0.7500 0.7500 0.0000 +0.0000 0.0000 0.2500 +0.0000 0.2500 0.2500 +0.0000 0.5000 0.2500 +0.0000 0.7500 0.2500 +0.2500 0.0000 0.2500 +0.2500 0.2500 0.2500 +0.2500 0.5000 0.2500 +0.2500 0.7500 0.2500 +0.5000 0.0000 0.2500 +0.5000 0.2500 0.2500 +0.5000 0.5000 0.2500 +0.5000 0.7500 0.2500 +0.7500 0.0000 0.2500 +0.7500 0.2500 0.2500 +0.7500 0.5000 0.2500 +0.7500 0.7500 0.2500 +0.0000 0.0000 0.5000 +0.0000 0.2500 0.5000 +0.0000 0.5000 0.5000 +0.0000 0.7500 0.5000 +0.2500 0.0000 0.5000 +0.2500 0.2500 0.5000 +0.2500 0.5000 0.5000 +0.2500 0.7500 0.5000 +0.5000 0.0000 0.5000 +0.5000 0.2500 0.5000 +0.5000 0.5000 0.5000 +0.5000 0.7500 0.5000 +0.7500 0.0000 0.5000 +0.7500 0.2500 0.5000 +0.7500 0.5000 0.5000 +0.7500 0.7500 0.5000 +0.0000 0.0000 0.7500 +0.0000 0.2500 0.7500 +0.0000 0.5000 0.7500 +0.0000 0.7500 0.7500 +0.2500 0.0000 0.7500 +0.2500 0.2500 0.7500 +0.2500 0.5000 0.7500 +0.2500 0.7500 0.7500 +0.5000 0.0000 0.7500 +0.5000 0.2500 0.7500 +0.5000 0.5000 0.7500 +0.5000 0.7500 0.7500 +0.7500 0.0000 0.7500 +0.7500 0.2500 0.7500 +0.7500 0.5000 0.7500 +0.7500 0.7500 0.7500 +End Kpoints + + diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/.gitignore b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/.gitignore new file mode 100644 index 00000000..bf1402b1 --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/.gitignore @@ -0,0 +1,7 @@ +silicon_band.dat +silicon_band.gnu +silicon_band.kpt +silicon_band.labelinfo.dat +silicon.wout +silicon.mmn +silicon.chk diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/Makefile b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/Makefile new file mode 100644 index 00000000..c1fbf97a --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/Makefile @@ -0,0 +1,14 @@ +all: $(patsubst %.chk.fmt.bz2, %.chk, $(wildcard *.chk.fmt.bz2)) $(patsubst %.mmn.bz2, %.mmn, $(wildcard *.mmn.bz2)) + +%.chk: %.chk.fmt.bz2 + $(eval SEEDNAME:=$(patsubst %.chk.fmt.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).chk.fmt && ../../../w90chk2chk.x -f2u $(SEEDNAME) && rm $(SEEDNAME).chk.fmt + +%.mmn: %.mmn.bz2 + $(eval SEEDNAME:=$(patsubst %.mmn.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).mmn + + +.PHONY: all diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/benchmark.out.default.inp=silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/benchmark.out.default.inp=silicon.win new file mode 100644 index 00000000..46807887 --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/benchmark.out.default.inp=silicon.win @@ -0,0 +1,416 @@ + 0.00000000E+00 -0.34309754E+01 + 0.10081144E+00 -0.35890591E+01 + 0.20162287E+00 -0.39437357E+01 + 0.30243431E+00 -0.43364374E+01 + 0.40324575E+00 -0.46968716E+01 + 0.50405718E+00 -0.50083518E+01 + 0.60486862E+00 -0.52738865E+01 + 0.70568006E+00 -0.54964783E+01 + 0.80649149E+00 -0.56703414E+01 + 0.90730293E+00 -0.57827822E+01 + 0.10081144E+01 -0.58218480E+01 + 0.11051210E+01 -0.57748343E+01 + 0.12021253E+01 -0.56422818E+01 + 0.12991319E+01 -0.54471371E+01 + 0.13961385E+01 -0.52182863E+01 + 0.14931428E+01 -0.49766876E+01 + 0.15901495E+01 -0.47224419E+01 + 0.16871561E+01 -0.44317909E+01 + 0.17841604E+01 -0.40676242E+01 + 0.18811670E+01 -0.35984639E+01 + 0.19781736E+01 -0.30157219E+01 + 0.20751779E+01 -0.23395788E+01 + 0.21721846E+01 -0.16099837E+01 + 0.21721846E+01 -0.16099837E+01 + 0.22750748E+01 -0.16586366E+01 + 0.23779650E+01 -0.17017011E+01 + 0.24808553E+01 -0.18005998E+01 + 0.25837455E+01 -0.20140090E+01 + 0.26866358E+01 -0.23603996E+01 + 0.27895260E+01 -0.28000360E+01 + 0.28924163E+01 -0.32727048E+01 + 0.29953065E+01 -0.37394309E+01 + 0.30981967E+01 -0.41730585E+01 + 0.32010870E+01 -0.45450701E+01 + 0.33039772E+01 -0.48431405E+01 + 0.34068675E+01 -0.50919691E+01 + 0.35097577E+01 -0.53321211E+01 + 0.36126479E+01 -0.55679905E+01 + 0.37155382E+01 -0.57516836E+01 + 0.38184284E+01 -0.58218480E+01 + 0.38184284E+01 -0.16099837E+01 + 0.39192399E+01 -0.20820207E+01 + 0.40200513E+01 -0.24665930E+01 + 0.41208627E+01 -0.27362183E+01 + 0.42216742E+01 -0.29146533E+01 + 0.43224856E+01 -0.30504517E+01 + 0.44232970E+01 -0.31779514E+01 + 0.45241085E+01 -0.32980191E+01 + 0.46249199E+01 -0.33852698E+01 + 0.47257314E+01 -0.34237870E+01 + 0.48265428E+01 -0.34309754E+01 + + 0.00000000E+00 -0.82982321E+00 + 0.10081144E+00 -0.61693082E+00 + 0.20162287E+00 -0.92297604E-01 + 0.30243431E+00 0.59833710E+00 + 0.40324575E+00 0.13947873E+01 + 0.50405718E+00 0.22754288E+01 + 0.60486862E+00 0.32178504E+01 + 0.70568006E+00 0.41842528E+01 + 0.80649149E+00 0.51139346E+01 + 0.90730293E+00 0.58874203E+01 + 0.10081144E+01 0.62285135E+01 + 0.11051210E+01 0.60184338E+01 + 0.12021253E+01 0.55136459E+01 + 0.12991319E+01 0.48798844E+01 + 0.13961385E+01 0.41913049E+01 + 0.14931428E+01 0.34732126E+01 + 0.15901495E+01 0.27399663E+01 + 0.16871561E+01 0.20073778E+01 + 0.17841604E+01 0.12866935E+01 + 0.18811670E+01 0.57579704E+00 + 0.19781736E+01 -0.13845331E+00 + 0.20751779E+01 -0.86800402E+00 + 0.21721846E+01 -0.16099837E+01 + 0.21721846E+01 -0.16099837E+01 + 0.22750748E+01 -0.15285758E+01 + 0.23779650E+01 -0.14040241E+01 + 0.24808553E+01 -0.12222363E+01 + 0.25837455E+01 -0.97938990E+00 + 0.26866358E+01 -0.67047850E+00 + 0.27895260E+01 -0.28231640E+00 + 0.28924163E+01 0.19197615E+00 + 0.29953065E+01 0.74063943E+00 + 0.30981967E+01 0.13489916E+01 + 0.32010870E+01 0.20244150E+01 + 0.33039772E+01 0.27857816E+01 + 0.34068675E+01 0.36351478E+01 + 0.35097577E+01 0.45219343E+01 + 0.36126479E+01 0.53063034E+01 + 0.37155382E+01 0.59263832E+01 + 0.38184284E+01 0.62285135E+01 + 0.38184284E+01 -0.16099837E+01 + 0.39192399E+01 -0.11131851E+01 + 0.40200513E+01 -0.65348315E+00 + 0.41208627E+01 -0.29163562E+00 + 0.42216742E+01 -0.11713455E+00 + 0.43224856E+01 -0.17975402E+00 + 0.44232970E+01 -0.38194814E+00 + 0.45241085E+01 -0.58657458E+00 + 0.46249199E+01 -0.72801372E+00 + 0.47257314E+01 -0.80512383E+00 + 0.48265428E+01 -0.82982321E+00 + + 0.00000000E+00 0.50150958E+01 + 0.10081144E+00 0.50439136E+01 + 0.20162287E+00 0.51206155E+01 + 0.30243431E+00 0.52235322E+01 + 0.40324575E+00 0.53355812E+01 + 0.50405718E+00 0.54582728E+01 + 0.60486862E+00 0.55855779E+01 + 0.70568006E+00 0.57614101E+01 + 0.80649149E+00 0.59707868E+01 + 0.90730293E+00 0.61536641E+01 + 0.10081144E+01 0.62285135E+01 + 0.11051210E+01 0.60942752E+01 + 0.12021253E+01 0.57834918E+01 + 0.12991319E+01 0.53767341E+01 + 0.13961385E+01 0.49625254E+01 + 0.14931428E+01 0.45966125E+01 + 0.15901495E+01 0.43045354E+01 + 0.16871561E+01 0.39591240E+01 + 0.17841604E+01 0.36850801E+01 + 0.18811670E+01 0.34993104E+01 + 0.19781736E+01 0.33924093E+01 + 0.20751779E+01 0.33407734E+01 + 0.21721846E+01 0.33255456E+01 + 0.21721846E+01 0.33255456E+01 + 0.22750748E+01 0.31139059E+01 + 0.23779650E+01 0.26777548E+01 + 0.24808553E+01 0.22278528E+01 + 0.25837455E+01 0.18623148E+01 + 0.26866358E+01 0.16685683E+01 + 0.27895260E+01 0.17044720E+01 + 0.28924163E+01 0.19645295E+01 + 0.29953065E+01 0.23894994E+01 + 0.30981967E+01 0.28792174E+01 + 0.32010870E+01 0.33443474E+01 + 0.33039772E+01 0.37853110E+01 + 0.34068675E+01 0.42694555E+01 + 0.35097577E+01 0.48398212E+01 + 0.36126479E+01 0.54886758E+01 + 0.37155382E+01 0.60292038E+01 + 0.38184284E+01 0.62285135E+01 + 0.38184284E+01 0.33255456E+01 + 0.39192399E+01 0.31727870E+01 + 0.40200513E+01 0.28383735E+01 + 0.41208627E+01 0.25314383E+01 + 0.42216742E+01 0.24325256E+01 + 0.43224856E+01 0.26241426E+01 + 0.44232970E+01 0.30319851E+01 + 0.45241085E+01 0.35604500E+01 + 0.46249199E+01 0.41536655E+01 + 0.47257314E+01 0.47275785E+01 + 0.48265428E+01 0.50150958E+01 + + 0.00000000E+00 0.50150958E+01 + 0.10081144E+00 0.50519031E+01 + 0.20162287E+00 0.51446098E+01 + 0.30243431E+00 0.52552852E+01 + 0.40324575E+00 0.53578570E+01 + 0.50405718E+00 0.54582728E+01 + 0.60486862E+00 0.56070555E+01 + 0.70568006E+00 0.57896850E+01 + 0.80649149E+00 0.59890030E+01 + 0.90730293E+00 0.61585162E+01 + 0.10081144E+01 0.62285135E+01 + 0.11051210E+01 0.61019395E+01 + 0.12021253E+01 0.57859792E+01 + 0.12991319E+01 0.54286434E+01 + 0.13961385E+01 0.50621267E+01 + 0.14931428E+01 0.46839575E+01 + 0.15901495E+01 0.43045354E+01 + 0.16871561E+01 0.40762629E+01 + 0.17841604E+01 0.38786285E+01 + 0.18811670E+01 0.36865275E+01 + 0.19781736E+01 0.35071182E+01 + 0.20751779E+01 0.33747094E+01 + 0.21721846E+01 0.33255456E+01 + 0.21721846E+01 0.33255456E+01 + 0.22750748E+01 0.33519964E+01 + 0.23779650E+01 0.34302613E+01 + 0.24808553E+01 0.35574597E+01 + 0.25837455E+01 0.37311333E+01 + 0.26866358E+01 0.39528090E+01 + 0.27895260E+01 0.42259866E+01 + 0.28924163E+01 0.45442294E+01 + 0.29953065E+01 0.48812789E+01 + 0.30981967E+01 0.51984680E+01 + 0.32010870E+01 0.54651915E+01 + 0.33039772E+01 0.56743424E+01 + 0.34068675E+01 0.58404944E+01 + 0.35097577E+01 0.59827869E+01 + 0.36126479E+01 0.61060097E+01 + 0.37155382E+01 0.61952867E+01 + 0.38184284E+01 0.62285135E+01 + 0.38184284E+01 0.33255456E+01 + 0.39192399E+01 0.33718010E+01 + 0.40200513E+01 0.34974330E+01 + 0.41208627E+01 0.36666048E+01 + 0.42216742E+01 0.38360841E+01 + 0.43224856E+01 0.39856278E+01 + 0.44232970E+01 0.41389548E+01 + 0.45241085E+01 0.43430303E+01 + 0.46249199E+01 0.46149078E+01 + 0.47257314E+01 0.48899253E+01 + 0.48265428E+01 0.50150958E+01 + + 0.00000000E+00 0.77906701E+01 + 0.10081144E+00 0.78295645E+01 + 0.20162287E+00 0.79316910E+01 + 0.30243431E+00 0.80643964E+01 + 0.40324575E+00 0.81999615E+01 + 0.50405718E+00 0.83315147E+01 + 0.60486862E+00 0.84700905E+01 + 0.70568006E+00 0.86234640E+01 + 0.80649149E+00 0.87668523E+01 + 0.90730293E+00 0.88251869E+01 + 0.10081144E+01 0.87993304E+01 + 0.11051210E+01 0.87214951E+01 + 0.12021253E+01 0.84928292E+01 + 0.12991319E+01 0.81666155E+01 + 0.13961385E+01 0.78233298E+01 + 0.14931428E+01 0.75290934E+01 + 0.15901495E+01 0.73077361E+01 + 0.16871561E+01 0.71430490E+01 + 0.17841604E+01 0.70078634E+01 + 0.18811670E+01 0.68900068E+01 + 0.19781736E+01 0.68019985E+01 + 0.20751779E+01 0.67775183E+01 + 0.21721846E+01 0.68599856E+01 + 0.21721846E+01 0.68599857E+01 + 0.22750748E+01 0.68593086E+01 + 0.23779650E+01 0.68985241E+01 + 0.24808553E+01 0.69923356E+01 + 0.25837455E+01 0.71820857E+01 + 0.26866358E+01 0.74932475E+01 + 0.27895260E+01 0.78939676E+01 + 0.28924163E+01 0.83074604E+01 + 0.29953065E+01 0.86601049E+01 + 0.30981967E+01 0.89016632E+01 + 0.32010870E+01 0.89984898E+01 + 0.33039772E+01 0.89741986E+01 + 0.34068675E+01 0.89233630E+01 + 0.35097577E+01 0.89291178E+01 + 0.36126479E+01 0.89100953E+01 + 0.37155382E+01 0.88253259E+01 + 0.38184284E+01 0.87993304E+01 + 0.38184284E+01 0.68599856E+01 + 0.39192399E+01 0.68577370E+01 + 0.40200513E+01 0.70097625E+01 + 0.41208627E+01 0.72139779E+01 + 0.42216742E+01 0.74324912E+01 + 0.43224856E+01 0.77014878E+01 + 0.44232970E+01 0.80632181E+01 + 0.45241085E+01 0.84475794E+01 + 0.46249199E+01 0.86072943E+01 + 0.47257314E+01 0.81549478E+01 + 0.48265428E+01 0.77906701E+01 + + 0.00000000E+00 0.95610606E+01 + 0.10081144E+00 0.96125963E+01 + 0.20162287E+00 0.97388443E+01 + 0.30243431E+00 0.98695663E+01 + 0.40324575E+00 0.99261034E+01 + 0.50405718E+00 0.98583406E+01 + 0.60486862E+00 0.96469856E+01 + 0.70568006E+00 0.93736685E+01 + 0.80649149E+00 0.91045548E+01 + 0.90730293E+00 0.88841568E+01 + 0.10081144E+01 0.87993305E+01 + 0.11051210E+01 0.89665253E+01 + 0.12021253E+01 0.93846250E+01 + 0.12991319E+01 0.98999934E+01 + 0.13961385E+01 0.10448440E+02 + 0.14931428E+01 0.10540413E+02 + 0.15901495E+01 0.10121825E+02 + 0.16871561E+01 0.94858061E+01 + 0.17841604E+01 0.87608845E+01 + 0.18811670E+01 0.80663074E+01 + 0.19781736E+01 0.74933090E+01 + 0.20751779E+01 0.70898558E+01 + 0.21721846E+01 0.68599873E+01 + 0.21721846E+01 0.68599878E+01 + 0.22750748E+01 0.73532107E+01 + 0.23779650E+01 0.85012603E+01 + 0.24808553E+01 0.98675742E+01 + 0.25837455E+01 0.11122918E+02 + 0.26866358E+01 0.12073911E+02 + 0.27895260E+01 0.12119010E+02 + 0.28924163E+01 0.11550989E+02 + 0.29953065E+01 0.11045502E+02 + 0.30981967E+01 0.10560272E+02 + 0.32010870E+01 0.10092301E+02 + 0.33039772E+01 0.96686323E+01 + 0.34068675E+01 0.93220374E+01 + 0.35097577E+01 0.90702424E+01 + 0.36126479E+01 0.89930502E+01 + 0.37155382E+01 0.88884076E+01 + 0.38184284E+01 0.87993305E+01 + 0.38184284E+01 0.68599873E+01 + 0.39192399E+01 0.72627655E+01 + 0.40200513E+01 0.81409587E+01 + 0.41208627E+01 0.92808964E+01 + 0.42216742E+01 0.10447784E+02 + 0.43224856E+01 0.11364997E+02 + 0.44232970E+01 0.11416966E+02 + 0.45241085E+01 0.10649469E+02 + 0.46249199E+01 0.98220407E+01 + 0.47257314E+01 0.95558982E+01 + 0.48265428E+01 0.95610606E+01 + + 0.00000000E+00 0.95612738E+01 + 0.10081144E+00 0.96193078E+01 + 0.20162287E+00 0.97605644E+01 + 0.30243431E+00 0.99004757E+01 + 0.40324575E+00 0.99488153E+01 + 0.50405718E+00 0.98587695E+01 + 0.60486862E+00 0.96654626E+01 + 0.70568006E+00 0.93914412E+01 + 0.80649149E+00 0.91054312E+01 + 0.90730293E+00 0.88949320E+01 + 0.10081144E+01 0.87993307E+01 + 0.11051210E+01 0.89726117E+01 + 0.12021253E+01 0.94010147E+01 + 0.12991319E+01 0.99868081E+01 + 0.13961385E+01 0.10637788E+02 + 0.14931428E+01 0.11241226E+02 + 0.15901495E+01 0.12015993E+02 + 0.16871561E+01 0.12791117E+02 + 0.17841604E+01 0.13669693E+02 + 0.18811670E+01 0.14617054E+02 + 0.19781736E+01 0.15504878E+02 + 0.20751779E+01 0.16147730E+02 + 0.21721846E+01 0.16383274E+02 + 0.21721846E+01 0.16383275E+02 + 0.22750748E+01 0.16102929E+02 + 0.23779650E+01 0.15389021E+02 + 0.24808553E+01 0.14544146E+02 + 0.25837455E+01 0.13654866E+02 + 0.26866358E+01 0.12810421E+02 + 0.27895260E+01 0.12659400E+02 + 0.28924163E+01 0.12669611E+02 + 0.29953065E+01 0.12381761E+02 + 0.30981967E+01 0.12168014E+02 + 0.32010870E+01 0.12115200E+02 + 0.33039772E+01 0.11530159E+02 + 0.34068675E+01 0.10608219E+02 + 0.35097577E+01 0.97881963E+01 + 0.36126479E+01 0.92114335E+01 + 0.37155382E+01 0.89765539E+01 + 0.38184284E+01 0.87993307E+01 + 0.38184284E+01 0.16383274E+02 + 0.39192399E+01 0.16126086E+02 + 0.40200513E+01 0.15443544E+02 + 0.41208627E+01 0.14529063E+02 + 0.42216742E+01 0.13547757E+02 + 0.43224856E+01 0.12642019E+02 + 0.44232970E+01 0.11830884E+02 + 0.45241085E+01 0.11072548E+02 + 0.46249199E+01 0.10359671E+02 + 0.47257314E+01 0.97907548E+01 + 0.48265428E+01 0.95612738E+01 + + 0.00000000E+00 0.13823821E+02 + 0.10081144E+00 0.13884401E+02 + 0.20162287E+00 0.14004301E+02 + 0.30243431E+00 0.14037221E+02 + 0.40324575E+00 0.13837990E+02 + 0.50405718E+00 0.13336825E+02 + 0.60486862E+00 0.12564838E+02 + 0.70568006E+00 0.11632210E+02 + 0.80649149E+00 0.10694772E+02 + 0.90730293E+00 0.99666279E+01 + 0.10081144E+01 0.97055504E+01 + 0.11051210E+01 0.98800483E+01 + 0.12021253E+01 0.10268846E+02 + 0.12991319E+01 0.10626180E+02 + 0.13961385E+01 0.10807383E+02 + 0.14931428E+01 0.11312003E+02 + 0.15901495E+01 0.12015993E+02 + 0.16871561E+01 0.12915031E+02 + 0.17841604E+01 0.13881846E+02 + 0.18811670E+01 0.14828689E+02 + 0.19781736E+01 0.15638391E+02 + 0.20751779E+01 0.16188124E+02 + 0.21721846E+01 0.16383275E+02 + 0.21721846E+01 0.16383275E+02 + 0.22750748E+01 0.16144997E+02 + 0.23779650E+01 0.15494795E+02 + 0.24808553E+01 0.14599039E+02 + 0.25837455E+01 0.13851013E+02 + 0.26866358E+01 0.13403127E+02 + 0.27895260E+01 0.13128300E+02 + 0.28924163E+01 0.13153687E+02 + 0.29953065E+01 0.13198531E+02 + 0.30981967E+01 0.12945870E+02 + 0.32010870E+01 0.12365502E+02 + 0.33039772E+01 0.12120190E+02 + 0.34068675E+01 0.11937061E+02 + 0.35097577E+01 0.11412791E+02 + 0.36126479E+01 0.10612455E+02 + 0.37155382E+01 0.98973135E+01 + 0.38184284E+01 0.97055504E+01 + 0.38184284E+01 0.16383275E+02 + 0.39192399E+01 0.16134492E+02 + 0.40200513E+01 0.15457556E+02 + 0.41208627E+01 0.14556423E+02 + 0.42216742E+01 0.13695076E+02 + 0.43224856E+01 0.13026037E+02 + 0.44232970E+01 0.12964944E+02 + 0.45241085E+01 0.13357065E+02 + 0.46249199E+01 0.13644870E+02 + 0.47257314E+01 0.13784913E+02 + 0.48265428E+01 0.13823821E+02 + diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.chk.fmt.bz2 b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.chk.fmt.bz2 new file mode 120000 index 00000000..866d98db --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.chk.fmt.bz2 @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.chk.fmt.bz2 \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.eig b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.eig new file mode 120000 index 00000000..d62b363b --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.eig @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.eig \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.win new file mode 100644 index 00000000..09f9677c --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_bands_plot/silicon.win @@ -0,0 +1,170 @@ +restart = plot +bands_plot = true +bands_num_points = 10 + +num_bands = 12 +num_wann = 8 +use_ws_distance = .false. +search_shells=12 + +dis_win_max = 17.0d0 +dis_froz_max = 6.4d0 +dis_num_iter = 120 +dis_mix_ratio = 1.d0 + +num_iter = 50 +num_print_cycles = 10 + +Begin Atoms_Frac +Si -0.25 0.75 -0.25 +Si 0.00 0.00 0.00 +End Atoms_Frac + +Begin Projections +Si : sp3 +End Projections + +begin explicit_kpath + 0.500000 0.500000 0.500000 + 0.450000 0.450000 0.450000 + 0.400000 0.400000 0.400000 + 0.350000 0.350000 0.350000 + 0.300000 0.300000 0.300000 + 0.250000 0.250000 0.250000 + 0.200000 0.200000 0.200000 + 0.150000 0.150000 0.150000 + 0.100000 0.100000 0.100000 + 0.050000 0.050000 0.050000 + 0.000000 0.000000 0.000000 + 0.041667 0.000000 0.041667 + 0.083333 0.000000 0.083333 + 0.125000 0.000000 0.125000 + 0.166667 0.000000 0.166667 + 0.208333 0.000000 0.208333 + 0.250000 0.000000 0.250000 + 0.291667 0.000000 0.291667 + 0.333333 0.000000 0.333333 + 0.375000 0.000000 0.375000 + 0.416667 0.000000 0.416667 + 0.458333 0.000000 0.458333 + 0.500000 0.000000 0.500000 + 0.500000 -0.500000 0.000000 + 0.468750 -0.468750 0.000000 + 0.437500 -0.437500 0.000000 + 0.406250 -0.406250 0.000000 + 0.375000 -0.375000 0.000000 + 0.343750 -0.343750 0.000000 + 0.312500 -0.312500 0.000000 + 0.281250 -0.281250 0.000000 + 0.250000 -0.250000 0.000000 + 0.218750 -0.218750 0.000000 + 0.187500 -0.187500 0.000000 + 0.156250 -0.156250 0.000000 + 0.125000 -0.125000 0.000000 + 0.093750 -0.093750 0.000000 + 0.062500 -0.062500 0.000000 + 0.031250 -0.031250 0.000000 + 0.000000 0.000000 0.000000 + 0.500000 0.000000 0.500000 + 0.500000 0.050000 0.500000 + 0.500000 0.100000 0.500000 + 0.500000 0.150000 0.500000 + 0.500000 0.200000 0.500000 + 0.500000 0.250000 0.500000 + 0.500000 0.300000 0.500000 + 0.500000 0.350000 0.500000 + 0.500000 0.400000 0.500000 + 0.500000 0.450000 0.500000 + 0.500000 0.500000 0.500000 +end explicit_kpath + +begin explicit_kpath_labels +L 0.50000 0.50000 0.5000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +X 0.50000 -0.50000 0.0000 +K 0.37500 -0.37500 0.0000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +L 0.50000 0.50000 0.5000 +end explicit_kpath_labels + + +Begin Unit_Cell_Cart +-2.6988 0.0000 2.6988 + 0.0000 2.6988 2.6988 +-2.6988 2.6988 0.0000 +End Unit_Cell_Cart + + +mp_grid = 4 4 4 + + +begin kpoints +0.0000 0.0000 0.0000 +0.0000 0.2500 0.0000 +0.0000 0.5000 0.0000 +0.0000 0.7500 0.0000 +0.2500 0.0000 0.0000 +0.2500 0.2500 0.0000 +0.2500 0.5000 0.0000 +0.2500 0.7500 0.0000 +0.5000 0.0000 0.0000 +0.5000 0.2500 0.0000 +0.5000 0.5000 0.0000 +0.5000 0.7500 0.0000 +0.7500 0.0000 0.0000 +0.7500 0.2500 0.0000 +0.7500 0.5000 0.0000 +0.7500 0.7500 0.0000 +0.0000 0.0000 0.2500 +0.0000 0.2500 0.2500 +0.0000 0.5000 0.2500 +0.0000 0.7500 0.2500 +0.2500 0.0000 0.2500 +0.2500 0.2500 0.2500 +0.2500 0.5000 0.2500 +0.2500 0.7500 0.2500 +0.5000 0.0000 0.2500 +0.5000 0.2500 0.2500 +0.5000 0.5000 0.2500 +0.5000 0.7500 0.2500 +0.7500 0.0000 0.2500 +0.7500 0.2500 0.2500 +0.7500 0.5000 0.2500 +0.7500 0.7500 0.2500 +0.0000 0.0000 0.5000 +0.0000 0.2500 0.5000 +0.0000 0.5000 0.5000 +0.0000 0.7500 0.5000 +0.2500 0.0000 0.5000 +0.2500 0.2500 0.5000 +0.2500 0.5000 0.5000 +0.2500 0.7500 0.5000 +0.5000 0.0000 0.5000 +0.5000 0.2500 0.5000 +0.5000 0.5000 0.5000 +0.5000 0.7500 0.5000 +0.7500 0.0000 0.5000 +0.7500 0.2500 0.5000 +0.7500 0.5000 0.5000 +0.7500 0.7500 0.5000 +0.0000 0.0000 0.7500 +0.0000 0.2500 0.7500 +0.0000 0.5000 0.7500 +0.0000 0.7500 0.7500 +0.2500 0.0000 0.7500 +0.2500 0.2500 0.7500 +0.2500 0.5000 0.7500 +0.2500 0.7500 0.7500 +0.5000 0.0000 0.7500 +0.5000 0.2500 0.7500 +0.5000 0.5000 0.7500 +0.5000 0.7500 0.7500 +0.7500 0.0000 0.7500 +0.7500 0.2500 0.7500 +0.7500 0.5000 0.7500 +0.7500 0.7500 0.7500 +End Kpoints + + diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/.gitignore b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/.gitignore new file mode 100644 index 00000000..4be390ba --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/.gitignore @@ -0,0 +1,6 @@ +silicon_band.dat +silicon_band.kpt +silicon_band.labelinfo.dat +silicon_band.gnu +silicon.wout +*.mmn diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/Makefile b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/Makefile new file mode 100644 index 00000000..c1fbf97a --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/Makefile @@ -0,0 +1,14 @@ +all: $(patsubst %.chk.fmt.bz2, %.chk, $(wildcard *.chk.fmt.bz2)) $(patsubst %.mmn.bz2, %.mmn, $(wildcard *.mmn.bz2)) + +%.chk: %.chk.fmt.bz2 + $(eval SEEDNAME:=$(patsubst %.chk.fmt.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).chk.fmt && ../../../w90chk2chk.x -f2u $(SEEDNAME) && rm $(SEEDNAME).chk.fmt + +%.mmn: %.mmn.bz2 + $(eval SEEDNAME:=$(patsubst %.mmn.bz2, %, $<)) + echo $(SEEDNAME) + cat $< | bunzip2 - > $(SEEDNAME).mmn + + +.PHONY: all diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/benchmark.out.default.inp=silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/benchmark.out.default.inp=silicon.win new file mode 100644 index 00000000..b1c80b60 --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/benchmark.out.default.inp=silicon.win @@ -0,0 +1,8 @@ +L 1 0.0000000000 0.5000000000 0.5000000000 0.5000000000 +G 11 1.0081143643 0.0000000000 0.0000000000 0.0000000000 +X 23 2.1721845635 0.5000000000 0.0000000000 0.5000000000 +X 24 2.1721845635 0.5000000000 -0.5000000000 0.0000000000 +K 28 2.5837455293 0.3750000000 -0.3750000000 0.0000000000 +G 40 3.8184284267 0.0000000000 0.0000000000 0.0000000000 +X 41 3.8184284267 0.5000000000 0.0000000000 0.5000000000 +L 51 4.8265427910 0.5000000000 0.5000000000 0.5000000000 diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.chk.fmt.bz2 b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.chk.fmt.bz2 new file mode 120000 index 00000000..866d98db --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.chk.fmt.bz2 @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.chk.fmt.bz2 \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.eig b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.eig new file mode 120000 index 00000000..d62b363b --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.eig @@ -0,0 +1 @@ +../../checkpoints/si_geninterp/silicon.eig \ No newline at end of file diff --git a/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.win b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.win new file mode 100644 index 00000000..09f9677c --- /dev/null +++ b/test-suite/tests/testw90_example03_explicit_kpath_labelinfo/silicon.win @@ -0,0 +1,170 @@ +restart = plot +bands_plot = true +bands_num_points = 10 + +num_bands = 12 +num_wann = 8 +use_ws_distance = .false. +search_shells=12 + +dis_win_max = 17.0d0 +dis_froz_max = 6.4d0 +dis_num_iter = 120 +dis_mix_ratio = 1.d0 + +num_iter = 50 +num_print_cycles = 10 + +Begin Atoms_Frac +Si -0.25 0.75 -0.25 +Si 0.00 0.00 0.00 +End Atoms_Frac + +Begin Projections +Si : sp3 +End Projections + +begin explicit_kpath + 0.500000 0.500000 0.500000 + 0.450000 0.450000 0.450000 + 0.400000 0.400000 0.400000 + 0.350000 0.350000 0.350000 + 0.300000 0.300000 0.300000 + 0.250000 0.250000 0.250000 + 0.200000 0.200000 0.200000 + 0.150000 0.150000 0.150000 + 0.100000 0.100000 0.100000 + 0.050000 0.050000 0.050000 + 0.000000 0.000000 0.000000 + 0.041667 0.000000 0.041667 + 0.083333 0.000000 0.083333 + 0.125000 0.000000 0.125000 + 0.166667 0.000000 0.166667 + 0.208333 0.000000 0.208333 + 0.250000 0.000000 0.250000 + 0.291667 0.000000 0.291667 + 0.333333 0.000000 0.333333 + 0.375000 0.000000 0.375000 + 0.416667 0.000000 0.416667 + 0.458333 0.000000 0.458333 + 0.500000 0.000000 0.500000 + 0.500000 -0.500000 0.000000 + 0.468750 -0.468750 0.000000 + 0.437500 -0.437500 0.000000 + 0.406250 -0.406250 0.000000 + 0.375000 -0.375000 0.000000 + 0.343750 -0.343750 0.000000 + 0.312500 -0.312500 0.000000 + 0.281250 -0.281250 0.000000 + 0.250000 -0.250000 0.000000 + 0.218750 -0.218750 0.000000 + 0.187500 -0.187500 0.000000 + 0.156250 -0.156250 0.000000 + 0.125000 -0.125000 0.000000 + 0.093750 -0.093750 0.000000 + 0.062500 -0.062500 0.000000 + 0.031250 -0.031250 0.000000 + 0.000000 0.000000 0.000000 + 0.500000 0.000000 0.500000 + 0.500000 0.050000 0.500000 + 0.500000 0.100000 0.500000 + 0.500000 0.150000 0.500000 + 0.500000 0.200000 0.500000 + 0.500000 0.250000 0.500000 + 0.500000 0.300000 0.500000 + 0.500000 0.350000 0.500000 + 0.500000 0.400000 0.500000 + 0.500000 0.450000 0.500000 + 0.500000 0.500000 0.500000 +end explicit_kpath + +begin explicit_kpath_labels +L 0.50000 0.50000 0.5000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +X 0.50000 -0.50000 0.0000 +K 0.37500 -0.37500 0.0000 +G 0.00000 0.00000 0.0000 +X 0.50000 0.00000 0.5000 +L 0.50000 0.50000 0.5000 +end explicit_kpath_labels + + +Begin Unit_Cell_Cart +-2.6988 0.0000 2.6988 + 0.0000 2.6988 2.6988 +-2.6988 2.6988 0.0000 +End Unit_Cell_Cart + + +mp_grid = 4 4 4 + + +begin kpoints +0.0000 0.0000 0.0000 +0.0000 0.2500 0.0000 +0.0000 0.5000 0.0000 +0.0000 0.7500 0.0000 +0.2500 0.0000 0.0000 +0.2500 0.2500 0.0000 +0.2500 0.5000 0.0000 +0.2500 0.7500 0.0000 +0.5000 0.0000 0.0000 +0.5000 0.2500 0.0000 +0.5000 0.5000 0.0000 +0.5000 0.7500 0.0000 +0.7500 0.0000 0.0000 +0.7500 0.2500 0.0000 +0.7500 0.5000 0.0000 +0.7500 0.7500 0.0000 +0.0000 0.0000 0.2500 +0.0000 0.2500 0.2500 +0.0000 0.5000 0.2500 +0.0000 0.7500 0.2500 +0.2500 0.0000 0.2500 +0.2500 0.2500 0.2500 +0.2500 0.5000 0.2500 +0.2500 0.7500 0.2500 +0.5000 0.0000 0.2500 +0.5000 0.2500 0.2500 +0.5000 0.5000 0.2500 +0.5000 0.7500 0.2500 +0.7500 0.0000 0.2500 +0.7500 0.2500 0.2500 +0.7500 0.5000 0.2500 +0.7500 0.7500 0.2500 +0.0000 0.0000 0.5000 +0.0000 0.2500 0.5000 +0.0000 0.5000 0.5000 +0.0000 0.7500 0.5000 +0.2500 0.0000 0.5000 +0.2500 0.2500 0.5000 +0.2500 0.5000 0.5000 +0.2500 0.7500 0.5000 +0.5000 0.0000 0.5000 +0.5000 0.2500 0.5000 +0.5000 0.5000 0.5000 +0.5000 0.7500 0.5000 +0.7500 0.0000 0.5000 +0.7500 0.2500 0.5000 +0.7500 0.5000 0.5000 +0.7500 0.7500 0.5000 +0.0000 0.0000 0.7500 +0.0000 0.2500 0.7500 +0.0000 0.5000 0.7500 +0.0000 0.7500 0.7500 +0.2500 0.0000 0.7500 +0.2500 0.2500 0.7500 +0.2500 0.5000 0.7500 +0.2500 0.7500 0.7500 +0.5000 0.0000 0.7500 +0.5000 0.2500 0.7500 +0.5000 0.5000 0.7500 +0.5000 0.7500 0.7500 +0.7500 0.0000 0.7500 +0.7500 0.2500 0.7500 +0.7500 0.5000 0.7500 +0.7500 0.7500 0.7500 +End Kpoints + + diff --git a/test-suite/tests/userconfig b/test-suite/tests/userconfig index c077db60..1e99e9e1 100644 --- a/test-suite/tests/userconfig +++ b/test-suite/tests/userconfig @@ -237,6 +237,13 @@ extract_fn = tools parsers.parse_w90_bands_dat.parse tolerance = ( (1.0e-6, 1.0e-6, 'kpath'), (1.0e-5, 1.0e-5, 'eigval')) +[WANNIER90_BAND_KPT] +exe = ../../wannier90.x +extract_fn = tools parsers.parse_w90_band_kpt.parse +tolerance = ( (1.0e-6, 1.0e-6, 'kpath'), + (1.0e-6, 1.0e-6, 'weight'), + (1.0e-6, 1.0e-6, 'nkp')) + [user] # This is the string (or list of strings) that identifies sets of tests # to be run - one could have multiple ones diff --git a/test-suite/tools/parsers/parse_w90_band_kpt.py b/test-suite/tools/parsers/parse_w90_band_kpt.py new file mode 100644 index 00000000..0b081750 --- /dev/null +++ b/test-suite/tools/parsers/parse_w90_band_kpt.py @@ -0,0 +1,41 @@ +""" +Parser function parse() to parse the _band.kpt output file of wannier90.x. + +""" +import inspect +from collections import defaultdict + +from . import show_output + +def parse(fname): + """ + Open the file, parses it and return the values. + """ + retdict = defaultdict(list) + + if show_output: + print("[{}.{}] Parsing file '{}'".format( + __name__, inspect.currentframe().f_code.co_name, fname)) + + with open(fname) as f: + lines = f.readlines() + + for lno, l in enumerate(lines): + if lno == 0: + retdict["nkp"] = [int(l)] + continue + pieces = l.split() + + if len(pieces) == 4: # three kpoint coordinates and weight + retdict["kpath"].append([float(pieces[0]), float(pieces[1]), float(pieces[2])]) + retdict["weight"].append(float(pieces[3])) + else: + raise ValueError("Wrong line length ({}, instead of 4); line content: {}".format( + len(pieces), l)) + + retdict = dict(retdict) + if show_output: + for k in sorted(retdict): + print(" {}: {}".format(k, retdict[k])) + print("-"*72) + return retdict