!--------------------------------------------------------------------------------! Copyright (c) 2016 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.!--------------------------------------------------------------------------------

#ifndef CPP_WANNWRITE(*,*)'At this point a wannierization has to be performed'WRITE(*,*)'but the Wannier90 library is not linked!'CALLjuDFT_error('Wannierization without Wannier90 library',+calledby="wann_postproc")#else

ccallwann_plotw90(i,wann%band_min,wann%band_max,numbands,nwfs,c>l_dulo,l_noco,l_ss,lmaxd,ntypd,c>neigd,natd,nop,nvd,jspd,nbasfcn,llod,nlod,ntype,c>nwdd,omtil,nlo,llo,lapw_l,invtab,mrot,ngopr,neq,lmax,c>invsat,invsatnr,nkpt,taual,rmt,amat,bmat,bbmat,alph,c>beta,qss,sk2,phi2,odi,ods,irank,isize,n3d,nmzxyd,nmzd,c>jmtd,nlhd,nq3,nvac,invs,invs2,film,nlh,jri,ntypsd,c>ntypsy,jspins,nkptd,dx,n2d,rmsh,e1s,e2s,ulo_der,c>ustep,ig,k1d,k2d,k3d,rgphs,slice,kk,nnne,c>z1,nv2d,nmzxy,nmz,delz,ig2,area,tau,zatom,nq2,nop2,c>volint,symor,pos,ef,wann%l_bzsym,irecl)endifl_need_fft=.false.if(wann%l_hopping.or.wann%l_nablars.or.&wann%l_nablapaulirs.or.wann%l_pauli.or.&wann%l_perpmagrs.or.wann%l_socmatrs.or.&wann%l_torquers.or.wann%l_offdiposoprs.or.&wann%l_socspicomrs.or.wann%l_spindisprs.or.&wann%l_anglmomrs.or.wann%l_perturbrs.or.&wann%l_orbcomprs.or.wann%l_rmat)l_need_fft=.true.if(l_need_fft.and.l_p0)thenif(.false.)then!specify r-mesh by its boundarieshopmin_z=-5;hopmax_z=5hopmin_x=0;hopmax_x=0hopmin_y=0;hopmax_y=0rvecnum=(hopmax_z-hopmin_z+1)if(.not.odi%d1.and.film)thenhopmin_x=-5;hopmax_x=5hopmin_y=-5;hopmax_y=5hopmin_z=0;hopmax_z=0elsehopmin_x=-5;hopmax_x=5hopmin_y=-5;hopmax_y=5endifrvecnum=(hopmax_z-hopmin_z+1)rvecnum=rvecnum*(hopmax_y-hopmin_y+1)rvecnum=rvecnum*(hopmax_x-hopmin_x+1)allocate(rvec(3,rvecnum))rvecind=0dor3=hopmin_z,hopmax_zdor2=hopmin_y,hopmax_ydor1=hopmin_x,hopmax_xrvecind=rvecind+1if(rvecind>rvecnum)+CALLjuDFT_error('mismatch in number of kpoints',

>jmtd,nlhd,nq3,nvac,invs,invs2,film,nlh,jri,ntypsd,>ntypsy,jspins,nkptd,dx,n2d,rmsh,e1s,e2s,ulo_der,>ustep,ig,k1d,k2d,k3d,rgphs,slice,kk,nnne,>z1,nv2d,nmzxy,nmz,delz,ig2,area,tau,zatom,nq2,nop2,>volint,symor,pos,ef,wann%l_bzsym,wann%l_proj_plot,irecl)#elseCALLjuDFT_error("not yet tested in this release",calledby+="wann_postproc")#endifendifcallcpu_time(delta3)time_lapw_expand=delta3-delta2callcpu_time(delta2)if(wann%l_plot_lapw.and.l_p0)thenCALLjuDFT_error("not yet tested in this release",calledby+="wann_postproc")ccallwann_plot_from_lapw(c>nv2d,jspins,odi,ods,n3d,nmzxyd,n2d,c>ntypsd,c>ntype,lmaxd,jmtd,natd,nmzd,neq,nq3,nvac,c>nmz,nmzxy,nq2,nop,nop2,volint,film,slice,symor,c>invs,invs2,z1,delz,ngopr,ntypsy,jri,pos,zatom,c>lmax,mrot,tau,rmsh,invtab,amat,bmat,bbmat,nnne,kk,c>nlod,llod,lmd,omtil,nlo,llo)endifcallcpu_time(delta3)time_lapw_plot=delta3-delta2write(6,*)"time_lapw_expand=",time_lapw_expandwrite(6,*)"time_lapw_plot=",time_lapw_plot