35 use,
intrinsic :: iso_fortran_env
59 integer,
intent(in) :: l
60 complex(real64),
intent(out) :: uu(:, :)
67 uu(1:2*l+1, 1:2*l+1) =
m_z0
70 sgn = real((-1)**m, real64)
87 integer,
intent(in) :: l
88 logical,
intent(in) :: jplus
89 integer,
intent(in) :: m
90 integer,
intent(in) :: spin
99 if (m < -l - 1 .or. m > l)
return
100 if (spin == 1) coeff =
sqrt(real(l + m + 1, real64)*denom)
101 if (spin == 2) coeff =
sqrt(real(l - m, real64)*denom)
104 if (m < -l .or. m > l - 1)
return
105 if (spin == 1) coeff =
sqrt(real(l - m, real64)*denom)
106 if (spin == 2) coeff = -
sqrt(real(l + m + 1, real64)*denom)
121 integer,
intent(in) :: l
122 integer,
intent(in) :: nc
123 logical,
intent(in) :: jplus(:)
124 real(real64),
intent(in) :: mat(:, :)
125 integer,
intent(in) :: pidx(:, :)
126 complex(real64),
intent(inout) :: zmix(:, :, :)
128 integer :: ci, cj, m, s1, s2, ml1, ml2, blk, ip, jp
129 real(real64) :: acoef, bcoef
130 integer :: blkmap(2, 2)
141 if (jplus(ci) .neqv. jplus(cj)) cycle
146 if (ml1 < -l .or. ml1 > l) cycle
149 ip = pidx(ml1 + l + 1, ci)
153 if (ml2 < -l .or. ml2 > l) cycle
156 jp = pidx(ml2 + l + 1, cj)
159 zmix(ip, jp, blk) = zmix(ip, jp, blk) + cmplx(acoef*bcoef*mat(ci, cj),
m_zero, real64)
double sqrt(double __x) __attribute__((__nothrow__
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
complex(real64), parameter, public m_z0
real(real64), parameter, public m_epsilon
complex(real64), parameter, public m_z1
real(real64), parameter, public m_one
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
Spin-orbit coupling for fully-relativistic ultrasoft pseudopotentials.
pure real(real64) function, public soc_uspp_spinor_coeff(l, jplus, m, spin)
Clebsch-Gordan spinor coefficient.
subroutine, public soc_uspp_ylm_transform(l, uu)
Complex-to-real spherical-harmonic transform U for a given l.
subroutine, public soc_uspp_add_channel_coupling_cmplx(l, nc, jplus, mat, pidx, zmix)
Add the (l,j)->spin coupling of one l-shell to the 2x2 spin zmix, complex-Y_lm basis.