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

          Line data    Source code
       1             : MODULE m_orbcomp
       2             : CONTAINS
       3           0 :   SUBROUTINE orb_comp(jspin,ikpt,nobd,atoms,ne,usdus,eigVecCoeffs,orbcomp)
       4             :     !***********************************************************************
       5             :     !     Calculates an orbital composition of eigen states
       6             :     !     
       7             :     !                                   Yury  Koroteev  2003-12-24 
       8             :     !***********************************************************************
       9             :     !                     ABBREVIATIONS
      10             :     !          dimentions
      11             :     ! nobd                  : in, number of considered bands   
      12             :     ! lmd                   : in, (lmaxd + 1)**2
      13             :     ! natd                  : in, number of atoms in a film
      14             :     ! lmaxd                 : in, max of l    
      15             :     ! ntypd                 : in, number of mt-sphere types
      16             :     ! nlod                  : in, number of local orbitals in mt-sphere types
      17             :     ! llod                  : in, l max for local orbitals in mt-sphere types
      18             :     ! ---------------------------------------------------------------------- 
      19             :     ! neq(ntypd)            : in, number of mt-spheres of the same type
      20             :     ! acof(nobd,0:lmd,natd) : in, a,b  coefficients of linearized 
      21             :     ! bcof(nobd,0:lmd,natd) : in, mt-wavefunctions for each band and atom
      22             :     ! ccof(-llod:llod,nobd, :
      23             :     !     :      nobd,natd) : in, c coefficients for local orbitals
      24             :     ! ddn(16,ntypd)         : in,   
      25             :     ! uulon(16,ntypd)       : in,   
      26             :     ! dulon(16,ntypd)       : in,  
      27             :     ! uloulopn(16,ntypd)    : in,   
      28             :     ! nlo(ntypd)            : in, 
      29             :     ! llo(nlod,ntypd)       : in,
      30             :     !-----------------------------------------------------------------------
      31             :     ! comp(nobd,16,natd)    : out, an orbital composition of  states
      32             :     ! qmtp(nobd,natd)       : out, the portion of the state in mt-sphere
      33             :     !-----------------------------------------------------------------------
      34             :     USE m_types
      35             :     IMPLICIT NONE
      36             :     TYPE(t_atoms),INTENT(IN)        :: atoms
      37             :     TYPE(t_usdus),INTENT(IN)        :: usdus
      38             :     TYPE(t_eigVecCoeffs),INTENT(IN) :: eigVecCoeffs
      39             :     TYPE(t_orbcomp),INTENT(INOUT)   :: orbcomp
      40             : 
      41             :     !   ..Scalar Argument
      42             :     INTEGER, INTENT  (IN) :: nobd,ne,jspin,ikpt
      43             : 
      44             :     !   ..Local Scalars 
      45             :     INTEGER  n,mt,ityp,imt,lm,lo
      46             :     INTEGER  l,lme,nate,lmaxe,jspe,nobc,nei
      47             :     REAL     sum,cf
      48             :     REAL     ddn0,ddn1,ddn2,ddn3,ddn12,ddn22,ddn32
      49             :     COMPLEX  ca00,ca01,ca02,ca03,ca04,ca05,ca06,ca07,ca08,ca09
      50             :     COMPLEX  ca10,ca11,ca12,ca13,ca14,ca15,ca16,ca17,ca18,ca19
      51             :     COMPLEX  ca20,ca21,ca22
      52             :     COMPLEX  cb00,cb01,cb02,cb03,cb04,cb05,cb06,cb07,cb08,cb09
      53             :     COMPLEX  cb10,cb11,cb12,cb13,cb14,cb15,cb16,cb17,cb18,cb19
      54             :     COMPLEX  cb20,cb21,cb22
      55             :     COMPLEX  cc00,cc01,cc02,cc03,cc04,cc05,cc06,cc07,cc08,cc09
      56             :     COMPLEX  cc10,cc11,cc12,cc13,cc14,cc15,cc16,cc17,cc18,cc19
      57             :     COMPLEX  cc20,cc21,cc22
      58             :     COMPLEX  ck00,ck01,ck02,ck03,ck04,ck05,ck06,ck07,ck08,ck09
      59             :     COMPLEX  ck10,ck11,ck12,ck13,ck14,ck15,ck16,ck17,ck18,ck19
      60             :     COMPLEX  ck20,ck21,ck22
      61             :     !   ..
      62             :     !   ..Local Arrays 
      63             :     REAL     comp(23)
      64             :     !   ..
      65             :     !
      66             :     REAL,PARAMETER :: h=0.50, g=0.0625
      67             :     !**************************************************** 
      68             :     !
      69           0 :     mt=0
      70           0 :     DO   ityp = 1,atoms%ntype
      71           0 :        ddn0 = usdus%ddn(0,ityp,jspin)
      72           0 :        ddn1 = usdus%ddn(1,ityp,jspin)    
      73           0 :        ddn2 = usdus%ddn(2,ityp,jspin)    
      74           0 :        ddn3 = usdus%ddn(3,ityp,jspin) 
      75           0 :        DO  imt=1,atoms%neq(ityp)
      76           0 :           mt=mt+1
      77           0 :           DO  n=1,ne
      78             :              !
      79             :              ! eigVecCoeffs%acof
      80             :              !   s-states
      81           0 :              ca00 = eigVecCoeffs%acof(n,0,mt,jspin)
      82             :              !   p-states
      83           0 :              ca01 = eigVecCoeffs%acof(n,1,mt,jspin) - eigVecCoeffs%acof(n,3,mt,jspin)
      84           0 :              ca02 = eigVecCoeffs%acof(n,1,mt,jspin) + eigVecCoeffs%acof(n,3,mt,jspin)
      85           0 :              ca03 = eigVecCoeffs%acof(n,2,mt,jspin)
      86             :              !   d-states
      87           0 :              ca04 = eigVecCoeffs%acof(n,4,mt,jspin) - eigVecCoeffs%acof(n,8,mt,jspin)
      88           0 :              ca05 = eigVecCoeffs%acof(n,5,mt,jspin) + eigVecCoeffs%acof(n,7,mt,jspin)
      89           0 :              ca06 = eigVecCoeffs%acof(n,5,mt,jspin) - eigVecCoeffs%acof(n,7,mt,jspin)
      90           0 :              ca07 = eigVecCoeffs%acof(n,4,mt,jspin) + eigVecCoeffs%acof(n,8,mt,jspin)
      91           0 :              ca08 = eigVecCoeffs%acof(n,6,mt,jspin)
      92             :              !
      93             :              !   f-states: a cubic set (cub) 
      94             :              ! 
      95             :              ca09 = ( eigVecCoeffs%acof(n,9,mt,jspin)  - eigVecCoeffs%acof(n,15,mt,jspin) )*SQRT(5.0) -&
      96           0 :                     ( eigVecCoeffs%acof(n,11,mt,jspin) - eigVecCoeffs%acof(n,13,mt,jspin) )*SQRT(3.0)
      97             :              ca10 = ( eigVecCoeffs%acof(n,9,mt,jspin)  + eigVecCoeffs%acof(n,15,mt,jspin) )*SQRT(5.0) +&
      98           0 :                     ( eigVecCoeffs%acof(n,11,mt,jspin) + eigVecCoeffs%acof(n,13,mt,jspin) )*SQRT(3.0) 
      99           0 :              ca11 =   eigVecCoeffs%acof(n,12,mt,jspin)
     100             :              ca12 = ( eigVecCoeffs%acof(n,9,mt,jspin)  + eigVecCoeffs%acof(n,15,mt,jspin) )*SQRT(3.0) -&
     101           0 :                     ( eigVecCoeffs%acof(n,11,mt,jspin) + eigVecCoeffs%acof(n,13,mt,jspin) )*SQRT(5.0) 
     102           0 :              ca13 =   eigVecCoeffs%acof(n,10,mt,jspin) + eigVecCoeffs%acof(n,14,mt,jspin)
     103             :              ca14 = ( eigVecCoeffs%acof(n,9,mt,jspin)  - eigVecCoeffs%acof(n,15,mt,jspin) )*SQRT(3.0) +&
     104           0 :                     ( eigVecCoeffs%acof(n,11,mt,jspin) - eigVecCoeffs%acof(n,13,mt,jspin) )*SQRT(5.0) 
     105           0 :              ca15 =   eigVecCoeffs%acof(n,10,mt,jspin) - eigVecCoeffs%acof(n,14,mt,jspin) 
     106             :              !
     107             :              !   f-states:      a low symmetry set (lss)
     108             :              !
     109           0 :              ca16 =  eigVecCoeffs%acof(n,11,mt,jspin) - eigVecCoeffs%acof(n,13,mt,jspin)
     110           0 :              ca17 =  eigVecCoeffs%acof(n,11,mt,jspin) + eigVecCoeffs%acof(n,13,mt,jspin)
     111           0 :              ca18 =  eigVecCoeffs%acof(n,12,mt,jspin)
     112           0 :              ca19 =  eigVecCoeffs%acof(n,10,mt,jspin) - eigVecCoeffs%acof(n,14,mt,jspin)
     113           0 :              ca20 =  eigVecCoeffs%acof(n,10,mt,jspin) + eigVecCoeffs%acof(n,14,mt,jspin)
     114           0 :              ca21 =  eigVecCoeffs%acof(n,9,mt,jspin)  - eigVecCoeffs%acof(n,15,mt,jspin)
     115           0 :              ca22 =  eigVecCoeffs%acof(n,9,mt,jspin)  + eigVecCoeffs%acof(n,15,mt,jspin)
     116             :              !
     117             :              ! eigVecCoeffs%bcof
     118             :              !   s-states
     119           0 :              cb00 =  eigVecCoeffs%bcof(n,0,mt,jspin)
     120             :              !   p-states
     121           0 :              cb01 =  eigVecCoeffs%bcof(n,1,mt,jspin) - eigVecCoeffs%bcof(n,3,mt,jspin) 
     122           0 :              cb02 =  eigVecCoeffs%bcof(n,1,mt,jspin) + eigVecCoeffs%bcof(n,3,mt,jspin) 
     123           0 :              cb03 =  eigVecCoeffs%bcof(n,2,mt,jspin)
     124             :              !   d-states
     125           0 :              cb04 =  eigVecCoeffs%bcof(n,4,mt,jspin) - eigVecCoeffs%bcof(n,8,mt,jspin) 
     126           0 :              cb05 =  eigVecCoeffs%bcof(n,5,mt,jspin) + eigVecCoeffs%bcof(n,7,mt,jspin) 
     127           0 :              cb06 =  eigVecCoeffs%bcof(n,5,mt,jspin) - eigVecCoeffs%bcof(n,7,mt,jspin) 
     128           0 :              cb07 =  eigVecCoeffs%bcof(n,4,mt,jspin) + eigVecCoeffs%bcof(n,8,mt,jspin) 
     129           0 :              cb08 =  eigVecCoeffs%bcof(n,6,mt,jspin)
     130             :              !
     131             :              !   f-states: a cubic set (cub)
     132             :              !
     133             :              cb09 = ( eigVecCoeffs%bcof(n,9,mt,jspin)  - eigVecCoeffs%bcof(n,15,mt,jspin) )*SQRT(5.0) -&
     134           0 :                     ( eigVecCoeffs%bcof(n,11,mt,jspin) - eigVecCoeffs%bcof(n,13,mt,jspin) )*SQRT(3.0)
     135             :              cb10 = ( eigVecCoeffs%bcof(n,9,mt,jspin)  + eigVecCoeffs%bcof(n,15,mt,jspin) )*SQRT(5.0) +&
     136           0 :                     ( eigVecCoeffs%bcof(n,11,mt,jspin) + eigVecCoeffs%bcof(n,13,mt,jspin) )*SQRT(3.0) 
     137           0 :              cb11 =   eigVecCoeffs%bcof(n,12,mt,jspin)
     138             :              cb12 = ( eigVecCoeffs%bcof(n,9,mt,jspin)  + eigVecCoeffs%bcof(n,15,mt,jspin) )*SQRT(3.0) -&
     139           0 :                     ( eigVecCoeffs%bcof(n,11,mt,jspin) + eigVecCoeffs%bcof(n,13,mt,jspin) )*SQRT(5.0) 
     140           0 :              cb13 =   eigVecCoeffs%bcof(n,10,mt,jspin) + eigVecCoeffs%bcof(n,14,mt,jspin)
     141             :              cb14 = ( eigVecCoeffs%bcof(n,9,mt,jspin)  - eigVecCoeffs%bcof(n,15,mt,jspin) )*SQRT(3.0) +&
     142           0 :                     ( eigVecCoeffs%bcof(n,11,mt,jspin) - eigVecCoeffs%bcof(n,13,mt,jspin) )*SQRT(5.0)
     143           0 :              cb15 =   eigVecCoeffs%bcof(n,10,mt,jspin) - eigVecCoeffs%bcof(n,14,mt,jspin) 
     144             :              !
     145             :              !   f-states:      a low symmetry set (lss)
     146             :              !
     147           0 :              cb16 =  eigVecCoeffs%bcof(n,11,mt,jspin) - eigVecCoeffs%bcof(n,13,mt,jspin)
     148           0 :              cb17 =  eigVecCoeffs%bcof(n,11,mt,jspin) + eigVecCoeffs%bcof(n,13,mt,jspin)
     149           0 :              cb18 =  eigVecCoeffs%bcof(n,12,mt,jspin)
     150           0 :              cb19 =  eigVecCoeffs%bcof(n,10,mt,jspin) - eigVecCoeffs%bcof(n,14,mt,jspin)
     151           0 :              cb20 =  eigVecCoeffs%bcof(n,10,mt,jspin) + eigVecCoeffs%bcof(n,14,mt,jspin)
     152           0 :              cb21 =  eigVecCoeffs%bcof(n,9,mt,jspin)  - eigVecCoeffs%bcof(n,15,mt,jspin)
     153           0 :              cb22 =  eigVecCoeffs%bcof(n,9,mt,jspin)  + eigVecCoeffs%bcof(n,15,mt,jspin)
     154             :              !------------------------------------------------------------------
     155             :              !  s
     156           0 :              comp(1)  =   ca00*CONJG(ca00) + cb00*CONJG(cb00)*ddn0 
     157             :              !  p
     158           0 :              comp(2)  = ( ca01*CONJG(ca01) + cb01*CONJG(cb01)*ddn1 )*h
     159           0 :              comp(3)  = ( ca02*CONJG(ca02) + cb02*CONJG(cb02)*ddn1 )*h
     160           0 :              comp(4)  =   ca03*CONJG(ca03) + cb03*CONJG(cb03)*ddn1 
     161             :              !  d
     162           0 :              comp(5)  = ( ca04*CONJG(ca04) + cb04*CONJG(cb04)*ddn2 )*h
     163           0 :              comp(6)  = ( ca05*CONJG(ca05) + cb05*CONJG(cb05)*ddn2 )*h
     164           0 :              comp(7)  = ( ca06*CONJG(ca06) + cb06*CONJG(cb06)*ddn2 )*h
     165           0 :              comp(8)  = ( ca07*CONJG(ca07) + cb07*CONJG(cb07)*ddn2 )*h
     166           0 :              comp(9)  =   ca08*CONJG(ca08) + cb08*CONJG(cb08)*ddn2 
     167             :              !  f: a cubic set
     168           0 :              comp(10) = ( ca09*CONJG(ca09) + cb09*CONJG(cb09)*ddn3 )*g       
     169           0 :              comp(11) = ( ca10*CONJG(ca10) + cb10*CONJG(cb10)*ddn3 )*g
     170           0 :              comp(12) =   ca11*CONJG(ca11) + cb11*CONJG(cb11)*ddn3 
     171           0 :              comp(13) = ( ca12*CONJG(ca12) + cb12*CONJG(cb12)*ddn3 )*g
     172           0 :              comp(14) = ( ca13*CONJG(ca13) + cb13*CONJG(cb13)*ddn3 )*h
     173           0 :              comp(15) = ( ca14*CONJG(ca14) + cb14*CONJG(cb14)*ddn3 )*g
     174           0 :              comp(16) = ( ca15*CONJG(ca15) + cb15*CONJG(cb15)*ddn3 )*h
     175             :              !  f: a low symmetry set
     176           0 :              comp(17) = ( ca16*CONJG(ca16) + cb16*CONJG(cb16)*ddn3 )*h    
     177           0 :              comp(18) = ( ca17*CONJG(ca17) + cb17*CONJG(cb17)*ddn3 )*h
     178           0 :              comp(19) =   ca18*CONJG(ca18) + cb18*CONJG(cb18)*ddn3 
     179           0 :              comp(20) = ( ca19*CONJG(ca19) + cb19*CONJG(cb19)*ddn3 )*h
     180           0 :              comp(21) = ( ca20*CONJG(ca20) + cb20*CONJG(cb20)*ddn3 )*h
     181           0 :              comp(22) = ( ca21*CONJG(ca21) + cb21*CONJG(cb21)*ddn3 )*h
     182           0 :              comp(23) = ( ca22*CONJG(ca22) + cb22*CONJG(cb22)*ddn3 )*h
     183             :              !--------------------------------------------------------------------
     184             :              ! ccof   ( contributions from local orbitals )
     185             :              !
     186           0 :              DO  lo = 1,atoms%nlo(ityp)
     187           0 :                 l = atoms%llo(lo,ityp)
     188             :                 ! lo-s
     189           0 :                 IF ( l.EQ.0 )  THEN
     190           0 :                    cc00 = eigVecCoeffs%ccof(0,n,lo,mt,jspin)
     191           0 :                    ck00 = CONJG(cc00)
     192             : 
     193             :                    comp(1)  =  comp(1)  +&
     194             :                         ( ca00*ck00 + cc00*CONJG(ca00) )*usdus%uulon(lo,ityp,jspin) +&
     195           0 :                         ( cb00*ck00 + cc00*CONJG(cb00) )*usdus%dulon(lo,ityp,jspin) + cc00*ck00*usdus%uloulopn(lo,lo,ityp,jspin) 
     196           0 :                    CYCLE
     197             :                 ENDIF
     198             :                 ! lo-p
     199           0 :                 IF ( l.EQ.1 )  THEN
     200           0 :                    cc01 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) - eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     201           0 :                    cc02 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) + eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     202           0 :                    cc03 = eigVecCoeffs%ccof( 0,n,lo,mt,jspin)
     203             : 
     204           0 :                    ck01 = CONJG(cc01) 
     205           0 :                    ck02 = CONJG(cc02) 
     206           0 :                    ck03 = CONJG(cc03)
     207             :                    !
     208             :                    comp(2) = comp(2)  + (( ca01*ck01 + cc01*CONJG(ca01) )*usdus%uulon(lo,ityp,jspin) +&
     209           0 :                         ( cb01*ck01 + cc01*CONJG(cb01) )*usdus%dulon(lo,ityp,jspin) + cc01*ck01*usdus%uloulopn(lo,lo,ityp,jspin) )*h    
     210             :                    comp(3) = comp(3)  + (( ca02*ck02 + cc02*CONJG(ca02) )*usdus%uulon(lo,ityp,jspin) +&
     211           0 :                         ( cb02*ck02 + cc02*CONJG(cb02) )*usdus%dulon(lo,ityp,jspin) + cc02*ck02*usdus%uloulopn(lo,lo,ityp,jspin) )*h 
     212             :                    comp(4) = comp(4)  + ( ca03*ck03 + cc03*CONJG(ca03) )*usdus%uulon(lo,ityp,jspin) +&
     213           0 :                         ( cb03*ck03 + cc03*CONJG(cb03) )*usdus%dulon(lo,ityp,jspin) + cc03*ck03*usdus%uloulopn(lo,lo,ityp,jspin) 
     214           0 :                    CYCLE
     215             :                 ENDIF
     216             :                 ! lo-d
     217           0 :                 IF ( l.EQ.2 )  THEN
     218           0 :                    cc04 = eigVecCoeffs%ccof(-2,n,lo,mt,jspin) - eigVecCoeffs%ccof(2,n,lo,mt,jspin)
     219           0 :                    cc05 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) + eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     220           0 :                    cc06 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) - eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     221           0 :                    cc07 = eigVecCoeffs%ccof(-2,n,lo,mt,jspin) + eigVecCoeffs%ccof(2,n,lo,mt,jspin)
     222           0 :                    cc08 = eigVecCoeffs%ccof( 0,n,lo,mt,jspin)
     223             : 
     224           0 :                    ck04 = CONJG(cc04)
     225           0 :                    ck05 = CONJG(cc05)
     226           0 :                    ck06 = CONJG(cc06)
     227           0 :                    ck07 = CONJG(cc07)
     228           0 :                    ck08 = CONJG(cc08)
     229             : 
     230             :                    comp(5) = comp(5)  + (( ca04*ck04 + cc04*CONJG(ca04) )*usdus%uulon(lo,ityp,jspin) +&
     231           0 :                         ( cb04*ck04 + cc04*CONJG(cb04) )*usdus%dulon(lo,ityp,jspin) + cc04*ck04*usdus%uloulopn(lo,lo,ityp,jspin) )*h    
     232             :                    comp(6) = comp(6)  + (( ca05*ck05 + cc05*CONJG(ca05) )*usdus%uulon(lo,ityp,jspin) +&
     233           0 :                         ( cb05*ck05 + cc05*CONJG(cb05) )*usdus%dulon(lo,ityp,jspin) + cc05*ck05*usdus%uloulopn(lo,lo,ityp,jspin) )*h 
     234             :                    comp(7) = comp(7)  + (( ca06*ck06 + cc06*CONJG(ca06) )*usdus%uulon(lo,ityp,jspin) +&
     235           0 :                         ( cb06*ck06 + cc06*CONJG(cb06) )*usdus%dulon(lo,ityp,jspin) + cc06*ck06*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     236             :                    comp(8) = comp(8)  + (( ca07*ck07 + cc07*CONJG(ca07) )*usdus%uulon(lo,ityp,jspin) +&
     237           0 :                         ( cb07*ck07 + cc07*CONJG(cb07) )*usdus%dulon(lo,ityp,jspin) + cc07*ck07*usdus%uloulopn(lo,lo,ityp,jspin) )*h    
     238             :                    comp(9) = comp(9)  + ( ca08*ck08 + cc08*CONJG(ca08) )*usdus%uulon(lo,ityp,jspin) +&
     239           0 :                         ( cb08*ck08 + cc08*CONJG(cb08) )*usdus%dulon(lo,ityp,jspin) + cc08*ck08*usdus%uloulopn(lo,lo,ityp,jspin)  
     240           0 :                    CYCLE                                
     241             :                 ENDIF
     242             :                 ! lo-f
     243           0 :                 IF ( l.EQ.3 )  THEN
     244             :                    !
     245             :                    !  a cubic set (cub)
     246             :                    !
     247             :                    cc09 = ( eigVecCoeffs%ccof(-3,n,lo,mt,jspin) - eigVecCoeffs%ccof(3,n,lo,mt,jspin) )*SQRT(5.0) -&
     248           0 :                           ( eigVecCoeffs%ccof(-1,n,lo,mt,jspin) - eigVecCoeffs%ccof(1,n,lo,mt,jspin) )*SQRT(3.0) 
     249             :                    cc10 = ( eigVecCoeffs%ccof(-3,n,lo,mt,jspin) + eigVecCoeffs%ccof(3,n,lo,mt,jspin) )*SQRT(5.0) +&
     250           0 :                           ( eigVecCoeffs%ccof(-1,n,lo,mt,jspin) + eigVecCoeffs%ccof(1,n,lo,mt,jspin) )*SQRT(3.0) 
     251           0 :                    cc11 =   eigVecCoeffs%ccof( 0,n,lo,mt,jspin)
     252             :                    cc12 = ( eigVecCoeffs%ccof(-3,n,lo,mt,jspin) + eigVecCoeffs%ccof(3,n,lo,mt,jspin) )*SQRT(3.0) -&
     253           0 :                           ( eigVecCoeffs%ccof(-1,n,lo,mt,jspin) + eigVecCoeffs%ccof(1,n,lo,mt,jspin) )*SQRT(5.0) 
     254           0 :                    cc13 =   eigVecCoeffs%ccof(-2,n,lo,mt,jspin) + eigVecCoeffs%ccof(2,n,lo,mt,jspin) 
     255             :                    cc14 = ( eigVecCoeffs%ccof(-3,n,lo,mt,jspin) - eigVecCoeffs%ccof(3,n,lo,mt,jspin) )*SQRT(3.0) +&
     256           0 :                           ( eigVecCoeffs%ccof(-1,n,lo,mt,jspin) - eigVecCoeffs%ccof(1,n,lo,mt,jspin) )*SQRT(5.0)
     257           0 :                    cc15 =   eigVecCoeffs%ccof(-2,n,lo,mt,jspin) - eigVecCoeffs%ccof(2,n,lo,mt,jspin)
     258             :             !
     259           0 :                    ck09 = CONJG(cc09)
     260           0 :                    ck10 = CONJG(cc10)
     261           0 :                    ck11 = CONJG(cc11)
     262           0 :                    ck12 = CONJG(cc12)
     263           0 :                    ck13 = CONJG(cc13)
     264           0 :                    ck14 = CONJG(cc14)
     265           0 :                    ck15 = CONJG(cc15)
     266             :                    !
     267             :                    comp(10) = comp(10)  + (( ca09*ck09 + cc09*CONJG(ca09) )*usdus%uulon(lo,ityp,jspin) +&
     268           0 :                         ( cb09*ck09 + cc09*CONJG(cb09) )*usdus%dulon(lo,ityp,jspin) + cc09*ck09*usdus%uloulopn(lo,lo,ityp,jspin) )*g    
     269             :                    comp(11) = comp(11)  + (( ca10*ck10 + cc10*CONJG(ca10) )*usdus%uulon(lo,ityp,jspin) +&
     270           0 :                         ( cb10*ck10 + cc10*CONJG(cb10) )*usdus%dulon(lo,ityp,jspin) + cc10*ck10*usdus%uloulopn(lo,lo,ityp,jspin) )*g 
     271             :                    comp(12) = comp(12)  + ( ca11*ck11 + cc11*CONJG(ca11) )*usdus%uulon(lo,ityp,jspin) +&
     272           0 :                         ( cb11*ck11 + cc11*CONJG(cb11) )*usdus%dulon(lo,ityp,jspin) + cc11*ck11*usdus%uloulopn(lo,lo,ityp,jspin) 
     273             :                    comp(13) = comp(13)  + (( ca12*ck12 + cc12*CONJG(ca12) )*usdus%uulon(lo,ityp,jspin) +&
     274           0 :                         ( cb12*ck12 + cc12*CONJG(cb12) )*usdus%dulon(lo,ityp,jspin) + cc12*ck12*usdus%uloulopn(lo,lo,ityp,jspin) )*g
     275             :                    comp(14) = comp(14)  + (( ca13*ck13 + cc13*CONJG(ca13) )*usdus%uulon(lo,ityp,jspin) +&
     276           0 :                         ( cb13*ck13 + cc13*CONJG(cb13) )*usdus%dulon(lo,ityp,jspin) + cc13*ck13*usdus%uloulopn(lo,lo,ityp,jspin) )*h 
     277             :                    comp(15) = comp(15)  + (( ca14*ck14 + cc14*CONJG(ca14) )*usdus%uulon(lo,ityp,jspin) +&
     278           0 :                         ( cb14*ck14 + cc14*CONJG(cb14) )*usdus%dulon(lo,ityp,jspin) + cc14*ck14*usdus%uloulopn(lo,lo,ityp,jspin) )*g
     279             :                    comp(16) = comp(16)  + (( ca15*ck15 + cc15*CONJG(ca15) )*usdus%uulon(lo,ityp,jspin) +&
     280           0 :                         ( cb15*ck15 + cc15*CONJG(cb15) )*usdus%dulon(lo,ityp,jspin) + cc15*ck15*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     281             :           !
     282             :           !  a low symmetry set (lss)
     283             :           !
     284           0 :                    cc16 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) - eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     285           0 :                    cc17 = eigVecCoeffs%ccof(-1,n,lo,mt,jspin) + eigVecCoeffs%ccof(1,n,lo,mt,jspin)
     286           0 :                    cc18 = eigVecCoeffs%ccof( 0,n,lo,mt,jspin)
     287           0 :                    cc19 = eigVecCoeffs%ccof(-2,n,lo,mt,jspin) - eigVecCoeffs%ccof(2,n,lo,mt,jspin)
     288           0 :                    cc20 = eigVecCoeffs%ccof(-2,n,lo,mt,jspin) + eigVecCoeffs%ccof(2,n,lo,mt,jspin)
     289           0 :                    cc21 = eigVecCoeffs%ccof(-3,n,lo,mt,jspin) - eigVecCoeffs%ccof(3,n,lo,mt,jspin)
     290           0 :                    cc22 = eigVecCoeffs%ccof(-3,n,lo,mt,jspin) + eigVecCoeffs%ccof(3,n,lo,mt,jspin)
     291             :             !
     292           0 :                    ck16 = CONJG(cc16)
     293           0 :                    ck17 = CONJG(cc17)
     294           0 :                    ck18 = CONJG(cc18)
     295           0 :                    ck19 = CONJG(cc19)
     296           0 :                    ck20 = CONJG(cc20)
     297           0 :                    ck21 = CONJG(cc21)
     298           0 :                    ck22 = CONJG(cc22)
     299             :                    !
     300             :                    comp(17) = comp(17)  + (( ca16*ck16 + cc16*CONJG(ca16) )*usdus%uulon(lo,ityp,jspin) +&
     301           0 :                         ( cb16*ck16 + cc16*CONJG(cb16) )*usdus%dulon(lo,ityp,jspin) + cc16*ck16*usdus%uloulopn(lo,lo,ityp,jspin) )*h 
     302             :                    comp(18) = comp(18)  + (( ca17*ck17 + cc17*CONJG(ca17) )*usdus%uulon(lo,ityp,jspin) +&
     303           0 :                         ( cb17*ck17 + cc17*CONJG(cb17) )*usdus%dulon(lo,ityp,jspin) + cc17*ck17*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     304             :                    comp(19) = comp(19)  + ( ca18*ck18 + cc18*CONJG(ca18) )*usdus%uulon(lo,ityp,jspin) +&
     305           0 :                         ( cb18*ck18 + cc18*CONJG(cb18) )*usdus%dulon(lo,ityp,jspin) + cc18*ck18*usdus%uloulopn(lo,lo,ityp,jspin)
     306             :                    comp(20) = comp(20)  + (( ca19*ck19 + cc19*CONJG(ca19) )*usdus%uulon(lo,ityp,jspin) +&
     307           0 :                         ( cb19*ck19 + cc19*CONJG(cb19) )*usdus%dulon(lo,ityp,jspin) + cc19*ck19*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     308             :                    comp(21) = comp(21)  + (( ca20*ck20 + cc20*CONJG(ca20) )*usdus%uulon(lo,ityp,jspin) +&
     309           0 :                         ( cb20*ck20 + cc20*CONJG(cb20) )*usdus%dulon(lo,ityp,jspin) + cc20*ck20*usdus%uloulopn(lo,lo,ityp,jspin) )*h 
     310             :                    comp(22) = comp(22)  + (( ca21*ck21 + cc21*CONJG(ca21) )*usdus%uulon(lo,ityp,jspin) +&
     311           0 :                         ( cb21*ck21 + cc21*CONJG(cb21) )*usdus%dulon(lo,ityp,jspin) + cc21*ck21*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     312             :                    comp(23) = comp(23)  + (( ca22*ck22 + cc22*CONJG(ca22) )*usdus%uulon(lo,ityp,jspin) +&
     313           0 :                         ( cb22*ck22 + cc22*CONJG(cb22) )*usdus%dulon(lo,ityp,jspin) + cc22*ck22*usdus%uloulopn(lo,lo,ityp,jspin) )*h
     314             :                 ENDIF
     315             :              ENDDO
     316             :              !-------------------------------------------------------------------
     317             :              !    calculate an orbital cnomposition in percets
     318             :              !
     319             :              sum = 0.0
     320           0 :              DO   lm=1,16
     321           0 :                 sum = sum + comp(lm)
     322             :              ENDDO
     323           0 :              cf = 100.0/sum 
     324           0 :              orbcomp%qmtp(n,mt,ikpt,jspin) = sum*100.0         
     325           0 :              orbcomp%comp(n,:,mt,ikpt,jspin) = comp(:)*cf
     326             :              !----------------------------------------------------
     327             :           ENDDO ! bands (n)
     328             :        ENDDO    ! atoms (imt) -> mt (=atoms%nat)
     329             :     ENDDO       ! types (ityp)
     330             :     !
     331           0 :   END SUBROUTINE orb_comp
     332             : END MODULE m_orbcomp

Generated by: LCOV version 1.13