Commit 4306f3d9 authored by Gregor Michalicek's avatar Gregor Michalicek

Make fleur compilable and linkable with the Wannier routines

Note: The Wannier code is not yet connected to the main code
parent 7b3f96d4
......@@ -34,8 +34,8 @@ include(mpi/CMakeLists.txt)
include(eels/CMakeLists.txt)
#include(wannier/CMakeLists.txt)
#include(wannier/uhu/CMakeLists.txt)
include(wannier/CMakeLists.txt)
include(wannier/uhu/CMakeLists.txt)
set(inpgen_F77
global/constants.f inpgen/element.f inpgen/atom_input.f inpgen/crystal.f inpgen/lattice2.f inpgen/setab.f inpgen/super_check.f
......
......@@ -64,9 +64,9 @@ wannier/wann_plot_um_dat.F
wannier/wann_plot_vac.F
#wannier/wann_plotw90.F
wannier/wann_postproc.F
wannier/wann_postproc_setup4.f
wannier/wann_postproc_setup5.f
wannier/wann_postproc_setup.f
wannier/wann_postproc_setup4.F
wannier/wann_postproc_setup5.F
wannier/wann_postproc_setup.F
wannier/wann_projgen.F
wannier/wann_projmethod.F
wannier/wann_radovlp_integrals.F
......@@ -83,8 +83,8 @@ wannier/wann_tlmw.f
wannier/wann_ujugaunt.F
wannier/wann_updown.F
wannier/wann_w90kpointgen.f
wannier/wann_wan90prep.f
wannier/wann_wannierize.f
wannier/wann_wan90prep.F
wannier/wann_wannierize.F
wannier/wann_wigner_seitz.f
wannier/wann_write_amn.F
wannier/wann_write_hsomtx.F
......
......@@ -160,7 +160,7 @@ c***************************************************
< kpts,kpoints)
if (kpts /= fullnkpts)
+ CALL juDFT_error ('mismatch in number of kpoints',
+ calledby="wann_read_inp")
+ calledby="wann_postproc")
call wann_get_kpts(
> wann%l_bzsym,film,odi%d1,.true.,
......@@ -173,9 +173,16 @@ c*********************************************************
< num)
if(wann%l_wannierize.and.l_p0)then
#ifndef CPP_WANN
WRITE(*,*) 'At this point a wannierization has to be performed'
WRITE(*,*) 'but the Wannier90 library is not linked!'
CALL juDFT_error ('Wannierization without Wannier90 library',
+ calledby="wann_postproc")
#else
call wann_wannierize(
> film,wann%l_bzsym,jspins,
> natd,pos,amat,bmat,ntype,neq,zatom)
#endif
endif
if(wann%l_dipole2.and.l_p0)then
......@@ -256,7 +263,7 @@ c > volint,symor,pos,ef,wann%l_bzsym,irecl)
rvecind=rvecind+1
if (rvecind > rvecnum)
+ CALL juDFT_error ('mismatch in number of kpoints',
+ calledby="wann_read_inp")
+ calledby="wann_postproc")
rvec(1,rvecind)=r1
rvec(2,rvecind)=r2
......
......@@ -5,6 +5,7 @@
!--------------------------------------------------------------------------------
MODULE m_wann_postproc_setup
#ifdef CPP_WANN
CONTAINS
SUBROUTINE wann_postproc_setup(
> natd,nkpts,kpoints,amat,bmat,
......@@ -159,4 +160,5 @@ c & ikpt,bpt(nn,ikpt),(gb(i,nn,ikpt),i=1,3)
END SUBROUTINE wann_postproc_setup
#endif
END MODULE m_wann_postproc_setup
!--------------------------------------------------------------------------------
! Copyright (c) 2017 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_wann_postproc_setup4
#ifdef CPP_WANN
CONTAINS
SUBROUTINE wann_postproc_setup4(
> natd,nkpts,kpoints,amat,bmat,
......@@ -154,4 +161,5 @@ c & ikpt,bpt(nn,ikpt),(gb(i,nn,ikpt),i=1,3)
END SUBROUTINE wann_postproc_setup4
#endif
END MODULE m_wann_postproc_setup4
!--------------------------------------------------------------------------------
! Copyright (c) 2017 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
! This file is part of FLEUR and available as free software under the conditions
! of the MIT license as expressed in the LICENSE file in more detail.
!--------------------------------------------------------------------------------
MODULE m_wann_postproc_setup5
#ifdef CPP_WANN
CONTAINS
SUBROUTINE wann_postproc_setup5(
> natd,nkpts,kpoints,amat,bmat,
......@@ -154,4 +161,5 @@ c & ikpt,bpt(nn,ikpt),(gb(i,nn,ikpt),i=1,3)
END SUBROUTINE wann_postproc_setup5
#endif
END MODULE m_wann_postproc_setup5
......@@ -199,11 +199,17 @@ c proj file provides num_wann and num_bands
c******************************************************
c call wannier90 routines to get bkpts
c******************************************************
#ifndef CPP_WANN
WRITE(*,*) 'The code is supposed to perform the Wannier setup'
WRITE(*,*) 'but the Wannier90 library is not linked.'
CALL juDFT_error("Wannier setup without Wannier90 library",
+ calledby ="wann_wan90prep")
#else CPP_WANN
call wann_postproc_setup(
> natd,nkpts,kpoints,amat_ang,bmat_ang,
> num,num_bands,ntype,neq,
> zatom,taual,namat,win_filename,'bkpts')
#endif
c******************************************************
c call wannier90 routines to get bqpts
c******************************************************
......@@ -227,10 +233,12 @@ c******************************************************
> num_iter,1,ntype,ntypd,natd,nqpts,neq,numq,amat_q,
> qpoints,zatom,taual_q,namat,3)
#ifdef CPP_WANN
call wann_postproc_setup(
> natd,nqpts,qpoints,amat_ang_q,bmat_ang_q,
> numq,num_bands,ntype,neq,
> zatom,taual_q,namat,'WF1_q','bqpts')
> zatom,taual_q,namat,'WF1_q','bqpts')
#endif
!bkqpts part below
nkqpts = nqpts*nkpts
......@@ -279,15 +287,19 @@ c******************************************************
if(arr_len.eq.4) then
#ifdef CPP_WANN
call wann_postproc_setup4(
> natd,nkqpts,kqpoints,amat_kq*bohr,bmat_kq/bohr,
> numkq,num_bands,ntype,neq,
> zatom,taual_kq,namat,'WF1_gwf','bkqpts')
> zatom,taual_kq,namat,'WF1_gwf','bkqpts')
#endif
elseif(arr_len.eq.5) then
#ifdef CPP_WANN
call wann_postproc_setup5(
> natd,nkqpts,kqpoints,amat_kq*bohr,bmat_kq/bohr,
> numkq,num_bands,ntype,neq,
> zatom,taual_kq,namat,'WF1_gwf','bkqpts')
> zatom,taual_kq,namat,'WF1_gwf','bkqpts')
#endif
! call juDFT_error("arr_len.eq.5 not yet implemented",
! > calledby='wann_wan90prep')
elseif(arr_len.eq.6) then
......
......@@ -5,6 +5,7 @@
!--------------------------------------------------------------------------------
MODULE m_wann_wannierize
#ifdef CPP_WANN
use m_juDFT
c****************************************************
c Call wannier90 subroutines needed for
......@@ -308,5 +309,6 @@ c********read the u_matrix and write it to a formatted file
enddo !jspin
END SUBROUTINE wann_wannierize
#endif
END MODULE m_wann_wannierize
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