Commit 528946be authored by Gregor Michalicek's avatar Gregor Michalicek

Replaced CPP_WANN by CPP_WANN4 or CPP_WANN5 at several places

As some parts of the Wannier code rely on JPHs modified Wannier90 libraries
wannier4.a and wannier5.a I now differentiate between them and the official
version. wannier4.a and wannier5.a are only needed for certain code parts.
parent 68b460f1
......@@ -6,7 +6,6 @@ try_compile(FLEUR_USE_WANN ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake/tests/t
message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
if (FLEUR_USE_WANN)
message("Wannier90 1.2 Library found:${FLEUR_USE_WANN}")
set(FLEUR_DEFINITIONS ${FLEUR_DEFINITIONS} "CPP_WANN")
set(FLEUR_MPI_DEFINITIONS ${FLEUR_MPI_DEFINITIONS} "CPP_WANN")
endif()
......@@ -5,7 +5,7 @@
!--------------------------------------------------------------------------------
MODULE m_wann_postproc_setup4
#ifdef CPP_WANN
#ifdef CPP_WANN4
CONTAINS
SUBROUTINE wann_postproc_setup4(
> natd,nkpts,kpoints,amat,bmat,
......
......@@ -5,7 +5,7 @@
!--------------------------------------------------------------------------------
MODULE m_wann_postproc_setup5
#ifdef CPP_WANN
#ifdef CPP_WANN5
CONTAINS
SUBROUTINE wann_postproc_setup5(
> natd,nkpts,kpoints,amat,bmat,
......
......@@ -199,16 +199,16 @@ 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
#ifdef CPP_WANN
call wann_postproc_setup(
> natd,nkpts,kpoints,amat_ang,bmat_ang,
> num,num_bands,ntype,neq,
> zatom,taual,namat,win_filename,'bkpts')
#else
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 (1)",
+ calledby ="wann_wan90prep")
#endif
c******************************************************
c call wannier90 routines to get bqpts
......@@ -238,6 +238,11 @@ c******************************************************
> natd,nqpts,qpoints,amat_ang_q,bmat_ang_q,
> numq,num_bands,ntype,neq,
> zatom,taual_q,namat,'WF1_q','bqpts')
#else
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 (2)",
+ calledby ="wann_wan90prep")
#endif
!bkqpts part below
......@@ -287,18 +292,28 @@ c******************************************************
if(arr_len.eq.4) then
#ifdef CPP_WANN
#ifdef CPP_WANN4
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')
#else
WRITE(*,*) 'The code is supposed to perform the Wannier-4 setup'
WRITE(*,*) 'but the modified Wannier90-4 library is not linked.'
CALL juDFT_error("Wannier-4 setup without Wannier90-4 library",
+ calledby ="wann_wan90prep")
#endif
elseif(arr_len.eq.5) then
#ifdef CPP_WANN
#ifdef CPP_WANN5
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')
#else
WRITE(*,*) 'The code is supposed to perform the Wannier-5 setup'
WRITE(*,*) 'but the modified Wannier90-5 library is not linked.'
CALL juDFT_error("Wannier-5 setup without Wannier90-5 library",
+ calledby ="wann_wan90prep")
#endif
! call juDFT_error("arr_len.eq.5 not yet implemented",
! > calledby='wann_wan90prep')
......
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