Commit 13992254 authored by Daniel Wortmann's avatar Daniel Wortmann

Wannier90 now as submodule, more reactivation of code, still a long way to go :-)

parent ecd05260
......@@ -7,3 +7,6 @@
[submodule "docs/katacoda-tutorials"]
path = docs/katacoda-tutorials
url = gitlab@iffgit.fz-juelich.de:fleur/katacoda-tutorials.git
[submodule "external/wannier90"]
path = external/wannier90
url = https://github.com/wannier-developers/wannier90.git
......@@ -10,8 +10,8 @@ include("cmake/tests/test_MPI.cmake")
include("cmake/tests/test_FFTMKL.cmake")
include("cmake/tests/test_HDF5.cmake")
include("cmake/tests/test_Wannier90.cmake")
include("cmake/tests/test_Wannier4.cmake")
include("cmake/tests/test_Wannier5.cmake")
#include("cmake/tests/test_Wannier4.cmake")
#include("cmake/tests/test_Wannier5.cmake")
include("cmake/tests/test_GPU.cmake")
include("cmake/tests/test_MAGMA.cmake")
include("cmake/tests/test_LibXC.cmake")
......
......@@ -8,7 +8,17 @@ message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
if (DEFINED CLI_FLEUR_USE_WANNIER)
if (${CLI_FLEUR_USE_WANNIER})
if (NOT FLEUR_USE_WANN)
message(FATAL_ERROR "You asked for Wannier90 but cmake couldn't find it. Please check your Fortran compiler settings")
message("You asked for Wannier90 but cmake couldn't find it. We will download the gitlab sources and use it during compilation")
set(FLEUR_USE_WANN TRUE)
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/wannier90/src" )
find_package(Git REQUIRED)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule init external/wannier90 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_init OUTPUT_QUIET ERROR_QUIET)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} RESULT_VARIABLE _res_update OUTPUT_QUIET ERROR_QUIET)
if( ${_res_init} GREATER 0 OR ${_res_update} GREATER 0 )
message(FATAL_ERROR "Wannier90 source could not be downloaded.\n"
"We tried: 'git submodule init external/wannier90 && git submodule update' and resulted in error" )
endif()
endif()
endif()
else()
if (FLEUR_USE_WANN)
......
Subproject commit ca6f7114b9fffe0964ca9e8d24e09ef15b300316
Subproject commit 3cb2231abf1d47fbd8b3e21c8478e9f26a73ce5f
Subproject commit 280f38267410f085244732a1577f09433fa1500f
......@@ -13,7 +13,6 @@
<qss>.0000000000 .0000000000 .0000000000</qss>
</nocoParams>
<expertModes gw="0" pot8="F" isec1="99" secvar="F"/>
<geometryOptimization l_f="F" xa="2.00000000" thetad="330.00000000" epsdisp=".00001000" epsforce=".00001000"/>
<ldaU l_linMix="F" mixParam=".050000" spinf="1.000000"/>
<bzIntegration valenceElectrons="8.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointCount count="3" gamma="F"/>
......
......@@ -13,7 +13,6 @@
<qss>.0000000000 .0000000000 .0000000000</qss>
</nocoParams>
<expertModes gw="0" pot8="F" isec1="99" secvar="F"/>
<geometryOptimization l_f="F" xa="2.00000000" thetad="330.00000000" epsdisp=".00001000" epsforce=".00001000"/>
<ldaU l_linMix="F" mixParam=".050000" spinf="1.000000"/>
<bzIntegration valenceElectrons="8.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointMesh nx="2" ny="2" nz="2" gamma="F"/>
......
......@@ -13,7 +13,6 @@
<qss>.0000000000 .0000000000 .0000000000</qss>
</nocoParams>
<expertModes gw="0" pot8="F" isec1="99" secvar="F"/>
<geometryOptimization l_f="F" xa="2.00000000" thetad="330.00000000" epsdisp=".00001000" epsforce=".00001000"/>
<ldaU l_linMix="F" mixParam=".050000" spinf="1.000000"/>
<bzIntegration valenceElectrons="8.00000000" mode="hist" fermiSmearingEnergy=".00100000">
<kPointMesh nx="2" ny="2" nz="2" gamma="F"/>
......
......@@ -100,3 +100,22 @@ wannier/init_wannier_defaults.f90
wannier/wann_read_inp.f90
wannier/wann_optional.f90
)
if(FLEUR_USE_WANN)
set(fleur_F90 ${fleur_F90}
external/wannier90/src/comms.F90
external/wannier90/src/disentangle.F90
external/wannier90/src/io.F90
external/wannier90/src/overlap.F90
external/wannier90/src/plot.F90
external/wannier90/src/sitesym.F90
external/wannier90/src/utility.F90
external/wannier90/src/wannierise.F90
external/wannier90/src/constants.F90
external/wannier90/src/hamiltonian.F90
external/wannier90/src/kmesh.F90
external/wannier90/src/parameters.F90
external/wannier90/src/transport.F90
external/wannier90/src/wannier_lib.F90
external/wannier90/src/ws_distance.F90
)
endif()
......@@ -22,7 +22,7 @@ c********************************************************
logical,intent(in) :: l_bzsym,film
logical,intent(in) :: l_onedimens,l_readkpts
integer,intent(out) :: nkpts
real,intent(inout) :: kpoints(:,:)
real,intent(inout),allocatable :: kpoints(:,:)
real :: scale
integer :: at,j
......
......@@ -66,8 +66,7 @@ c****************************************************************
> lmaxd,ntypd,nlod,neigd,nvd,jspd,
> 0,isize,kptibz,jspin,nbasfcn,nlotot,
> l_ss,l_noco,nrec,
< nmat,nv,ello,evdu,epar,
< k1,k2,k3,bkpt,wk,nbands,eig,zMat,
< nmat,nbands,eig,zMat,
> l_gwf,iqpt)
nkbnd = 0
......
......@@ -147,10 +147,11 @@ c real,intent(inout) :: fermi_weights(:,:,:) !(neigd,nkptd,jspd)
integer :: rvecnum,rvecind,num(3),int_dummy
integer,allocatable :: rvec(:,:),ndegen(:)
real :: scale
real :: kpoints(3,fullnkpts)
real,allocatable :: kpoints(:,:)!(3,fullnkpts)
integer :: r1,r2,r3,spinspin,num_angl
logical :: l_nocosoc
ALLOCATE(kpoints(3,fullnkpts))
l_nocosoc=.false.
if(l_soc)l_nocosoc=.true.
if(l_noco)l_nocosoc=.true.
......
......@@ -56,7 +56,6 @@ c******************************************************
integer :: nn,ikpt
real :: pos(3,natd)
! Taken from wannier90-1.2/src/wannier_lib.F90
interface
subroutine wannier_setup(seed__name, mp_grid_loc, num_kpts_loc,
......@@ -65,7 +64,8 @@ c******************************************************
+ atoms_cart_loc, gamma_only_loc, spinors_loc, nntot_loc,
+ nnlist_loc, nncell_loc, num_bands_loc, num_wann_loc,
+ proj_site_loc, proj_l_loc, proj_m_loc, proj_radial_loc,
+ proj_z_loc, proj_x_loc, proj_zona_loc, exclude_bands_loc)
+ proj_z_loc, proj_x_loc, proj_zona_loc, exclude_bands_loc
+ ,proj_s_loc,proj_s_qaxis_loc)
implicit none
integer, parameter :: dp = selected_real_kind(15,300)
......@@ -107,9 +107,12 @@ c******************************************************
+ proj_zona_loc
integer, dimension(num_bands_tot), intent(out) ::
+ exclude_bands_loc
integer, dimension(num_bands_tot), optional, intent(out) ::
+ proj_s_loc
real(kind=dp),dimension(3,num_bands_tot),optional,intent(out)::
+ proj_s_qaxis_loc
end subroutine wannier_setup
end interface
do j=1,natd
pos(:,j)=matmul(amat(:,:),taual(:,j))
enddo
......@@ -132,7 +135,7 @@ c**********************************************************
c Call Wannier90 routine for preparation.
c**********************************************************
call wannier_setup(
> seedname,num,
> seed,num,
> nkpts,
> transpose(amat),bmat,
> kpoints,num_bands,
......
......@@ -137,8 +137,7 @@ c****************************************************************
> lmaxd,ntypd,nlod,neigd,nvd,jspd,
> 0,isize,kptibz,jspin,nbasfcn,nlotot,
> l_ss,l_noco,nrec,
< nmat,nv,ello,evdu,epar,
< k1,k2,k3,bkpt,wk,nbands,eig,zMat,
< nmat,nbands,eig,zMat,
> l_gwf,iqpt)
......@@ -185,8 +184,7 @@ c****************************************************************
> lmaxd,ntypd,nlod,neigd,nvd,jspd,
> 0,isize,kptibz,jspin,nbasfcn,nlotot,
> l_ss,l_noco,nrec,
< nmat,nv,ello,evdu,epar,
< k1,k2,k3,bkpt,wk,nbands,eig,zMat,
< nmat,nbands,eig,zMat,
> l_gwf,iqpt)
......@@ -211,8 +209,7 @@ c*****************************************************************
> lmaxd,ntypd,nlod,neigd,nvd,jspd,
> irank,isize,kptibz,jspin,nbasfcn,nlotot,
> l_ss,l_noco,nrec,
< nmat,nv,ello,evdu,epar,
< k1,k2,k3,bkpt,wk,nbands,eig,zMat,
< nmat,nbands,eig,zMat,
> l_gwf,iqpt)
USE m_judft
USE m_types
......@@ -225,13 +222,8 @@ c*****************************************************************
LOGICAL, INTENT (IN) :: l_ss,l_noco,l_gwf
INTEGER, INTENT (OUT) :: nbands,nmat
REAL, INTENT (OUT) :: wk
INTEGER, INTENT (OUT) :: k1(nvd,jspd),k2(nvd,jspd),k3(nvd,jspd)
INTEGER, INTENT (OUT) :: nv(jspd)
REAL, INTENT (OUT) :: bkpt(3),eig(neigd)
REAL, INTENT (OUT) :: ello(nlod,ntypd,jspd),evdu(2,jspd)
REAL, INTENT (OUT) :: epar(0:lmaxd,ntypd,jspd)
REAL, INTENT (OUT) :: eig(neigd)
TYPE(t_mat), INTENT (INOUT) :: zMat !z(nbasfcn,noccbd) !can be real/complex
......@@ -240,12 +232,11 @@ c*****************************************************************
n_start=1
n_end=neigd
! CALL cdn_read(
! > eig_id,
! > nvd,jspd,irank,isize,kptibz,jspin,nbasfcn,
! > l_ss,l_noco,neigd,n_start,n_end,
! < nmat,nv,ello,evdu,epar,
! < bkpt,wk,nbands,eig,zMat)
CALL judft_error("BUG: wann_read in wann_rw_eig not implemented")
CALL cdn_read(
> eig_id,
> nvd,jspd,irank,isize,kptibz,jspin,nbasfcn,
> l_ss,l_noco,neigd,n_start,n_end,
< nbands,eig,zMat)
! CALL judft_error("BUG: wann_read in wann_rw_eig not implemented")
END SUBROUTINE wann_read_eig
END MODULE m_wann_rw_eig
......@@ -461,8 +461,7 @@ c******************************************************************
> lmaxd,ntypd,nlod,neigd,nvd,jspd,
> irank,isize,kptibz,jspin,nbasfcn,nlotot,
> l_ss,l_noco,nrec,
< nmat,nv,ello,evdu,epar,
< k1,k2,k3,bkpt,wk,nbands,eigg,zzMat,
< nmat,nbands,eigg,zzMat,
> .false.,1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment