That is to say, pawprtwf 1 confilits with pawspnorb 1 !
I read the source file 66_paw/pawmkaewf.F90 and found that from line 729
Code: Select all
ABI_ALLOCATE(ur,(2,n1*n2*n3))
I know that, in case of non-spinor wavefunctions, we have
|Ψn> =|tΨn>+ Σ (φi - tφi) <tpi |tΨn >
In case of SOC, the PSWF |tΨn> is a two-component spinor WF: {|tΨn>_1, |tΨn>_2}
But what about the partial waves (φi, tφi) and projectors (tpi)? Are they also spinors?
Are the PAW on-site contributions to each spinor component of a spinor WF the same?
Does the Cprj_k contains the both spinor components?
How to modify the following code except doubling the dimension of ur?
Code: Select all
! === Add onsite term on the augmented FFT mesh ===
do iatom=1,natom
itypat =typat(iatom)
lmn_size=Pawtab(itypat)%lmn_size
ln_size =Pawtab(itypat)%basis_size ! no. of nl elements in PAW basis
nfgd =local_pawfgrtab(iatom)%nfgd ! no. of points in the fine grid for this PAW sphere
ibsp=(iband-1)*dtset%nspinor
do ispinor=1,dtset%nspinor
ibsp=ibsp+1
do jlmn=1,lmn_size
jl=Psps%indlmn(1,jlmn,itypat)
jm=Psps%indlmn(2,jlmn,itypat)
cp_fact(1) = Cprj_k(iatom,ibsp)%cp(1,jlmn) *sqrt(ucvol) ! Magic factor
cp_fact(2) = Cprj_k(iatom,ibsp)%cp(2,jlmn) *sqrt(ucvol)
do ifgd=1,nfgd ! loop over fine grid points in current PAW sphere.
ifftsph = local_pawfgrtab(iatom)%ifftsph(ifgd) ! index of the point on the grid
phj = Paw_onsite(iatom)% phi(ifgd,jlmn)
tphj = Paw_onsite(iatom)%tphi(ifgd,jlmn)
! old code
! re_p = cp_fact(1)
! im_p = cp_fact(2)
! apply the phase
re_p = cp_fact(1) * phk_atm(1,ifgd,iatom) - cp_fact(2) * phk_atm(2,ifgd,iatom)
im_p = cp_fact(1) * phk_atm(2,ifgd,iatom) + cp_fact(2) * phk_atm(1,ifgd,iatom)
ur(1,ifftsph) = ur(1,ifftsph) + re_p * (phj-tphj)
ur(2,ifftsph) = ur(2,ifftsph) + im_p * (phj-tphj)
ur_ae_onsite(1,ifftsph) = ur_ae_onsite(1,ifftsph) + re_p * phj
ur_ae_onsite(2,ifftsph) = ur_ae_onsite(2,ifftsph) + im_p * phj
ur_ps_onsite(1,ifftsph) = ur_ps_onsite(1,ifftsph) + re_p * tphj
ur_ps_onsite(2,ifftsph) = ur_ps_onsite(2,ifftsph) + im_p * tphj
ur_mask(ifftsph) = one
end do
end do !jlmn
end do !ispinor
end do !iatom
Hope someone can help me, thanks in advance!
BTW: I use tha latest 6.12.3 version. I want to know if this problem is fixed in the development version 6.13, if yes how to get it?