Commit e78ebba5 authored by Daniel Wortmann's avatar Daniel Wortmann

udated !# in script

parent 18938f62
#!/bin/sh #!/usr/bin/env bash
#This skript is used by buildbot to set up the environment on different machines #This skript is used by buildbot to set up the environment on different machines
# is loads modules and sets environment variables by sourcing the corresponding # is loads modules and sets environment variables by sourcing the corresponding
......
...@@ -213,6 +213,7 @@ c ..basis wavefunctions in the vacuum ...@@ -213,6 +213,7 @@ c ..basis wavefunctions in the vacuum
complex :: nsfactor complex :: nsfactor
integer :: ngopr1(natd) integer :: ngopr1(natd)
#ifdef CPP_NEVER
um_format=.false. um_format=.false.
l_byindex=.false. l_byindex=.false.
l_byenergy=.false. l_byenergy=.false.
...@@ -1058,6 +1059,6 @@ c***************************************************************** ...@@ -1058,6 +1059,6 @@ c*****************************************************************
#ifdef CPP_MPI #ifdef CPP_MPI
call MPI_BARRIER(mpi_comm,mpiierr) call MPI_BARRIER(mpi_comm,mpiierr)
#endif #endif
#endif
END SUBROUTINE wann_plot_um_dat END SUBROUTINE wann_plot_um_dat
END MODULE m_wann_plot_um_dat END MODULE m_wann_plot_um_dat
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
!-------------------------------------------------------------------------------- !--------------------------------------------------------------------------------
module m_wann_rmat module m_wann_rmat
USE m_fleurenv USE m_juDFT
contains contains
subroutine wann_rmat( subroutine wann_rmat(
> bmat,amat, > bmat,amat,
...@@ -130,7 +130,7 @@ c**************************************************************** ...@@ -130,7 +130,7 @@ c****************************************************************
c get nntot and bk and wb from bkpts file c get nntot and bk and wb from bkpts file
c**************************************************************** c****************************************************************
inquire (file='bkpts',exist=l_file) inquire (file='bkpts',exist=l_file)
if (.not.l_file) CALL jdft_error("need bkpts" if (.not.l_file) CALL judft_error("need bkpts"
+ ,calledby ="wann_rmat") + ,calledby ="wann_rmat")
open (202,file='bkpts',form='formatted',status='old') open (202,file='bkpts',form='formatted',status='old')
read (202,'(i4)') nntot read (202,'(i4)') nntot
......
...@@ -30,17 +30,14 @@ c****************************************************************** ...@@ -30,17 +30,14 @@ c******************************************************************
use m_wann_rw_eig use m_wann_rw_eig
use m_wann_read_umatrix use m_wann_read_umatrix
use m_abcof use m_abcof
use m_dotir
use m_radfun use m_radfun
use m_radflo use m_radflo
use m_cdnread, only : cdn_read0 use m_cdnread, only : cdn_read0
use m_od_types, only : od_inp, od_sym use m_types, only : od_inp, od_sym
use m_loddop use m_loddop
use m_constants, only : pimach use m_constants
use m_wann_real use m_wann_real
use m_xsf_io use m_xsf_io
use m_cotra,only:cotra1
c use m_dwigner
use m_wann_plot_vac use m_wann_plot_vac
...@@ -98,7 +95,7 @@ cccccccccccccccccc local variables cccccccccccccccccccc ...@@ -98,7 +95,7 @@ cccccccccccccccccc local variables cccccccccccccccccccc
integer i1,i2,i3,in,ikpt_k,lda integer i1,i2,i3,in,ikpt_k,lda
integer n_bands(0:neigd),nslibd integer n_bands(0:neigd),nslibd
character*8 dop,iop,name(10) character*8 dop,iop,name(10)
real bkpt(3),sfp,tpi,wronk,wk,wk_b,phase real bkpt(3),wronk,wk,wk_b,phase
real eig(neigd),cp_time(9) real eig(neigd),cp_time(9)
logical l_p0,l_bkpts,l_proj,l_amn,l_mmn,l_eig,wann,wann_plott logical l_p0,l_bkpts,l_proj,l_amn,l_mmn,l_eig,wann,wann_plott
!!! energy window boundaries !!! energy window boundaries
...@@ -175,8 +172,6 @@ cccccccccccccccccc local variables cccccccccccccccccccc ...@@ -175,8 +172,6 @@ cccccccccccccccccc local variables cccccccccccccccccccc
real v(3),scale,ev real v(3),scale,ev
complex av,bv complex av,bv
real volume real volume
c external dotirp !module now
c real dotirp
REAL :: s,const REAL :: s,const
COMPLEX :: xdnout,factor COMPLEX :: xdnout,factor
INTEGER :: ii3,ix,iy,iz,nplo,nbn INTEGER :: ii3,ix,iy,iz,nplo,nbn
...@@ -215,8 +210,6 @@ c specify number of unit-cells that are calculated ...@@ -215,8 +210,6 @@ c specify number of unit-cells that are calculated
if(sortrule==3)l_byenergy=.true. if(sortrule==3)l_byenergy=.true.
sfp = 2* sqrt( pimach() )
tpi = 2* pimach()
lmd = lmaxd*(lmaxd+2) lmd = lmaxd*(lmaxd+2)
nkpts = maxval(nkpt(:)) nkpts = maxval(nkpt(:))
...@@ -237,13 +230,15 @@ cccccccccccccccc initialize the potential cccccccccccc ...@@ -237,13 +230,15 @@ cccccccccccccccc initialize the potential cccccccccccc
open (8,file='pottot',form='unformatted',status='old') open (8,file='pottot',form='unformatted',status='old')
rewind (8) rewind (8)
#ifdef CPP_NEVER
call loddop( call loddop(
> jspd,n3d,odi%n2d,nmzxyd,nmzd,jmtd,nlhd,ntypd, > jspd,n3d,odi%n2d,nmzxyd,nmzd,jmtd,nlhd,ntypd,
> jspins,nq3,odi%nq2,nvac,ntype,invs,invs2,film, > jspins,nq3,odi%nq2,nvac,ntype,invs,invs2,film,
> nlh,jri,ntypsd,ntypsy,8,natd,neq, > nlh,jri,ntypsd,ntypsy,8,natd,neq,
< iop,dop,iter,vrf,vpw,vz,vzxy,name) < iop,dop,iter,vrf,vpw,vz,vzxy,name)
#else
call judft_error("NOT implemented")
#endif
close (8) close (8)
do jspin = 1,jspins do jspin = 1,jspins
...@@ -296,7 +291,7 @@ c******************************************************* ...@@ -296,7 +291,7 @@ c*******************************************************
close(355) close(355)
if(l_byindex.and. if(l_byindex.and.
& .not.((1+band_max(jspin)-band_min(jspin)).eq.num_bands)) & .not.((1+band_max(jspin)-band_min(jspin)).eq.num_bands))
& CALL juDFT_error("1+band_max-band_min /= num_bands",calledby & CALL juDFT_error("1+band_max-band_min/=num_bands",calledby
+ ="wannier_to_lapw") + ="wannier_to_lapw")
c************************************************************** c**************************************************************
...@@ -386,7 +381,7 @@ cccccccccccc read in the eigenvalues and vectors cccccc ...@@ -386,7 +381,7 @@ cccccccccccc read in the eigenvalues and vectors cccccc
l_p0 = .false. l_p0 = .false.
if (irank.eq.0) l_p0 = .true. if (irank.eq.0) l_p0 = .true.
#ifdef CPP_NEVER
call cdn_read0( call cdn_read0(
> lmaxd,ntypd,nlod,neigd,wannierspin, > lmaxd,ntypd,nlod,neigd,wannierspin,
> irank,isize,jspin,jsp_start,jsp_end, > irank,isize,jspin,jsp_start,jsp_end,
...@@ -418,7 +413,9 @@ c do ilo = 1, nlo(n) ...@@ -418,7 +413,9 @@ c do ilo = 1, nlo(n)
c enddo c enddo
c na = na + neq(n) c na = na + neq(n)
40 continue 40 continue
#else
call judft_error("NOT implemented")
#endif
allocate(knorm(fullnkpts,num_bands)) allocate(knorm(fullnkpts,num_bands))
...@@ -562,7 +559,7 @@ c*************************************************************** ...@@ -562,7 +559,7 @@ c***************************************************************
do i1=-cell1,cell1 do i1=-cell1,cell1
do i2=-cell2,cell2 do i2=-cell2,cell2
do i3=-cell3,cell3 do i3=-cell3,cell3
factor=exp(ci*tpi*(i1*bkpt(1)+i2*bkpt(2)+i3*bkpt(3))) factor=exp(ci*tpi_const*(i1*bkpt(1)+i2*bkpt(2)+i3*bkpt(3)))
do i=1,num_wann do i=1,num_wann
do n=1,noccbd do n=1,noccbd
wann_acof(i,0:lmd,1:natd,i1,i2,i3)= wann_acof(i,0:lmd,1:natd,i1,i2,i3)=
...@@ -602,21 +599,21 @@ c*************************************************************** ...@@ -602,21 +599,21 @@ c***************************************************************
denom=-pw1+unigrid(1)*(k1(j,jspin)+bkpt(1)) denom=-pw1+unigrid(1)*(k1(j,jspin)+bkpt(1))
wannz2(j,:)=wannz(j,:) wannz2(j,:)=wannz(j,:)
if(abs(denom).gt.1e-5)then if(abs(denom).gt.1e-5)then
denom=denom*tpi/2 denom=denom*tpi_const/2
factor=cmplx(cos(denom),sin(denom)) factor=cmplx(cos(denom),sin(denom))
wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/ wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/
/ (ci*denom*2) / (ci*denom*2)
endif endif
denom=-pw2+unigrid(2)*(k2(j,jspin)+bkpt(2)) denom=-pw2+unigrid(2)*(k2(j,jspin)+bkpt(2))
if(abs(denom).gt.1e-5)then if(abs(denom).gt.1e-5)then
denom=denom*tpi/2 denom=denom*tpi_const/2
factor=cmplx(cos(denom),sin(denom)) factor=cmplx(cos(denom),sin(denom))
wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/ wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/
/ (ci*denom*2) / (ci*denom*2)
endif endif
denom=-pw3+unigrid(3)*(k3(j,jspin)+bkpt(3)) denom=-pw3+unigrid(3)*(k3(j,jspin)+bkpt(3))
if(abs(denom).gt.1e-5)then if(abs(denom).gt.1e-5)then
denom=denom*tpi/2 denom=denom*tpi_const/2
factor=cmplx(cos(denom),sin(denom)) factor=cmplx(cos(denom),sin(denom))
wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/ wannz2(j,:)=wannz2(j,:)*(factor-conjg(factor))/
/ (ci*denom*2) / (ci*denom*2)
......
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