Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/tutorials/tutorial_34.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ For more details on the methodology, see Ref.[@Qiao2023-pdwf].
pw.x < graphene.nscf > nscf.out
```

7. Run `pw.x` to generate a list of the required overlaps (written into the
`graphene.nnkp` file).
7. Run `wannier90.x -pp` to generate a list of the required overlaps (written
into the `graphene.nnkp` file).

!!! note

Expand Down
2 changes: 1 addition & 1 deletion docs/solution_booklet/Example1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ \section{Gallium Arsenide --- MLWFs for the valence bands}
\begin{tcolorbox}[colback=blue!10,hbox,title=Xcrysden: {\tt Tools} $\mapsto$ {\tt Data Grid}]
{\tt
Degree of triCubic Spline = 3;
Isovolume = 0.95;
Isovalue = 0.95;
Render +/- isovalue = yes
}
\end{tcolorbox}
Expand Down
2 changes: 1 addition & 1 deletion docs/solution_booklet/Example8.tex
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ \subsection*{Density of states}
{\includegraphics[width=0.5\columnwidth]{figure/example08/convergence_dos_up_integral.pdf}}
\subfloat[$N_{\uparrow+\downarrow}$]
{\includegraphics[width=0.5\columnwidth]{figure/example08/convergence_dos_tot_integral.pdf}}
\caption{Panel (a) interpolated DOS for the up-spin channel of bcc iron for different $\mathbf{k}$-mesh sizes. Panel (b) corresponding integrated DOS. The integral of the DOS is used as a convergence criterion. $N_{\uparrow+\downarrow}$ has been scaled such as the final value is equal to the total number of electrons.}\label{fig8.2}
\caption{Panel (a) interpolated DOS for the down-spin channel of bcc iron for different $\mathbf{k}$-mesh sizes. Panel (b) corresponding integrated DOS. The integral of the DOS is used as a convergence criterion. $N_{\uparrow+\downarrow}$ has been scaled such as the final value is equal to the total number of electrons.}\label{fig8.2}
\end{figure}
\end{itemize}
\clearpage
Expand Down
6 changes: 2 additions & 4 deletions src/kmesh.F90
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,8 @@ subroutine kmesh_get(kmesh_input, kmesh_info, print_output, kpt_latt, real_latti
l = lmn(1, loop); m = lmn(2, loop); n = lmn(3, loop)
!
vkpp = kpt_cart(:, nkp) + matmul(lmn(:, loop), recip_lattice)
!dist = sqrt((kpt_cart(1, 1) - vkpp(1))**2 &
! + (kpt_cart(2, 1) - vkpp(2))**2 + (kpt_cart(3, 1) - vkpp(3))**2)
dist = sqrt(vkpp(1)**2 + vkpp(2)**2 + vkpp(3)**2) !just assume a gamma-centred mesh JJ
!
dist = sqrt((kpt_cart(1, 1) - vkpp(1))**2 &
+ (kpt_cart(2, 1) - vkpp(2))**2 + (kpt_cart(3, 1) - vkpp(3))**2)
if ((dist .gt. kmesh_input%tol) .and. (dist .gt. dnn0 + kmesh_input%tol)) then
if (dist .lt. dnn1 - kmesh_input%tol) then
dnn1 = dist ! found a closer shell
Expand Down
6 changes: 0 additions & 6 deletions src/wannier90_readwrite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,6 @@ subroutine w90_wannier90_readwrite_read_wannierise(settings, wann_control, num_w
l_value=wann_control%use_ss_functional)
if (allocated(error)) return

if (wann_control%use_ss_functional .and. wann_control%guiding_centres%enable) then
call set_error_input(error, &
'Stengel-Spalding combined with guiding centres not supported yet (2Feb26)', comm)
return
endif

call w90_readwrite_get_keyword(settings, 'num_guide_cycles', found, error, comm, &
i_value=wann_control%guiding_centres%num_guide_cycles)
if (allocated(error)) return
Expand Down
11 changes: 6 additions & 5 deletions src/wannierise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,8 @@ subroutine wann_phases(csheet, sheet, rguide, irguide, num_wann, kmesh_info, num
do nn = 1, kmesh_info%nntot
do loop_wann = 1, num_wann
do j = 1, 3
sheet(loop_wann, nn, 1) = kmesh_info%bk(j, nn, 1)*rguide(j, loop_wann)
sheet(loop_wann, nn, 1) = sheet(loop_wann, nn, 1) &
+ kmesh_info%bk(j, nn, 1)*rguide(j, loop_wann)
enddo
enddo
enddo
Expand Down Expand Up @@ -2516,16 +2517,16 @@ subroutine wann_domega(csheet, sheet, rave, num_wann, kmesh_info, num_kpts, wann

cdodq_loc(m, n, nkp_loc) = cdodq_loc(m, n, nkp_loc) + &
kmesh_info%wb(nn)*m_matrix_loc(m, n, cnn, nkp_loc)* &
conjg(sum_mnn(n, nn))
conjg(sum_mnn(n, nn)/csheet(n, nn, 1))
cdodq_loc(m, n, nkp_loc) = cdodq_loc(m, n, nkp_loc) - &
kmesh_info%wb(nn)*conjg(m_matrix_loc(n, m, cnn2, nkp_loc))* &
conjg(sum_mnn(m, nn))
conjg(sum_mnn(m, nn)/csheet(m, nn, 1))
cdodq_loc(m, n, nkp_loc) = cdodq_loc(m, n, nkp_loc) - &
kmesh_info%wb(nn)*conjg(m_matrix_loc(n, m, cnn, nkp_loc))* &
sum_mnn(m, nn)
sum_mnn(m, nn)/csheet(m, nn, 1)
cdodq_loc(m, n, nkp_loc) = cdodq_loc(m, n, nkp_loc) + &
kmesh_info%wb(nn)*m_matrix_loc(m, n, cnn2, nkp_loc)* &
sum_mnn(n, nn)
sum_mnn(n, nn)/csheet(n, nn, 1)
enddo
enddo
enddo
Expand Down
8 changes: 7 additions & 1 deletion test-suite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ add_subdirectory(tests)

## Functional tests
set(functional_tests
library-mode-test-C-interface
)
if (WANNIER90_WITH_C)
# These test requires that the C interface is built
# (which requires a --std=f2018 compliant compiler
list(APPEND functional_tests
library-mode-test-C-interface
)
endif ()
if (WANNIER90_MPI)
# These tests require MPI interface
list(APPEND functional_tests
Expand Down
4 changes: 4 additions & 0 deletions test-suite/library-mode-test-C-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ add_executable(demo wannier.cc)
target_link_libraries(demo PRIVATE Wannier90::wannier90)
# TODO: user should not need to set this
set_property(TARGET demo PROPERTY LINKER_LANGUAGE Fortran)
# workaround for ifx's particular inclination to its own main def when linking
if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
string(APPEND CMAKE_Fortran_FLAGS " -nofor-main")
endif()

enable_testing()
# TODO: The C interface is still buggy and would segfault
Expand Down
12 changes: 6 additions & 6 deletions test-suite/library-mode-test-C-interface/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Other variables in the .win file are also read and used (via the call to cinput_

This executable can be invoked in the test directories, taking the name of the .win as the only argument, eg:

( cd ../tests/testw90_example01; ../../libv2-demo2/wannier_c.x gaas.win )
( cd ../tests/testw90_example02; ../../libv2-demo2/wannier_c.x lead.win )
( cd ../tests/testw90_example03; ../../libv2-demo2/wannier_c.x silicon.win )
( cd ../tests/testw90_example04; ../../libv2-demo2/wannier_c.x copper.win )
( cd ../tests/testw90_example05; ../../libv2-demo2/wannier_c.x diamond.win )
( cd ../tests/testw90_example07; ../../libv2-demo2/wannier_c.x silane.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example01; eval $EXE gaas.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example02; eval $EXE lead.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example03; eval $EXE silicon.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example04; eval $EXE copper.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example05; eval $EXE diamond.win )
(export EXE=`pwd`/wannier_c.x; cd ../tests/testw90_example07; eval $EXE silane.win )
164 changes: 92 additions & 72 deletions test-suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,78 +1,98 @@
## List tests
set(test_names
checkpoint0_write
checkpoint1_read
testpostw90_boltzwann
testpostw90_example04_dos
testpostw90_example04_pdos
testpostw90_fe_ahc
testpostw90_fe_ahc_adaptandfermi
testpostw90_fe_dos_spin
testpostw90_fe_kpathcurv
testpostw90_fe_kpathmorbcurv
testpostw90_fe_kpathmorbcurv_ws
testpostw90_fe_kslicecurv
testpostw90_fe_kslicemorb
testpostw90_fe_kubo_Axy
testpostw90_fe_kubo_jdos
testpostw90_fe_kubo_Szz
testpostw90_fe_morb
testpostw90_fe_morbandahc
testpostw90_fe_spin
testpostw90_gaas_kdotp
testpostw90_gaas_sc_eta_corr
testpostw90_gaas_sc_xyz
testpostw90_gaas_sc_xyz_scphase2
testpostw90_gaas_sc_xyz_scphase2_ws
testpostw90_gaas_sc_xyz_ws
testpostw90_gaas_shc
testpostw90_pt_kpathbandsshc
testpostw90_pt_kpathshc
testpostw90_pt_ksliceshc
testpostw90_pt_shc
testpostw90_pt_shc_ryoo
testpostw90_si_geninterp
testpostw90_si_geninterp_wsdistance
testpostw90_te_gyrotropic
testpostw90_te_gyrotropic_C
testpostw90_te_gyrotropic_D0
testpostw90_te_gyrotropic_dos
testpostw90_te_gyrotropic_Dw
testpostw90_te_gyrotropic_K
testpostw90_te_gyrotropic_NOA
testw90_basic1
testw90_basic2
testw90_benzene_gamma_val
testw90_benzene_gamma_val_hexcell
testw90_benzene_gamma_valcond
testw90_bvec
testw90_cube_format
testw90_disentanglement_sawfs
testw90_example01
testw90_example02
testw90_example02_restart
testw90_example03
testw90_example03_labelinfo
testw90_example03_optmem
testw90_example04
testw90_example05
testw90_example07
testw90_example11_1
testw90_example11_2
testw90_example21_As_sp
testw90_example26
testw90_gaas_disentanglement_issue192
testw90_lavo3_dissphere
checkpoint0_write
checkpoint1_read
# partestw90_mpierr # Disabled because test intended to fail
testpostw90_boltzwann
testpostw90_example04_dos
testpostw90_example04_pdos
testpostw90_fe_ahc
testpostw90_fe_ahc_adaptandfermi
testpostw90_fe_dos_spin
testpostw90_fe_kpathcurv
testpostw90_fe_kpathmorbcurv
testpostw90_fe_kpathmorbcurv_ws
testpostw90_fe_kslicecurv
testpostw90_fe_kslicemorb
testpostw90_fe_kubo_Axy
testpostw90_fe_kubo_jdos
testpostw90_fe_kubo_Szz
testpostw90_fe_morb
testpostw90_fe_morbandahc
testpostw90_fe_morb_transl_inv
testpostw90_fe_morb_transl_inv_higher
testpostw90_fe_spin
testpostw90_gaas_kdotp
testpostw90_gaas_sc_eta_corr
testpostw90_gaas_sc_xyz
testpostw90_gaas_sc_xyz_scphase2
testpostw90_gaas_sc_xyz_scphase2_ws
testpostw90_gaas_sc_xyz_ws
testpostw90_gaas_shc
testpostw90_pt_kpathbandsshc
testpostw90_pt_kpathshc
testpostw90_pt_ksliceshc
testpostw90_pt_shc
testpostw90_pt_shc_higher
testpostw90_pt_shc_ryoo
testpostw90_pt_shc_ryoo_transl_inv
testpostw90_si_geninterp
testpostw90_si_geninterp_wsdistance
testpostw90_te_gyrotropic
testpostw90_te_gyrotropic_C
testpostw90_te_gyrotropic_D0
testpostw90_te_gyrotropic_dos
testpostw90_te_gyrotropic_Dw
testpostw90_te_gyrotropic_K
testpostw90_te_gyrotropic_NOA
testw90_basic1
testw90_basic2
testw90_benzene_gamma_val
testw90_benzene_gamma_valcond
testw90_benzene_gamma_val_hexcell
testw90_bvec
testw90_cube_format
testw90_disentanglement_sawfs
testw90_example01
testw90_example02
testw90_example02_restart
testw90_example03
testw90_example03_bands_plot
testw90_example03_explicit_kpath_band_kpt
testw90_example03_explicit_kpath_bands_plot
testw90_example03_explicit_kpath_labelinfo
testw90_example03_labelinfo
testw90_example03_optmem
testw90_example04
testw90_example05
testw90_example07
testw90_example11_1
testw90_example11_2
testw90_example21_As_sp
testw90_example26
testw90_example36
testw90_gaas_disentanglement_issue192
testw90_graphene_pdwf
testw90_guidingcentre_selectproj
testw90_knbo3_higher
testw90_knbo3_higher_stengel_spaldin
testw90_lavo3_dissphere
# testw90_na_chain_gamma # Dropped because flaky
testw90_nnkpt1
testw90_nnkpt2
testw90_nnkpt3
testw90_nnkpt4
testw90_nnkpt5
testw90_precond_1
testw90_precond_2
testw90_write_u_matrices
testw90_write_u_matrices_disent
testw90_nnkpt1
testw90_nnkpt2
testw90_nnkpt3
testw90_nnkpt4
testw90_nnkpt5
testw90_nnkpt6
testw90_nnkpt7
testw90_precond_1
testw90_precond_2
testw90_proj1
testw90_proj2
testw90_proj3
testw90_rmn
testw90_write_u_matrices
testw90_write_u_matrices_disent
)
if (Wannier90_MPI)
list(APPEND test_names
Expand Down
9 changes: 4 additions & 5 deletions test-suite/tests/jobconfig
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,10 @@ output = knbo3.wout

# Test for the wannier position matrix elements and spreads using higher-order finite difference
# with Stengel-Spaldin Functional and guiding_centres
# JJ disabled while guiding centre + Stengel Spalding functional reference is decided (2Feb26)
#[testw90_knbo3_higher_stengel_spaldin/]
#program = WANNIER90_WOUT_OK
#inputs_args = ('knbo3.win', '')
#output = knbo3.wout
[testw90_knbo3_higher_stengel_spaldin/]
program = WANNIER90_WOUT_OK
inputs_args = ('knbo3.win', '')
output = knbo3.wout

# Test for the spin hall conductivity using higher-order finite difference
[testpostw90_pt_shc_higher/]
Expand Down
Loading
Loading