wann_lapw_int_plot.f 2.37 KB
Newer Older
1 2 3 4 5 6
!--------------------------------------------------------------------------------
! 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.
!--------------------------------------------------------------------------------

7 8 9 10 11 12 13 14 15 16
      MODULE m_wann_lapw_int_plot

c***************************************************************
c         plot wannierfunction in interstitial
c         Frank Freimuth, November 2006
c***************************************************************

      CONTAINS
      SUBROUTINE wann_lapw_int_plot(point,bmat,unigrid,wannint,
     <                              xdnout)
17
      use m_constants
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
      implicit none
      real,intent(in)::point(3)
      real,intent(in)::bmat(3,3)
      integer,intent(in)::unigrid(4)
      complex,intent(in)::wannint(-unigrid(4):unigrid(4),
     ,                            -unigrid(4):unigrid(4),
     ,                            -unigrid(4):unigrid(4))
      complex,intent(out)::xdnout

      real xiiu(3),tpi,arg
      complex ci,factor1,factor2,factor3
      complex factor1p,factor2p,factor3p,factor
      integer pw1,pw2,pw3

      tpi=2*pimach()
33
      xiiu=matmul(bmat,point)/tpi_const
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79



      xdnout=cmplx(0.0,0.0)

      if(.false.)then

      arg=(tpi*xiiu(1))/unigrid(1)
      factor1=cmplx(cos(arg),sin(arg))
      arg=(tpi*xiiu(2))/unigrid(2)
      factor2=cmplx(cos(arg),sin(arg))
      arg=(tpi*xiiu(3))/unigrid(3)
      factor3=cmplx(cos(arg),sin(arg))

      do pw3=-unigrid(4),unigrid(4)
       factor3p=(factor3)**pw3
       do pw2=-unigrid(4),unigrid(4)
        factor2p=(factor2)**pw2
        do pw1=-unigrid(4),unigrid(4)
         factor1p=(factor1)**pw1

          factor=factor1p*factor2p*factor3p
          xdnout=xdnout+factor*wannint(pw1,pw2,pw3)

        enddo
       enddo
      enddo 

      else

      do pw3=-unigrid(4),unigrid(4)
       do pw2=-unigrid(4),unigrid(4)
        do pw1=-unigrid(4),unigrid(4)
          arg=tpi*(pw1*xiiu(1)/unigrid(1)+pw2*xiiu(2)/unigrid(2)+
     +                  pw3*xiiu(3)/unigrid(3)) 
          factor=cmplx(cos(arg),sin(arg))
          xdnout=xdnout+factor*wannint(pw1,pw2,pw3)

        enddo
       enddo
      enddo 


      endif   
      END SUBROUTINE wann_lapw_int_plot
      END MODULE m_wann_lapw_int_plot