Commit e8794b08 authored by Daniel Wortmann's avatar Daniel Wortmann

More fixes to Wannier part

parent 19a16eb9
......@@ -739,5 +739,100 @@
REAL, ALLOCATABLE :: a_r(:), b_r(:)
COMPLEX, ALLOCATABLE :: a_c(:), b_c(:)
END TYPE
!
! type for wannier-functions
!
type t_wann
integer :: wan90version
integer :: oc_num_orbs
integer,allocatable :: oc_orbs(:)
logical :: l_unformatted
logical :: l_oc_f
logical :: l_ndegen
logical :: l_orbitalmom
logical :: l_orbcomp
logical :: l_orbcomprs
logical :: l_denmat
logical :: l_perturbrs
logical :: l_perturb
logical :: l_nedrho
logical :: l_anglmomrs
logical :: l_anglmom
logical :: l_spindisp
logical :: l_spindisprs
logical :: l_socspicom
logical :: l_socspicomrs
logical :: l_offdiposoprs
logical :: l_offdiposop
logical :: l_torque
logical :: l_torquers
logical :: l_atomlist
integer :: atomlist_num
integer,allocatable :: atomlist(:)
logical :: l_berry
logical :: l_perpmagrs
logical :: l_perpmag
logical :: l_perpmagat
logical :: l_perpmagatrs
logical :: l_socmatrs
logical :: l_socmat
logical :: l_soctomom
logical :: l_kptsreduc2
logical :: l_nablapaulirs
logical :: l_nablars
logical :: l_surfcurr
logical :: l_updown
logical :: l_ahe
logical :: l_she
logical :: l_rmat
logical :: l_nabla
logical :: l_socodi
logical :: l_pauli
logical :: l_pauliat
logical :: l_potmat
logical :: l_projgen
logical :: l_plot_symm
logical :: l_socmmn0
logical :: l_bzsym
logical :: l_hopping
logical :: l_kptsreduc
logical :: l_prepwan90
logical :: l_plot_umdat
logical :: l_wann_plot
logical :: l_bynumber
logical :: l_stopopt
logical :: l_matrixmmn
logical :: l_matrixamn
logical :: l_projmethod
logical :: l_wannierize
logical :: l_plotw90
logical :: l_byindex
logical :: l_byenergy
logical :: l_proj_plot
logical :: l_bestproj
logical :: l_ikptstart
logical :: l_lapw
logical :: l_plot_lapw
logical :: l_fermi
logical :: l_dipole
logical :: l_dipole2
logical :: l_dipole3
logical :: l_mmn0
logical :: l_mmn0at
logical :: l_manyfiles
logical :: l_collectmanyfiles
logical :: l_ldauwan
logical :: l_lapw_kpts
logical :: l_lapw_gfleur
logical :: l_kpointgen
logical :: l_w90kpointgen
integer :: ikptstart
integer :: band_min(1:2)
integer :: band_max(1:2)
integer :: gfthick
integer :: gfcut
integer :: unigrid(6)
integer :: mhp(3)
end type t_wann
END
......@@ -24,7 +24,6 @@ c***************************************************************
< mmn)
use m_constants, only : pimach
use m_dotir
implicit none
c .. scalar Arguments..
......@@ -74,8 +73,6 @@ c ..intrinsic functions..
c.. external functions
external vacudz,vacuz
c real dotirp
c external dotirp !module now
allocate ( ac(nv2d,neigd),bc(nv2d,neigd),dt(nv2d),
+ dte(nv2d),t(nv2d),te(nv2d),tei(nv2d),
......@@ -142,7 +139,7 @@ c.. the body of the routine
v(1) = bkpt(1) + kvac1(ik) + qss1
v(2) = bkpt(2) + kvac2(ik) + qss2
v(3) = 0.
ev = evacp - 0.5*dotirp(v,v,bbmat)
ev = evacp - 0.5*dot_product(v,matmul(bbmat,v))
call vacuz(ev,vz(1,ivac),vz0(ivac),nmz,delz,t(ik),dt(ik),
+ u(1,ik))
call vacudz(ev,vz(1,ivac),vz0(ivac),nmz,delz,te(ik),
......
......@@ -40,8 +40,7 @@ c***********************************************************************
use m_ylm
use m_intgr, only : intgr3
use m_gaunt, only: gaunt1
use m_cotra
implicit none
c .. scalar arguments ..
......
......@@ -26,7 +26,6 @@ c***************************************************************
use m_constants, only : pimach
use m_intgr, only : intgz0
use m_dotir
implicit none
c .. scalar Arguments..
logical, intent (in) :: l_noco
......@@ -179,7 +178,7 @@ c.. the body of the routine
v(1) = bkpt(1) + kvac1(ik) + qss1
v(2) = bkpt(2) + kvac2(ik) + qss2
v(3) = 0.
ev = evacp - 0.5*dotirp(v,v,bbmat)
ev = evacp - 0.5*dot_product(v,matmul(bbmat,v))
call vacuz(ev,vz(1,ivac),vz0(ivac),nmz,delz,t(ik),dt(ik),
+ u(1,ik))
call vacudz(ev,vz(1,ivac),vz0(ivac),nmz,delz,te(ik),
......@@ -230,7 +229,7 @@ c...now for the k+b point
v(1) = bkpt_b(1) + kvac1_b(ik) + qss1
v(2) = bkpt_b(2) + kvac2_b(ik) + qss2
v(3) = 0.
ev = evacp - 0.5*dotirp(v,v,bbmat)
ev = evacp - 0.5*dot_product(v,matmul(bbmat,v))
call vacuz(ev,vz(1,ivac),vz0(ivac),nmz,delz,t_b(ik),dt_b(ik),
+ u_b(1,ik))
call vacudz(ev,vz(1,ivac),vz0(ivac),nmz,delz,te_b(ik),
......
......@@ -466,10 +466,10 @@ cccccccccccc read in the eigenvalues and vectors cccccc
if (irank.eq.0) l_p0 = .true.
call cdn_read0(
> lmaxd,ntypd,nlod,neigd,jspd,
> irank,isize,jspin,jsp_start,jsp_end,
> l_noco,nrec,66,
< ello,evac,epar,bkpt,wk,n_bands,nrec1,n_size)
> nrec,
> irank,isize,jspin,jspins,
> l_noco,
< ello,evac,epar,bkpt,wk,n_bands,n_size)
allocate ( flo(ntypd,jmtd,2,nlod) )
......
......@@ -118,7 +118,7 @@ c*****************************************************
open (203,file=trim(filename),status='old')
rewind (203)
else
CALL fleur_err("no proj/proj.1/proj.2",calledby
CALL judft_error("no proj/proj.1/proj.2",calledby
+ ="wann_rmat")
endif
read (203,*) num_wann,num_bands
......@@ -130,7 +130,7 @@ c****************************************************************
c get nntot and bk and wb from bkpts file
c****************************************************************
inquire (file='bkpts',exist=l_file)
if (.not.l_file) CALL fleur_err("need bkpts"
if (.not.l_file) CALL jdft_error("need bkpts"
+ ,calledby ="wann_rmat")
open (202,file='bkpts',form='formatted',status='old')
read (202,'(i4)') nntot
......@@ -200,7 +200,7 @@ c****************************************************************
write(6,*)"read in eig-file"
allocate(energy(num_bands,num_kpts))
inquire(file=spin12(jspin)//'.eig',exist=l_umdat)
IF(.NOT.l_umdat) CALL fleur_err
IF(.NOT.l_umdat) CALL judft_error
+ ("Thou shall not hide your eig file",calledby
+ ="wann_hopping")
open(300,file=spin12(jspin)//'.eig',form='formatted')
......
......@@ -22,13 +22,11 @@ c***********************************************************************
use m_constants, only : pimach
use m_matmul , only : matmul3,matmul3r
use m_sphbes
use m_dotir
use m_ylm
use m_od_types, only : od_inp, od_sym
use m_types, only : od_inp, od_sym
use m_intgr, only : intgr3
use m_gaunt, only: gaunt1
use m_cotra
IMPLICIT NONE
integer, intent (in) :: llod
INTEGER, INTENT (IN) :: nntot,ntype,ntypd
......@@ -92,7 +90,7 @@ c***********************************************************************
do ikpt_b=1,nntot
bpt(:)=kdiff(:,ikpt_b)
rk = sqrt(dotirp(bpt,bpt,bbmat))
rk = sqrt(dot_product(bpt,matmul(bbmat,bpt)))
do n=1,ntype
lwn = lmax(n)
c...generate the j_lpp(br) on the radial grid
......@@ -192,7 +190,8 @@ c..gaunt conditions
c********************************************************************
c multiply with gaunt-coefficient (apw-apw)
c********************************************************************
call cotra3(bpt,bkrot,bmat)
bkrot=matmul(bpt,bmat)
!call cotra3(bpt,bkrot,bmat)
call ylm4(lwn,bkrot,ylmpp)
do l = 0,lwn
do m = -l,l
......
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