LCOV - code coverage report
Current view: top level - wannier - wann_postproc.F90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 81 0.0 %
Date: 2019-09-08 04:53:50 Functions: 0 1 0.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             : MODULE m_wann_postproc
       8             : CONTAINS 
       9           0 :   SUBROUTINE wann_postproc(&
      10             :        DIMENSION,stars,vacuum,atoms,sphhar,input,kpts,sym,mpi,&
      11             :        lapw,oneD,noco,cell,vTot,enpara,sliceplot,eig_id,l_real,&
      12             :        wann, fullnkpts, l_proj,ef,l_sgwf,fullnqpts)
      13             :     !     <          fermi_weights)
      14             : 
      15             :     !***********************************************
      16             :     !     Collection of those subroutines which may
      17             :     !     be called after the Wannier functions have
      18             :     !     been computed.
      19             :     !     Frank Freimuth
      20             :     !***********************************************
      21             :     USE m_types
      22             :     USE m_wann_dipole
      23             :     USE m_wann_dipole2
      24             :     USE m_wann_wannierize
      25             :     USE m_wann_hopping
      26             :     USE m_wann_plot_um_dat
      27             :     USE m_wannier_to_lapw
      28             :     USE m_wann_plot_from_lapw
      29             :     USE m_wann_nabla_rs
      30             :     USE m_wann_pauli_rs
      31             :     USE m_wann_nabla_pauli_rs
      32             :     USE m_wann_socmat_rs
      33             :     USE m_wann_perpmag_rs
      34             :     USE m_types
      35             :     USE m_wann_wigner_seitz
      36             :     USE m_wann_get_mp
      37             :     USE m_wann_get_kpts
      38             :     USE m_wann_fft4
      39             :     USE m_wann_fft5
      40             :     USE m_wann_rmat
      41             :     USE m_wann_nocoplot
      42             : #ifdef CPP_TOPO
      43             :     USE m_wann_torque_rs
      44             :     USE m_wann_offdiposop_rs
      45             :     USE m_wann_fft6
      46             :     USE m_wann_fft3
      47             :     USE m_wann_nedrho
      48             : #endif
      49             : 
      50             : #ifdef DCPP_WANN_EXT
      51             :     USE m_wannier_to_lapw_kpts
      52             :     USE m_wannier_lapw_gfleur
      53             : #endif
      54             :     IMPLICIT NONE
      55             : 
      56             :     TYPE(t_dimension),INTENT(IN) :: DIMENSION
      57             :     TYPE(t_stars),INTENT(IN)     :: stars
      58             :     TYPE(t_vacuum),INTENT(IN)    :: vacuum
      59             :     TYPE(t_atoms),INTENT(IN)     :: atoms
      60             :     TYPE(t_sphhar),INTENT(IN)    :: sphhar
      61             :     TYPE(t_input),INTENT(IN)     :: input
      62             :     TYPE(t_kpts),INTENT(IN)      :: kpts
      63             :     TYPE(t_sym),INTENT(IN)       :: sym
      64             :     TYPE(t_mpi),INTENT(IN)       :: mpi
      65             :     TYPE(t_lapw),INTENT(IN)      :: lapw
      66             :     TYPE(t_oneD),INTENT(IN)      :: oneD
      67             :     TYPE(t_noco),INTENT(IN)      :: noco
      68             :     TYPE(t_cell),INTENT(IN)      :: cell
      69             :     TYPE(t_potden),INTENT(IN)    :: vTot
      70             :     TYPE(t_enpara),INTENT(IN)    :: enpara
      71             :     type(t_sliceplot),INTENT(IN) :: sliceplot
      72             : 
      73             :     TYPE(t_wann), INTENT(in) :: wann
      74             :     LOGICAL,      INTENT(in) :: l_real
      75             :     INTEGER,      INTENT(in) :: eig_id
      76             :     INTEGER,      INTENT(in) :: fullnkpts,fullnqpts
      77             :     LOGICAL,      INTENT(in) :: l_proj
      78             :     REAL,    INTENT (in) :: ef
      79             :     LOGICAL, INTENT (in) :: l_sgwf
      80             :     !      real,intent(inout)   :: fermi_weights(:,:,:) !(dimension%neigd,nkptd,jspd)
      81             : 
      82             :     CHARACTER(len=12) :: fending
      83             :     INTEGER :: i,nkpts,ikpt,nkqpts,iqpt
      84             :     REAL    :: delta3,time_lapw_expand,delta2,time_lapw_plot
      85             :     LOGICAL :: l_need_fft,l_file
      86             :     INTEGER :: hopmin_z,hopmax_z
      87             :     INTEGER :: hopmin_y,hopmax_y
      88             :     INTEGER :: hopmin_x,hopmax_x
      89             :     INTEGER             :: ii
      90             :     INTEGER             :: rvecnum,rvecind,num(3),int_dummy
      91           0 :     INTEGER,ALLOCATABLE :: rvec(:,:),ndegen(:)
      92             :     REAL                :: scale
      93             :     REAL,ALLOCATABLE    :: kpoints(:,:)!(3,fullnkpts)
      94             :     INTEGER             :: r1,r2,r3,spinspin,num_angl
      95             :     LOGICAL             :: l_nocosoc
      96             : 
      97           0 :     ALLOCATE(kpoints(3,fullnkpts))
      98           0 :     l_nocosoc=.FALSE.
      99           0 :     IF(noco%l_soc)l_nocosoc=.TRUE.
     100           0 :     IF(noco%l_noco)l_nocosoc=.TRUE.
     101             : 
     102             :     !***************************************************
     103             :     !     Read in the kpoints from w90kpts or kpts.
     104             :     !***************************************************      
     105             :     CALL wann_get_kpts(input,kpts,&
     106             :          wann%l_bzsym,input%film,oneD%odi%d1,.FALSE.,&
     107           0 :          nkpts,kpoints)
     108           0 :     IF (nkpts /= fullnkpts)&
     109             :          CALL juDFT_error ('mismatch in number of kpoints',&
     110           0 :          calledby="wann_postproc")
     111             : 
     112             :     CALL wann_get_kpts(input,kpts,&
     113             :          wann%l_bzsym,input%film,oneD%odi%d1,.TRUE.,&
     114           0 :          nkpts,kpoints)
     115             :     !*********************************************************
     116             :     !     Find out the structure of k-point set.
     117             :     !*********************************************************
     118             :     CALL wann_get_mp(&
     119             :          fullnkpts,kpoints,&
     120           0 :          num)
     121             : 
     122           0 :     IF(wann%l_wannierize.AND.mpi%irank==0)THEN
     123             : #ifndef CPP_WANN
     124           0 :        WRITE(*,*) 'At this point a wannierization has to be performed'
     125           0 :        WRITE(*,*) 'but the Wannier90 library is not linked!'
     126             :        CALL juDFT_error ('Wannierization without Wannier90 library',&
     127           0 :             calledby="wann_postproc")
     128             : #else
     129             :        CALL wann_wannierize(&
     130             :             input%film,wann%l_bzsym,input%jspins,&
     131             :             atoms%nat,atoms%pos,cell%amat,cell%bmat,atoms%ntype,atoms%neq,atoms%zatom)
     132             : #endif
     133             :     ENDIF
     134             : 
     135           0 :     IF(wann%l_dipole2.AND.mpi%irank==0)THEN
     136             :        CALL wann_dipole2(&
     137             :             input%jspins,atoms%pos,cell%omtil,atoms%nat,&
     138           0 :             (noco%l_soc.OR.noco%l_noco))
     139             :     ENDIF
     140             : 
     141           0 :     IF(wann%l_dipole.AND.mpi%irank==0)THEN
     142             :        CALL wann_dipole(&
     143             :             input%jspins,cell%omtil,atoms%nat,atoms%pos,cell%amat,&
     144           0 :             atoms%ntype,atoms%neq,atoms%zatom)
     145             :     ENDIF
     146             : 
     147             : #ifdef CPP_TOPO
     148             :     IF(wann%l_nedrho.AND.mpi%irank==0)THEN
     149             :        CALL wann_nedrho(&
     150             :             fullnkpts,cell%area,ef,&
     151             :             fermi_weights)
     152             :     ENDIF
     153             : #endif
     154             : 
     155           0 :     IF(wann%l_byenergy) i=3
     156           0 :     IF(wann%l_bynumber) i=2
     157           0 :     IF(wann%l_byindex)  i=1
     158             : 
     159           0 :     IF(wann%l_plotw90)THEN
     160             :        CALL juDFT_error("not in this version",&
     161           0 :             calledby ="wann_postproc")
     162             : 
     163             :        !         call wann_plotw90(i,wann%band_min,wann%band_max,numbands,nwfs,
     164             :        !     >   atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,atoms%ntype,
     165             :        !     >      dimension%neigd,atoms%nat,sym%nop,dimension%nvd,jspd,dimension%nbasfcn,atoms%llod,atoms%nlod,atoms%ntype,
     166             :        !     >      nwdd,cell%omtil,atoms%nlo,atoms%llo,atoms%lapw_l,sym%invtab,sym%mrot,atoms%ngopr,atoms%neq,atoms%lmax,
     167             :        !     >      atoms%invsat,atoms%invsatnr,kpts%nkpt,atoms%taual,atoms%rmt,cell%amat,cell%bmat,cell%bbmat,noco%alph,
     168             :        !     >      noco%beta,noco%qss,stars%sk2,stars%phi2,oneD%odi,oneD%ods,mpi%irank,mpi%isize,stars%ng3,vacuum%nmzxyd,vacuum%nmzd,
     169             :        !     >      size(atoms%rmsh,1),sphhar%nlhd,stars%ng3,vacuum%nvac,sym%invs,sym%invs2,input%film,sphhar%nlh,atoms%jri,sphhar%ntypsd,
     170             :        !     >      atoms%ntypsy,input%jspins,kpts%nkpt,atoms%dx,stars%ng2,atoms%rmsh,sliceplot%e1s,sliceplot%e2s,atoms%ulo_der,
     171             :        !     >      stars%ustep,stars%ig,stars%mx1,stars%mx2,stars%mx3,stars%rgphs,sliceplot%slice,sliceplot%kk,sliceplot%nnne,
     172             :        !     >      cell%z1,dimension%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,
     173             :        !     >      cell%volint,sym%symor,atoms%pos,ef,wann%l_bzsym,irecl)
     174             : 
     175             :     ENDIF
     176             : 
     177           0 :     l_need_fft=.FALSE.
     178             :     IF(wann%l_hopping.OR.wann%l_nablars.OR.&
     179             :          wann%l_nablapaulirs.OR.wann%l_pauli.OR.&
     180             :          wann%l_perpmagrs.OR.wann%l_socmatrs.OR.&
     181             :          wann%l_torquers.OR.wann%l_offdiposoprs.OR.&
     182             :          wann%l_socspicomrs.OR.wann%l_spindisprs.OR.&
     183             :          wann%l_anglmomrs .OR.wann%l_perturbrs.OR.&
     184           0 :          wann%l_orbcomprs.OR.wann%l_rmat)l_need_fft=.TRUE.
     185             : 
     186           0 :     IF(l_need_fft.AND.mpi%irank==0)THEN
     187             : 
     188             :        IF(.FALSE.)THEN !specify r-mesh by its boundaries
     189             :           hopmin_z=-5;hopmax_z=5
     190             :           hopmin_x=0;hopmax_x=0
     191             :           hopmin_y=0;hopmax_y=0
     192             :           rvecnum=(hopmax_z-hopmin_z+1)
     193             :           IF(.NOT.oneD%odi%d1.AND.input%film)THEN
     194             :              hopmin_x=-5;hopmax_x=5
     195             :              hopmin_y=-5;hopmax_y=5
     196             :              hopmin_z=0;     hopmax_z=0
     197             :           ELSE
     198             :              hopmin_x=-5;hopmax_x=5
     199             :              hopmin_y=-5;hopmax_y=5
     200             :           ENDIF
     201             :           rvecnum=        (hopmax_z-hopmin_z+1)
     202             :           rvecnum=rvecnum*(hopmax_y-hopmin_y+1)
     203             :           rvecnum=rvecnum*(hopmax_x-hopmin_x+1)
     204             : 
     205             :           ALLOCATE(rvec(3,rvecnum))
     206             :           rvecind=0
     207             :           DO r3=hopmin_z,hopmax_z
     208             :              DO r2=hopmin_y,hopmax_y
     209             :                 DO r1=hopmin_x,hopmax_x
     210             :                    rvecind=rvecind+1
     211             :                    IF (rvecind > rvecnum)&
     212             :                         CALL juDFT_error ('mismatch in number of kpoints',&
     213             :                         calledby="wann_postproc")
     214             : 
     215             :                    rvec(1,rvecind)=r1
     216             :                    rvec(2,rvecind)=r2
     217             :                    rvec(3,rvecind)=r3
     218             :                 ENDDO !r1
     219             :              ENDDO !r2
     220             :           ENDDO !r3
     221             :        ELSE !determine optimal r-mesh
     222             :           CALL wann_wigner_seitz(&
     223             :                .TRUE.,num,cell%amat,0,&
     224           0 :                rvecnum,rvec,ndegen)
     225           0 :           ALLOCATE(rvec(3,rvecnum))
     226           0 :           ALLOCATE(ndegen(rvecnum))
     227             :           CALL wann_wigner_seitz(&
     228             :                .FALSE.,num,cell%amat,rvecnum,&
     229           0 :                int_dummy,rvec,ndegen)
     230             : 
     231           0 :           OPEN(333,file='wig_vectors',recl=1000)
     232           0 :           DO ii=1,rvecnum
     233           0 :              WRITE(333,*)ii,rvec(1,ii),rvec(2,ii),rvec(3,ii),&
     234           0 :                   ndegen(ii)
     235             :           ENDDO
     236           0 :           CLOSE(333)
     237             : 
     238             :        ENDIF
     239             : 
     240             :     ENDIF
     241             : 
     242           0 :     IF(wann%l_hopping.AND.mpi%irank==0) THEN
     243             :        CALL wann_hopping(&
     244             :             rvecnum,rvec,kpoints,&
     245             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     246             :             l_nocosoc,wann%band_min,wann%band_max,&
     247             :             DIMENSION%neigd,wann%l_socmmn0,wann%l_ndegen,ndegen,&
     248           0 :             wann%wan90version,wann%l_unformatted)
     249             :     ENDIF
     250             : 
     251           0 :     IF(wann%l_nablars.AND.mpi%irank==0) THEN
     252             :        CALL wann_nabla_rs(&
     253             :             rvecnum,rvec,kpoints,&
     254             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     255             :             noco%l_soc,wann%band_min,wann%band_max,&
     256             :             DIMENSION%neigd,.FALSE.,&
     257           0 :             wann%wan90version)
     258             :     ENDIF
     259             : 
     260           0 :     IF(wann%l_orbcomprs.AND.mpi%irank==0)THEN
     261           0 :        num_angl=9
     262           0 :        IF(wann%l_oc_f)num_angl=16
     263             :        CALL wann_fft5(&
     264             :             .FALSE.,&
     265             :             num_angl,wann%oc_num_orbs,&
     266             :             'WF1.orbcomp','orbcomp.1',&
     267             :             rvecnum,rvec,kpoints,&
     268             :             1,fullnkpts,input%film,&
     269             :             noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     270           0 :             wann%wan90version)
     271           0 :        IF( input%jspins.EQ.2 )THEN
     272           0 :           spinspin=2
     273           0 :           IF(noco%l_soc.OR.noco%l_noco)spinspin=1
     274             :           CALL wann_fft5(&
     275             :                .FALSE.,&
     276             :                num_angl,wann%oc_num_orbs,&
     277             :                'WF2.orbcomp','orbcomp.2',&
     278             :                rvecnum,rvec,kpoints,&
     279             :                spinspin,fullnkpts,input%film,&
     280             :                noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     281           0 :                wann%wan90version)
     282             :        ENDIF
     283             :     ENDIF
     284             : 
     285           0 :     IF(wann%l_rmat)THEN
     286             :        CALL wann_rmat(&
     287             :             cell%bmat,cell%amat,&
     288             :             rvecnum,rvec,kpoints,&
     289             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     290             :             l_nocosoc,wann%band_min,wann%band_max,&
     291           0 :             DIMENSION%neigd,.FALSE.,wann%wan90version)
     292             :     ENDIF
     293             : 
     294             : 
     295           0 :     IF(wann%l_anglmomrs.AND.mpi%irank==0)THEN
     296             :        CALL wann_fft4(&
     297             :             'WF1.anglmom',&
     298             :             'anglmomrs.1',.FALSE.,&
     299             :             rvecnum,rvec,kpoints,&
     300             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     301             :             noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     302           0 :             .FALSE.,wann%wan90version)
     303             :     ENDIF
     304             : 
     305             : #ifdef CPP_TOPO
     306             :     IF(wann%l_offdiposoprs.AND.mpi%irank==0)THEN
     307             :        CALL wann_offdiposop_rs(&
     308             :             rvecnum,rvec,kpoints,&
     309             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     310             :             noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     311             :             .FALSE.)
     312             :     ENDIF
     313             : 
     314             :     IF(wann%l_spindisprs.AND.mpi%irank==0)THEN
     315             :        CALL wann_fft5(&
     316             :             rvecnum,rvec,kpoints,&
     317             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     318             :             noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     319             :             .FALSE.)
     320             :     ENDIF
     321             : 
     322             :     IF(wann%l_perturbrs.AND.mpi%irank==0)THEN
     323             :        CALL wann_fft3(&
     324             :             'WF1.perturb'  ,'perturbrs.1'  ,.FALSE.,&
     325             :             rvecnum,rvec,kpoints,&
     326             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     327             :             noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     328             :             .FALSE.)
     329             :     ENDIF
     330             : 
     331             :     IF(wann%l_socspicomrs.AND.mpi%irank==0)THEN
     332             :        IF(noco%l_soc)THEN
     333             :           CALL wann_fft4(&
     334             :                'WF1.socspicom','socspicomrs.1',.TRUE.,&
     335             :                rvecnum,rvec,kpoints,&
     336             :                input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     337             :                noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     338             :                .FALSE.)
     339             :        ELSE
     340             :           CALL wann_fft6(&
     341             :                rvecnum,rvec,kpoints,&
     342             :                input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     343             :                noco%l_soc,wann%band_min,wann%band_max,DIMENSION%neigd,&
     344             :                .FALSE.)
     345             :        ENDIF
     346             :     ENDIF
     347             : 
     348             : 
     349             : 
     350             :     IF(wann%l_torquers.AND.mpi%irank==0) THEN
     351             :        CALL wann_torque_rs(&
     352             :             atoms%ntype,atoms%neq,rvecnum,rvec,kpoints,&
     353             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     354             :             noco%l_soc,wann%band_min,wann%band_max,&
     355             :             DIMENSION%neigd,.FALSE.)
     356             :     ENDIF
     357             : #endif
     358           0 :     IF (wann%l_nablapaulirs.AND.mpi%irank==0)THEN
     359             :        CALL wann_nabla_pauli_rs(&
     360             :             rvecnum,rvec,kpoints,&
     361             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     362             :             noco%l_soc,wann%band_min,wann%band_max,&
     363           0 :             DIMENSION%neigd,.FALSE.,wann%wan90version)
     364             :     ENDIF
     365             : 
     366           0 :     IF (wann%l_pauli.AND.mpi%irank==0)THEN
     367             :        CALL wann_pauli_rs(&
     368             :             rvecnum,rvec,kpoints,&
     369             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     370             :             l_nocosoc,wann%band_min,wann%band_max,&
     371             :             DIMENSION%neigd,.FALSE.,wann%l_ndegen,ndegen,&
     372           0 :             wann%wan90version,wann%l_unformatted)
     373             :     ENDIF
     374             : 
     375           0 :     IF (wann%l_perpmagrs.AND.mpi%irank==0)THEN
     376             :        CALL wann_perpmag_rs(&
     377             :             rvecnum,rvec,kpoints,&
     378             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     379             :             noco%l_soc,wann%band_min,wann%band_max,&
     380             :             DIMENSION%neigd,.FALSE.,wann%l_ndegen,ndegen,wann%wan90version,&
     381           0 :             wann%l_unformatted)
     382             :     ENDIF
     383             : 
     384           0 :     IF (wann%l_socmatrs.AND.mpi%irank==0)THEN
     385             :        CALL wann_socmat_rs(&
     386             :             rvecnum,rvec,kpoints,&
     387             :             input%jspins,fullnkpts,wann%l_bzsym,input%film,oneD%odi%d1,&
     388             :             noco%l_soc,wann%band_min,wann%band_max,&
     389           0 :             DIMENSION%neigd,.FALSE.,wann%wan90version)
     390             :     ENDIF
     391             : 
     392           0 :     IF(wann%l_plot_umdat)THEN
     393             :        CALL wann_plot_um_dat(&
     394             :             DIMENSION,stars,vacuum,atoms,sphhar,input,sym,mpi,&
     395             :             lapw,oneD,noco,cell,vTot,enpara,eig_id,l_real,&
     396             :             mpi%mpi_comm,i,wann%band_min,wann%band_max,noco%l_soc,&
     397             :             atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,atoms%ntype,&
     398             :             DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,input%jspins,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,atoms%ntype,&
     399             :             cell%omtil,atoms%nlo,atoms%llo,atoms%lapw_l,sym%invtab,sym%mrot,atoms%ngopr,atoms%neq,atoms%lmax,&
     400             :             atoms%invsat,sym%invsatnr,kpts%nkpt,atoms%taual,atoms%rmt,cell%amat,cell%bmat,cell%bbmat,noco%alph,&
     401             :             noco%beta,noco%qss,stars%sk2,stars%phi2,oneD%odi,oneD%ods,mpi%irank,mpi%isize,stars%ng3,vacuum%nmzxyd,vacuum%nmzd,&
     402             :             SIZE(atoms%rmsh,1),sphhar%nlhd,stars%ng3,vacuum%nvac,sym%invs,sym%invs2,input%film,sphhar%nlh,atoms%jri,sphhar%ntypsd,&
     403             :             atoms%ntypsy,input%jspins,kpts%nkpt,atoms%dx,stars%ng2,atoms%rmsh,sliceplot%e1s,sliceplot%e2s,atoms%ulo_der,&
     404             :             stars%ustep,stars%ig,stars%mx1,stars%mx2,stars%mx3,stars%rgphs,sliceplot%slice,sliceplot%kk,sliceplot%nnne,&
     405             :             cell%z1,DIMENSION%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,&
     406             :             cell%volint,sym%symor,atoms%pos,ef,wann%l_bzsym,wann%l_proj_plot,&
     407           0 :             wann%wan90version)
     408             :     ENDIF
     409             : 
     410             : 
     411           0 :     CALL CPU_TIME(delta2)
     412           0 :     IF(wann%l_lapw.AND.mpi%irank==0)THEN
     413             :        CALL wannier_to_lapw(&
     414             :             mpi%mpi_comm,eig_id,l_real,&
     415             :             input,lapw,oneD,noco,sym,cell,atoms,stars,vacuum,sphhar,&
     416             :             vTot,&
     417             :             noco%l_soc,wann%unigrid,i,wann%band_min,wann%band_max,&
     418             :             atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,atoms%ntype,&
     419             :             DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,input%jspins,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,atoms%ntype,&
     420             :             cell%omtil,atoms%nlo,atoms%llo,atoms%lapw_l,sym%invtab,sym%mrot,atoms%ngopr,atoms%neq,atoms%lmax,&
     421             :             atoms%invsat,sym%invsatnr,kpts%nkpt,atoms%taual,atoms%rmt,cell%amat,cell%bmat,cell%bbmat,noco%alph,&
     422             :             noco%beta,noco%qss,stars%sk2,stars%phi2,oneD%odi,oneD%ods,mpi%irank,mpi%isize,stars%ng3,vacuum%nmzxyd,vacuum%nmzd,&
     423             :             SIZE(atoms%rmsh,1),sphhar%nlhd,stars%ng3,vacuum%nvac,sym%invs,sym%invs2,input%film,sphhar%nlh,atoms%jri,sphhar%ntypsd,&
     424             :             atoms%ntypsy,input%jspins,kpts%nkpt,atoms%dx,stars%ng2,atoms%rmsh,sliceplot%e1s,sliceplot%e2s,atoms%ulo_der,&
     425             :             stars%ustep,stars%ig,stars%mx1,stars%mx2,stars%mx3,stars%rgphs,sliceplot%slice,sliceplot%kk,sliceplot%nnne,&
     426             :             cell%z1,DIMENSION%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,&
     427             :             cell%volint,sym%symor,atoms%pos,ef,wann%l_bzsym,wann%l_proj_plot,&
     428           0 :             wann%wan90version)
     429             :     ENDIF
     430             : 
     431           0 :     IF(wann%l_lapw_kpts)THEN
     432             : #ifdef DCPP_WANN_EXT
     433             :        CALL wannier_to_lapw_kpts(&
     434             :             unigrid,i,wann%band_min,wann%band_max,&
     435             :             atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,atoms%ntype,&
     436             :             DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,input%jspins,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,atoms%ntype,&
     437             :             nwdd,cell%omtil,atoms%nlo,atoms%llo,atoms%lapw_l,sym%invtab,sym%mrot,atoms%ngopr,atoms%neq,atoms%lmax,&
     438             :             atoms%invsat,sym%invsatnr,kpts%nkpt,atoms%taual,atoms%rmt,cell%amat,cell%bmat,cell%bbmat,noco%alph,&
     439             :             noco%beta,noco%qss,stars%sk2,stars%phi2,oneD%odi,oneD%ods,mpi%irank,mpi%isize,stars%ng3,vacuum%nmzxyd,vacuum%nmzd,&
     440             :             SIZE(atoms%rmsh,1),sphhar%nlhd,stars%ng3,vacuum%nvac,sym%invs,sym%invs2,input%film,sphhar%nlh,atoms%jri,sphhar%ntypsd,&
     441             :             atoms%ntypsy,input%jspins,kpts%nkpt,atoms%dx,stars%ng2,atoms%rmsh,sliceplot%e1s,sliceplot%e2s,atoms%ulo_der,&
     442             :             stars%ustep,stars%ig,stars%mx1,stars%mx2,stars%mx3,stars%rgphs,sliceplot%slice,sliceplot%kk,sliceplot%nnne,&
     443             :             cell%z1,DIMENSION%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,&
     444             :             cell%volint,sym%symor,atoms%pos,ef,wann%l_bzsym,wann%l_proj_plot,irecl)
     445             : #else
     446             :        CALL juDFT_error("not yet tested in this release",calledby&
     447           0 :             ="wann_postproc")
     448             : #endif
     449             :     ENDIF
     450           0 :     IF(wann%l_lapw_gfleur)THEN
     451             : #ifdef DCPP_WANN_EXT
     452             :        CALL wannier_lapw_gfleur(&
     453             :             gfthick,gfcut,i,wann%band_min,wann%band_max,&
     454             :             atoms%l_dulo,noco%l_noco,noco%l_ss,atoms%lmaxd,atoms%ntype,&
     455             :             DIMENSION%neigd,atoms%nat,sym%nop,DIMENSION%nvd,input%jspins,DIMENSION%nbasfcn,atoms%llod,atoms%nlod,atoms%ntype,&
     456             :             nwdd,cell%omtil,atoms%nlo,atoms%llo,atoms%lapw_l,sym%invtab,sym%mrot,atoms%ngopr,atoms%neq,atoms%lmax,&
     457             :             atoms%invsat,sym%invsatnr,kpts%nkpt,atoms%taual,atoms%rmt,cell%amat,cell%bmat,cell%bbmat,noco%alph,&
     458             :             noco%beta,noco%qss,stars%sk2,stars%phi2,oneD%odi,oneD%ods,mpi%irank,mpi%isize,stars%ng3,vacuum%nmzxyd,vacuum%nmzd,&
     459             :             SIZE(atoms%rmsh,1),sphhar%nlhd,stars%ng3,vacuum%nvac,sym%invs,sym%invs2,input%film,sphhar%nlh,atoms%jri,sphhar%ntypsd,&
     460             :             atoms%ntypsy,input%jspins,kpts%nkpt,atoms%dx,stars%ng2,atoms%rmsh,sliceplot%e1s,sliceplot%e2s,atoms%ulo_der,&
     461             :             stars%ustep,stars%ig,stars%mx1,stars%mx2,stars%mx3,stars%rgphs,sliceplot%slice,sliceplot%kk,sliceplot%nnne,&
     462             :             cell%z1,DIMENSION%nv2d,vacuum%nmzxy,vacuum%nmz,vacuum%delz,stars%ig2,cell%area,sym%tau,atoms%zatom,stars%ng2,sym%nop2,&
     463             :             cell%volint,sym%symor,atoms%pos,ef,wann%l_bzsym,wann%l_proj_plot,irecl)
     464             : #else
     465             :        CALL juDFT_error("not yet tested in this release",calledby&
     466           0 :             ="wann_postproc")
     467             : #endif
     468             :     ENDIF
     469             : 
     470           0 :     CALL CPU_TIME(delta3)
     471           0 :     time_lapw_expand=delta3-delta2
     472             : 
     473           0 :     CALL CPU_TIME(delta2)
     474           0 :     IF(wann%l_plot_lapw.AND.mpi%irank==0)THEN
     475             :        CALL juDFT_error("not yet tested in this release",calledby&
     476           0 :             ="wann_postproc")
     477             :        !         call wann_plot_from_lapw(
     478             :        !     >     dimension%nv2d,input%jspins,oneD%odi,oneD%ods,stars%ng3,vacuum%nmzxyd,stars%ng2,
     479             :        !     >     sphhar%ntypsd,
     480             :        !     >     atoms%ntype,atoms%lmaxd,size(atoms%rmsh,1),atoms%nat,vacuum%nmzd,atoms%neq,stars%ng3,vacuum%nvac,
     481             :        !     >     vacuum%nmz,vacuum%nmzxy,stars%ng2,sym%nop,sym%nop2,cell%volint,input%film,sliceplot%slice,sym%symor,
     482             :        !     >     sym%invs,sym%invs2,cell%z1,vacuum%delz,atoms%ngopr,atoms%ntypsy,atoms%jri,atoms%pos,atoms%zatom,
     483             :        !     >     atoms%lmax,sym%mrot,sym%tau,atoms%rmsh,sym%invtab,cell%amat,cell%bmat,cell%bbmat,sliceplot%nnne,sliceplot%kk,
     484             :        !     >     atoms%nlod,atoms%llod,lmd,cell%omtil,atoms%nlo,atoms%llo)
     485             :     ENDIF
     486           0 :     CALL CPU_TIME(delta3)
     487           0 :     time_lapw_plot=delta3-delta2
     488             : 
     489           0 :     WRITE(6,*)"time_lapw_expand=",time_lapw_expand
     490           0 :     WRITE(6,*)"time_lapw_plot=",time_lapw_plot
     491             : 
     492           0 :     IF(wann%l_finishnocoplot.AND.mpi%irank==0) THEN
     493             :        !         write(*,*)'doing the UNK mixing'
     494             :        !         write(*,*)'noco%alph',noco%alph
     495             :        !         write(*,*)'noco%beta',noco%beta
     496             :        !         nkqpts=fullnkpts
     497             :        !         if(l_sgwf) nkqpts=fullnkpts*fullnqpts 
     498             :        CALL wann_nocoplot(atoms,sliceplot%slice,sliceplot%nnne,&!nslibd&
     499             :             cell%amat,cell%bmat,fullnkpts,oneD%odi,input%film,&
     500             :             atoms%nat,atoms%ntype,SIZE(atoms%rmsh,1),atoms%ntype,atoms%neq,atoms%pos,&
     501             :             atoms%jri,atoms%rmsh,noco%alph,noco%beta,fullnqpts,noco%qss,&
     502           0 :             cell%z1,atoms%zatom)
     503             :     ENDIF
     504             : 
     505           0 :   END SUBROUTINE wann_postproc
     506             : END MODULE m_wann_postproc

Generated by: LCOV version 1.13