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 : MODULE m_hsmt_mtNocoPot_offdiag
7 : USE m_juDFT
8 : IMPLICIT NONE
9 : CONTAINS
10 222 : SUBROUTINE hsmt_mtNocoPot_offdiag(n,input,fmpi,sym,atoms,noco,nococonv,cell,lapw,ud,td,fjgj,igSpinPr,igSpin,hmat_tmp,hmat)
11 : !!Calculate the contribution from the local-spin-offdiagonal potential
12 : !!The following idea is used:
13 : !!Calculate the matrix by using non-spherical algorithm. This is done only once, since
14 : !!this sets up both the local spin-up-down and the spin-down-up part (it calculates the
15 : !!full matrix). So both can be updated from this matrix. But since the off-diagonal
16 : !!local potential is real we have to call the routine twice and use the chi_one factor
17 : !!to get the imaginary contribution
18 : USE m_types
19 : USE m_hsmt_nonsph
20 : USE m_hsmt_distspins
21 : USE m_hsmt_spinor
22 : USE m_hsmt_lo
23 : USE m_hsmt_fjgj
24 : IMPLICIT NONE
25 : TYPE(t_input),INTENT(IN) :: input
26 : TYPE(t_mpi),INTENT(IN) :: fmpi
27 : TYPE(t_sym),INTENT(IN) :: sym
28 : TYPE(t_noco),INTENT(IN) :: noco
29 : TYPE(t_nococonv),INTENT(IN) :: nococonv
30 : TYPE(t_cell),INTENT(IN) :: cell
31 : TYPE(t_atoms),INTENT(IN) :: atoms
32 : TYPE(t_lapw),INTENT(IN) :: lapw
33 : TYPE(t_usdus),INTENT(IN) :: ud
34 : TYPE(t_tlmplm),INTENT(IN) :: td
35 : TYPE(t_fjgj),INTENT(IN) :: fjgj
36 : INTEGER,INTENT(IN) :: igSpinPr,igSpin
37 :
38 : ! .. Scalar Arguments ..
39 : INTEGER, INTENT (IN) :: n
40 : COMPLEX :: chi_one,chi(2,2)
41 : CLASS(t_mat),INTENT(INOUT) :: hmat(:,:),hmat_tmp
42 :
43 222 : chi_one=1.0
44 : !The spin2,1 matrix is calculated(real part of potential)
45 222 : CALL hsmt_nonsph(n,fmpi,sym,atoms,2,1,igSpinPr,igSpin,chi_one,noco,nococonv,cell,lapw,td,fjgj,hmat_tmp,.TRUE.)
46 222 : CALL hsmt_lo(input,atoms,sym,cell,fmpi,noco,nococonv,lapw,ud,td,fjgj,n,chi_one,2,1,igSpinPr,igSpin,hmat_tmp,.TRUE.,.FALSE.,.FALSE.)
47 : !call hmat_tmp%u2l()
48 222 : CALL hsmt_spinor(4,n,nococonv,chi) !spinor for off-diagonal part
49 222 : CALL hsmt_distspins(chi,hmat_tmp,hmat)
50 :
51 :
52 : !The spin1,2 matrix is calculated(imag part of potential)
53 : !chi_one=CMPLX(0.,1.)
54 222 : CALL hsmt_nonsph(n,fmpi,sym,atoms,1,2,igSpinPr,igSpin,chi_one,noco,nococonv,cell,lapw,td,fjgj,hmat_tmp,.TRUE.)
55 222 : CALL hsmt_lo(input,atoms,sym,cell,fmpi,noco,nococonv,lapw,ud,td,fjgj,n,chi_one,1,2,igSpinPr,igSpin,hmat_tmp,.TRUE.,.FALSE.,.FALSE.)
56 : !call hmat_tmp%u2l()
57 :
58 222 : CALL hsmt_spinor(3,n,nococonv,chi)
59 222 : CALL hsmt_distspins(chi,hmat_tmp,hmat)
60 :
61 222 : END SUBROUTINE hsmt_mtNocoPot_offdiag
62 : END MODULE m_hsmt_mtNocoPot_offdiag
|